With the following shell instructions, it is very easy to remove the .bin extension from a Java rpm.bin package. Also, by setting the variables REPO_P or REPO_T, the extracted RPM package is moved to a test or productive repository.

# @(#)buildrpm 1.1 (maj) 2010/07/28
#
# build RPM file from rpm.bin
## Author: Jens Mahnke, (maj@je-ru.de)
# Copyright (c) 2010 All rights reserved.
#
if [ "${1}" = "" ]; then
echo -e "arguments: binary file not named"
fi
echo Archiving RPMs
mv *.rpm archive
REPO_P=/repository/produktiv
REPO_T=/repository/test
B=`basename ${1}`
ZLN1=`grep -na "exit 0" ${B} | cut -d':' -f1`
ZLN=`expr ${ZLN1} + 1`
RPM=`echo ${B} | cut -d'u' -f1`
tail -n +${ZLN} ${B} x
chmod a+x x ./x
rm -f x

echo “Clean Repos"
for i in `find ${REPO_T} -name "${RPM}*"`; do rm ${i}; done

echo Copy to Repos
cp *.rpm ${REPO_T}

echo Make Repos
createrepo ${REPO_T