wood burning stoves 2.0*
The moose likes Java in General and the fly likes NoClassDefException in 1.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "NoClassDefException in 1.4" Watch "NoClassDefException in 1.4" New topic
Author

NoClassDefException in 1.4

Jason Travis
Greenhorn

Joined: Feb 22, 2002
Posts: 14
Help. I have installed jdk1.4 and set the following environment variables (See Below), have rebooted my system (See System Description Below) and have yet to be able to perform anything more than simply javac <class.java>.
That is to say, I can compile something as simple as:
public class test {
public static void main(String[] args) {
System.out.println("No..not the dark side");
}
}
yet when executing the commnad:
java test
I get the message:
NoClassDefException: test

PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\j2sdk1.4.0;C:\j2sdk1.4.0\bin;C:\Program Files\Common Files\Adaptec Shared\System;C:\cygwin\bin;C:\cygwin\sbin
CLASSPATH=C:\j2sdk1.4.0\lib
System Description:
Win2k SP2
Tyan board with dual 1.33 MP Athlons...
512 mb 2100 DDR ECC Registered Ram
What is interesting is that I am only unable to execute java apps on my personal system. When I downloaded the 1.4.0 jdk to my computer at work I compiled and ran the above application without incident. The only diffrences between the two systems is the hardware...still x86 with W2k sp2 though.
Has anyone else had problems executing even the simplest of applications? Has anyone found a solution? Hava I just completely lot it?
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
You need to add the current directory to your classpath, ie, "./".


Rob
SCJP 1.4
Jason Travis
Greenhorn

Joined: Feb 22, 2002
Posts: 14
Originally posted by Rob Ross:
You need to add the current directory to your classpath, ie, "./".

There is something else that is not correct as I have tried ./ .\ \. /. and even . none of which work and I still get the same error message.
Jason Travis
Greenhorn

Joined: Feb 22, 2002
Posts: 14
Ok...I have discovered that one does not need to specify the current directory in their PATH environment variable.
One simply must put the path to the 1.4 bin directory at the end of there path...as I tried a few moments ago and can now finially compile and run java apps.
PATH=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System;C:\cygwin\bin;C:\cygwin\sbin;C:\j2sdk1.4.0\bin;
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
also, discover how to change your name that it will be according to the rules of this forum!
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
J
Like Roy mentioned please read our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy.
Thanks again and we hope to see you around the ranch!!


Dave
Jason Travis
Greenhorn

Joined: Feb 22, 2002
Posts: 14
Oops...sorry about that Cowboys...
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
Jason_Travis,

Thanks for changing your displayed name from the previous unacceptable displayed name, but an underscore in your account name isn't the same as a space. Please change it again to conform to the rule:

firstName (space) lastName

Thanks.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NoClassDefException in 1.4