java's problems

Posted on 2002-04-16
Last Modified: 2013-11-23
i am now using the SAMS-Teach yourself Java2 in 21 days,but
faced some problems and needed for your help!

firstly,i used jdk1.2.2 version.According to the book,after installing
we might notice that one files installed in the JDK\lib subfolder
called,but i cant find it.I used (Statr|Find|Files and folder)
to search the whole directory C: which i installed but the result was same.

second,i followed the book to set the path and type java -version and the
following displayed :"
java version 1.2.2
Classic VM (build JDK-1.2.2-W,native threads,symcjit)"

After that, i compiled the source files  in the
successfully!A files called HelloDan.class is found in the same folder that
contains But,when i run it,the following error displayed:
'Exception in thread "main"java.lang.NoClassDefFoundError:HelloDan'
and i even followed the book to set the classpath,the same thing happenned.
so ,what should i do?Is there anyway to rectify this problems?

**I am using Windows98,Pentium MMX 200 **
Question by:tmchuan
LVL 19

Accepted Solution

cheekycj earned 50 total points
ID: 6945471
are you running the file using:
java HelloDan

not java HelloDan.class

about the
"With the Java 2 platform, the system classes no longer reside in a zip file (a good idea, considering occasional misguided attempts at unzipping the file). They're now stored in a Java Archive (jar) file. The runtime classes are found in the file rt.jar (located in the jre/lib directory), while the JDK-supported tool classes are found in the tools.jar file (located in the lib directory)." from

LVL 19

Expert Comment

ID: 6945475

Expert Comment

ID: 6945481
try running the java interpreter with the -cp option
including the current directory (assuming you just
compiled it there)
such as:

java -cp . HelloDan

this should pick up the class files from the current directory
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.


Expert Comment

ID: 6946937
check ur CLASSPATH
place . in it

Author Comment

ID: 6954435
Thanks a lots...good luck

Author Comment

ID: 6954442
Thanks a lots...good luck

Author Comment

ID: 6954448
Thanks to mrowka and rjackman ....

Author Comment

ID: 6954453
Thanks to mrowka and rjackman ....
LVL 19

Expert Comment

ID: 6954459
Thanx for the "A"

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 84
jar file executable 12 52
netstat -ano | find "8000" and taskkill /f /pid 2984 3 56
more than one jdk and one jre 1 41
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question