Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

NoClassDefException in 1.4

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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;
 
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
also, discover how to change your name that it will be according to the rules of this forum!
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oops...sorry about that Cowboys...
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic