Find the answer to your Linux question:
Results 1 to 7 of 7
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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:

    wget -r -l0 -R .bin -nH --cut-dirs=5 (slackware32-bit jre link here)
    then I downloaded the 32-bit linux version of java (non rpm)

    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:

    Finally as root
    output an endless stream of:

  2. #2
    is there a line in the jre.SlackBuild script something like this?

    yes yes | sh $( ls --indicator-style none $CWD/jre-${VERSION}-linux-${JAVA_ARCH}*.bin | tail -1) || exit 1
    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:

    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.

  3. #3
    yep, it has this

    yes yes | sh $( ls --indicator-style none $CWD/jre-${VERSION}-linux-${JAVA_ARCH}*.bin | tail -1) || exit 1
    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...
    I guess I'll need to find another way to get a recent version of java.

  4. $spacer_open
  5. #4
    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?

    # download the tarball
    wget -O jre-7u4-linux-i586.tar.gz
    # 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
    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.

  6. #5
    That seems to work fine
    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)
    I presume to add it to the path:
    export PATH=${PATH}:/home/bob/jre/jre1.7.0_04/bin/
    And from here?
    Thanks alot for helping by the way!

  7. #6
    Quote Originally Posted by Ansim View Post
    I presume to add it to the path:
    export PATH=${PATH}:/home/bob/jre/jre1.7.0_04/bin/
    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.:

    mv /home/bob/jre/jre1.7.0_04 /opt/
    now you should have the dir:


    now with your favorite editor, create a file called "" and in it put:
    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}
    then source it, e.g.:
    . ./
    you should be able to echo $JAVA_HOME and run "java -version" without explicitly using the path.

    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.

  8. #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
    ls -A
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts