Results 1 to 4 of 4

Thread: Error

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2001
    Location
    The Littlest State in the Union
    Posts
    57

    Error

    I am very new to Java and I am just writing a simple program and when it runs i get:
    Exception in thread "main" java.lang.NoClassDefFoundError: prog
    All the program does is take what you wrote after java prog in the command prompt and writes that. But as i said I get that error.

    BFF
    Visual Basic 6.0 Enterprise Edition
    Java 2
    Windows 98
    Mac OS 9.1

  2. #2
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Can you post your code?
    Alcohol & calculus don't mix.
    Never drink & derive.

  3. #3
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    The problem stems from Java not being able to find you class.
    Either set AUOTEXEC.bat's CLASSPATH environment variable
    or use the -classpath switch to inform java where to find your classes. ie...... C:\ java -classpath C:\mydirectory; myprog
    Note..... If you do change your autoexec.bat you will have to reboot in order for your changes to take affect.

  4. #4
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367
    Also if you are attempting to use a swing applet in a browser without the jre installed you will get that error.

Posting Permissions

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



Click Here to Expand Forum to Full Width