JDK on Windows 2000


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: JDK on Windows 2000

  1. #1
    Join Date
    Sep 2002
    Posts
    2

    Question JDK on Windows 2000

    Hi,
    A problem here. I have upgraded my OS from Wind98 to Win 2000 and since then can not use Java. I have written a very simple program, with a main method and it should print Test. It compiles fine but when ran, the following error msg is displyed in the MS Dos prompt

    Exception in thread "main" Java.lang.NoClassDefFoundError: Test

    none of my other program can run either. Any help appreciated.
    many thanks
    Onkar

  2. #2
    Join Date
    Jul 2002
    Posts
    60

    Wink setting classpath : No Class Found

    Hi Onkar,
    You're getting that message because your jvm does not know where to find the .class file you've just compiled. It can't find it because it's looking at your Windows OS setup and cannot find the classpath.

    before you run your program, at your dos command prompt type in:
    C:\1.3.1\bin set classpath =
    //enter

    nothing will appear to happen, and you'll end up with:
    c:\1.3.1\bin
    again!! but, try to run your program:
    c:\1.3.1\bin java HelloWorld.class
    and you should get some results.

    Sun has a whole page dedicated to this in their documentation:
    http://java.sun.com/j2se/1.3/docs/to...classpath.html

    Hope that helps!
    ~Jim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center