Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NoClassDefException in 1.4

 
Jason Travis
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to add the current directory to your classpath, ie, "./".
 
Jason Travis
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
also, discover how to change your name that it will be according to the rules of this forum!
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!
 
Jason Travis
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops...sorry about that Cowboys...
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic