Results 1 to 5 of 5

Thread: J2SE-1.5???

  1. #1
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Long Island, NY, USA
    Posts
    1,256

    J2SE-1.5???

    OK, I just downloaded the latest Java Developers' Kit (JDK) from sun as an *.rpm. I used alien to make a *.deb. I used kpackage *.deb to install it. Of course, I did all this logged-in as root.

    I followed all the directions in:

    http://java.sun.com/j2se/1.5.0/install-linux.html

    for using the *.rpm but I still only have access to the javac and java apps that came installed on KNOPPIX. Is there a missing step I need to do to get the new javac and java recognized by my users? I seem to recall someone had a similar issue last year, but I can't find that post....

    BTW, I don't really need javac 1.5 or java 1.5. What I'm trying to do is get javadoc and appletviewer for my users. Also, having the javax.swing.* graphics classes available in javac would be nice....

    Please help!

    TIA,
    AJG

  2. #2
    Senior Member registered user
    Join Date
    Mar 2004
    Location
    Berlin
    Posts
    436
    java doesn't need a complicated installation mechanism.

    You have to set the JAVA_HOME to your java-directory, i.e.:

    Code:
    export JAVA_HOME=/opt/j2se
    in /etc/profile.
    And include $JAVA_HOME/bin in your path. If your old java-app is in the path, the order who appears first is important.
    Code:
    export PATH=$PATH:$JAVA_HOME/bin
    Code:
    which javac
    will show you, which javac is found first (if one at all).

  3. #3
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Long Island, NY, USA
    Posts
    1,256
    OK, now I get it. Half the problem is that I couldn't find where the new java utilities were installed! Blackdown uses /usr/bin/ You suggest /opt/j2se/ Where it ended up is /usr/java/jdk1.5.0/ So, now, all I have to do is add /usr/java/jdk1.5.0/bin to my path in /etc/profile, right?

    Well, I did that. I placed /usr/java/jdk1.5.0/bin at the end of the PATH line in /etc/profile and ran source /etc/profile. However which javac still returned /usr/bin/javac! So I placed /usr/java/jdk1.5.0/bin on the PATH in /etc/profile before /usr/bin and ran source /etc/profile. Now which javac returns /usr/java/jdk1.5.0/bin/javac, good.

    New Problem: when I run any of the following:
    appletviewer -version
    javadoc -version
    javac -version
    java -version

    I get this error:

    Error occurred during initialization of VM
    java/lang/NoClassDefFoundError: java/lang/Object

    What now???

    Thanx in advance,
    AJG

  4. #4
    Senior Member registered user
    Join Date
    Mar 2004
    Location
    Berlin
    Posts
    436
    Did you set JAVA_HOME?

    Setting the /usr/java/jdk1.5.0/bin at the beginning of the path is a quick but dirty solution.

    Every programm you call is firstly been searched in this directory, while most of them are in /usr/bin, usr/local/bin, /bin, /sbin /usr/sbin etc.

    Probably in /usr/bin there are only a links to the blackdown-java stuff?
    Code:
    ls -la /usr/bin/java*
    should show.
    Then you could delete these links.
    If not, you have to choose whether you delete the files, or move them to an archive.
    Before the new java works correctly, I would keep them somewhere else.

    And put the $JAVA_HOME/bin at the end of the path.
    You may as well make a link to the javadoc and appletviewer:

    Code:
    ln -s /usr/java/jdk1.5.0/bin/appletviewer /usr/local/bin/appletviewer
    and similiar for javadoc
    Perhaps you have the somewhat braindead /etc/alternatives installed, which is confusing:
    Code:
    ls /etc/alternatives
    I'm not familiar with it, and have to consult the manpages for the syntax, but you then need perhaps to update-alternatives or something similar too.
    Code:
    update-alternatives --help
    man update-alternatives
    for more information.

  5. #5
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    Long Island, NY, USA
    Posts
    1,256
    Thanx for the help! I finally got it working.

    It wasn't the /etc/profile stuff, it was the *.rpm! It would seem that alien couldn't handle it and the *.deb got mangled. So, I downloaded jdk-1_5_0-rc-linux-i586.bin (a self extracting installer) from http://java.sun.com/j2se/1.5.0/download.jsp instead of the *.rpm.bin and everything installed great!

    Thanx again,
    AJG

Posting Permissions

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


A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G picture

A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G

$13.99



Samsung 16GB 2Rx4 PC4-2133P DDR4-17000 1.2V RDIMM ECC Registered Server Memory picture

Samsung 16GB 2Rx4 PC4-2133P DDR4-17000 1.2V RDIMM ECC Registered Server Memory

$16.29



HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin picture

HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin

$12.90



Corsair Vengeance LPX 32GB PC4-25600 (DDR4-3200) Memory NEVER USED LOOSE STICKS picture

Corsair Vengeance LPX 32GB PC4-25600 (DDR4-3200) Memory NEVER USED LOOSE STICKS

$40.00



A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G picture

A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G

$13.99



A-Tech 16GB 2 x 8GB PC3-12800 Laptop SODIMM DDR3 1600 Memory RAM PC3L 16G DDR3L picture

A-Tech 16GB 2 x 8GB PC3-12800 Laptop SODIMM DDR3 1600 Memory RAM PC3L 16G DDR3L

$27.98



Kingston HyperX FURY DDR3 8GB 16GB 32G 1600 1866 1333 Desktop Memory RAM DIMM picture

Kingston HyperX FURY DDR3 8GB 16GB 32G 1600 1866 1333 Desktop Memory RAM DIMM

$13.25



A-Tech 16GB 2x 8GB PC3-12800 Desktop DDR3 1600 MHz 240pin DIMM Memory RAM 16G 8G picture

A-Tech 16GB 2x 8GB PC3-12800 Desktop DDR3 1600 MHz 240pin DIMM Memory RAM 16G 8G

$27.98



A-Tech 256GB 4x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM picture

A-Tech 256GB 4x 64GB 4Rx4 PC4-19200 ECC Load Reduced LRDIMM Server Memory RAM

$287.96



A-Tech 64GB 4x 16GB 2Rx4 PC4-17000R DDR4 2133MHz ECC REG RDIMM Server Memory RAM picture

A-Tech 64GB 4x 16GB 2Rx4 PC4-17000R DDR4 2133MHz ECC REG RDIMM Server Memory RAM

$87.96