本文发表在 rolia.net/zh 相约加拿大网上社区枫下论坛
If you install JBuilder, do not install it under
C:\Programm Files\... because Jbuilder does not allow spacebars in the PATH can CLASSPATH.
Just install in under C:\Jbuilder... using default directory.
I am confused by you. I don't know what you have done. Did you use Jbuiler or JDK to compile your java sources?
Definitely, your problem is a CLASSPATH problem. Now let me help you figure how the
Suppose you issued the command "java Hello" at C:\myproject. According to your CLASSPATH, Java virtual machine first tried to find Hello.class at C:\myproject because
the current directory "." is now equalt to C:\myproject. Then, virtual machine tried to find Hello.class in the C:\PROGRA~1\BORLAND\VBROKER\lib\vbcpp.jar, which is
the second entry in your CLASSPATH. OF course, it failed. At this stage, you are thrown an error message java.lang.NoClassDefFoundError:
You CLASSPATH setting is incomplete.
By the way, your BAT file is full of garbage. You defined and commented PATH and CLASSPATH many times in your .bat file.
I sugguest you remove all the Remarks there.
We had better have a simple life. Here is a
sample setenv.bat file:
set CLASSPATH=.; C:\project;C:jlibraries
Just a few lines.
On the other hand, JBuilder forms a closed environment. It uses its own JDK... It does not interfere with your JDK.
更多精彩文章及讨论，请光临枫下论坛. 网址: rolia.net/zh