Find the answer to your Linux question:
Results 1 to 5 of 5
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2006
    Posts
    55

    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

    Code:
    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.

    ~Linux1245

  2. #2
    Just Joined!
    Join Date
    Jan 2006
    Posts
    55
    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:
    Code:
    Error occured during initialization of VM
    java/lang/NoClassDefFoundError :  java/lang/Object
    Any help would be great. Thanks so much

    ~Linux1245

  3. #3
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252

  4. #4
    Just Joined!
    Join Date
    Jan 2006
    Posts
    55
    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.

    ~Linux1245

  5. #5
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    EDIT:

    Check this first:

    https://wiki.ubuntu.com/RestrictedFo...d2295dd1540dca

    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:
    Code:
    echo $JAVA_HOME
    echo $JDK_HOME
    echo $CLASSPATH
    If any of those don't give output, then add the necessary lines to your ~/.bashrc:
    Code:
    JAVA_HOME=<path to java home> # (i.e. /opt/sun-jdk-1.4.2.10)
    JDK_HOME=<same as above>
    CLASSPATH=.
    
    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
  •