English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have this program I was given to work on in my class. I have no idea what any of it means, because they just wanted me to get used to the javac and java comands. I have saved my program "Limits.java" and compiled it so that I have "Limits.class". They are both in the path "C:\Documents and Settings\owner\.jedit\". When I try to do the java comand in my prompt, I get an error "Exception in thread "main" java.lang.NoClassDefFoundError: Limits/java" in my command prompt. I am in "C:\Documents and Settings\owner\.jedit>" on my command prompt. Do I have to set the class path, because I think I changed it in environmental variables when I was trying to get the path set for javac by accedent. If that has nothing to do with my problim just ignore it. Always beter to have too much information than not enough.

2007-02-07 05:29:00 · 1 answers · asked by Michael M 4 in Computers & Internet Other - Computers

1 answers

This might help.

1. Add the path of the java executable to environment variable PATH. How you do that is by adding a semicolon to the already set paths there, then append it with the java executables path. for eg.. if you have installed java in c:\jdk\bin then simply append this to the PATH variable after a semicolon.

2. Before you run a program set the classpath to the current directory. The command at the command prompt can be
SET CLASSPATH =%CLASSPATH%;.
provided that your class files are in the current directory.

:-)

2007-02-07 06:14:03 · answer #1 · answered by the_adrastos 1 · 0 0

fedest.com, questions and answers