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

    Java Installation --- PLEASE HELP

    Hello, Now I am trying to get java installed. I have Kubuntu 5.10. I downloaded the jdk1.5 and got it unpacked to /usr/java/jdk1.5.0_06. All the commands are in the bin folder but I don't know how to get those commands to the classpath or whatever you have to do. I tried changing the .bashrc to

    export PATH=/usr/java/jdk1.5.0_06/bin
    but once I overwrote the old .bashrc with this one, all the commands like ls could not be found. When I added the export PATH command to the original .bashrc it still could not find the commands like ls. Any help would be great. Thanks so much.


  2. #2
    I just got $PATH to the bin directory of jdk1.5.0_06 but now when I type javac (my program) or any other command in that java bin direcotry it comes up with the error:
    Error occured during initialization of VM
    java/lang/NoClassDefFoundError :  java/lang/Object
    Any help would be great. Thanks so much


  3. #3

  4. $spacer_open
  5. #4
    I do not want to download the jre. I want to get the jdk working to I can compile java files and run them. How do I get it so that I can run the java commands from anywhere without that error coming up that I posted. Thanks again.


  6. #5
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA

    Check this first:

    Note that although the directions say JRE, as you will see in the section just below, they apply to the JDK as well.

    Then change that all to jdk instead.

    The major difference between that process and the one you followed is that the one I posted turns the bin into a Debian package, which should then automatically set up your Java environment.

    Assuming that you wish instead to fix it on your own, looking at my environment variables, try executing the following:
    echo $JAVA_HOME
    echo $JDK_HOME
    echo $CLASSPATH
    If any of those don't give output, then add the necessary lines to your ~/.bashrc:
    JAVA_HOME=<path to java home> # (i.e. /opt/sun-jdk-
    JDK_HOME=<same as above>
    export $JAVA_HOME
    export $JDK_HOME
    export $CLASSPATH

Posting Permissions

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