Results 1 to 3 of 3

Thread: Java problem

  1. #1
    alloy
    Guest

    Java problem

    problem
    ======
    when I compile the following code , it compiles
    >javac hello.java

    but when I try running it
    < java hello

    error message
    ===========
    Exception in thread "main" java.lang.NoClassDefFoundError: hello

    code : hello.java
    ====
    public class hello {
    public static void main(String[] args)
    {
    System.out.println("Hello, world!");
    }
    }

    profile file
    ========
    #Java Enviroment Path
    JAVA_HOME=/usr/local/jdk1.3
    export JAVA_HOME
    PATH=/usr/local/bin:${JAVA_HOME}/bin:${PATH}
    export PATH
    CLASSPATH=${JAVA_HOME}/lib/tools.jar:${JAVA_HOME}/lib/dt.jar
    export CLASSPATH


  2. #2
    alloy
    Guest

    Re:Java problem

    Nevermind ... it seems there is another file called oldjava and javac included in the bin folder . The code runned without problem with the oldjavac . Thanks

  3. #3

    Re:Java problem

    You're welcome :P
    whatdoyougetwhenyoumultiplysixbynine??

Similar Threads

  1. java problem
    By samr in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 05-01-2009, 12:28 PM
  2. FireFox and Java Applets problem.....
    By Hawaiian1 in forum General Chat
    Replies: 5
    Last Post: 01-27-2005, 02:55 PM
  3. java and opera... always says invalid java directory
    By sujoki in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 08-26-2003, 03:54 PM
  4. how to apt-get java
    By S_D_Willie in forum Linux - General Topics
    Replies: 13
    Last Post: 11-22-2002, 12:38 AM
  5. Java & Mozilla (formerly Java and Netscape)
    By papanohair in forum Linux - General Topics
    Replies: 2
    Last Post: 01-07-2002, 08:21 PM

Bookmarks

Posting Permissions

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