Results 1 to 7 of 7
I have a pretty fresh slackware 13.37 32-bit installation and am trying to install java using a guide I can't copy as I'm not allowed to post urls below 15 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-05-2012 #1Just Joined!
- Join Date
- Jan 2012
- Posts
- 7
Slackbuild output "Yyyyyyyyy" when trying to build Java
I have a pretty fresh slackware 13.37 32-bit installation and am trying to install java using a guide I can't copy as I'm not allowed to post urls below 15 posts.
My steps:
then I downloaded the 32-bit linux version of java (non rpm)Code:wget -r -l0 -R .bin -nH --cut-dirs=5 (slackware32-bit jre link here)
copied it all into /jre
I then edited jre.SlackBuild to reflect the version
then I changed the rights, so jre.SlackBuild looks like this:Code:VERSION=7u4 DVER=1.7.0_4
-rwxr-xr-x
Finally as root
output an endless stream of:Code:./jre.SlackBuild
Code:y y y y y y
- 06-06-2012 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,745
is there a line in the jre.SlackBuild script something like this?
the yes yes part is giving you all thoses "y"s, and i think it is doing that b/c it cannot find that jre-*.bin file that it is trying to ls? it should be in the same directory, and should be named something like:Code:yes yes | sh $( ls --indicator-style none $CWD/jre-${VERSION}-linux-${JAVA_ARCH}*.bin | tail -1) || exit 1
maybe you need to download that file and put it in the same dir with that script? you would think the script would d/l it for you, but i did not see anything like that in there.Code:jre-7u4-linux-i586*.bin
- 06-06-2012 #3Just Joined!
- Join Date
- Jan 2012
- Posts
- 7
yep, it has this
I just noticed, though the guide said I should get the .bin file instead of rpm, I've been using a tarball. That explains why it doesn't work. But java only seems to offer me tarballs, rpm or .exe (and I can't find the bin file within the tarball...Code:yes yes | sh $( ls --indicator-style none $CWD/jre-${VERSION}-linux-${JAVA_ARCH}*.bin | tail -1) || exit 1
I guess I'll need to find another way to get a recent version of java.
- 06-06-2012 #4Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,745
you can use the tarball, if you want - and don't mind doing a few manual steps.
as a test, does this work for you?
if the last command properly spews out the Java version, then we can manually put the binaries in your path and modify/add environmental variables that need your system require.Code:# download the tarball wget -O jre-7u4-linux-i586.tar.gz http://javadl.sun.com/webapps/download/AutoDL?BundleId=63202 # uncompress it tar zxf jre-7u4-linux-i586.tar.gz # run java binary command and display Java version, as a test jre1.7.0_04/bin/java -version
- 06-07-2012 #5Just Joined!
- Join Date
- Jan 2012
- Posts
- 7
That seems to work fine
I presume to add it to the path:Code:java version "1.7.0_04" Java(TM) SE Runtime Environment (build 1.7.0_04-b20) Java HotSpot(TM) Server VM (build 23.0-b21, mixed mode)
And from here?Code:export PATH=${PATH}:/home/bob/jre/jre1.7.0_04/bin/
Thanks alot for helping by the way!
- 06-08-2012 #6Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,745
sure, you could do it that way. but i would create a simple script for it that you (or any user on the system, more importantly) could source. first i'd move the directory somewhere more logical, e.g.:
now you should have the dir:Code:mv /home/bob/jre/jre1.7.0_04 /opt/
/opt/jre1.7.0_04/
now with your favorite editor, create a file called "java.sh" and in it put:
then source it, e.g.:Code:if [ -d /opt/jre1.7.0_04/bin ]; then export JAVA_HOME=/opt/jre1.7.0_04/bin export JAVAHOME=$JAVA_HOME export CLASSPATH=${JAVA_HOME}/lib/ext export PLUGIN_HOME=${JAVA_HOME}/plugin echo $PATH|grep -q ${JAVA_HOME}/bin && : || export PATH=${JAVA_HOME}/bin:${PATH} fi
you should be able to echo $JAVA_HOME and run "java -version" without explicitly using the path.Code:. ./java.sh
then i put this script in a directory where all files in it are sourced by users logging in. In RedHat (et al), that is in the directory /etc/profile.d/, but i'm not sure where that would be Slackware.
for now, you could just put it in your home dir. and in your ~/.bashrc, you could put
and you should be good to go.Code:. ~/java.sh
- 06-08-2012 #7Just Joined!
- Join Date
- Jan 2012
- Posts
- 7
Well I think it works, at least youtube videos are playing. But the official java test says it's not installed properly.
I noticed there are not .bash files in the home directory besides the history
but there is a /etc/profiles.d with some .sh so I think that's the default sourcing directory. Anyway, I created a .bashrc file and added the line you quoted, which must've worked since java is effectively working.Code:ls -A


1Likes


