Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / April 2006

Tip: Looking for answers? Try searching our database.

I'm at my witt's end...

Thread view: 
jac - 03 Apr 2006 08:47 GMT
I get this when I try to run the simplest program...

Exception in thread "main" java.lang.NoClassDefFoundError: newp

Here are my Windows XP Prof edition's sys variables.
--------------------------------------------------------------
JAVA_HOME = C:\j2sdk1.4.2_11

PATH = C:\Perl\bin\;C:\j2sdk1.4.2_11\bin

CLASSPATH = C:\Program
Files\QuickTime\QTSystem\QTJava.zip;C:\j2sdk1.4.2_11\bin
---------------------------------------------------------------
What else do I need to set?
I did notice that in the Java Control Panel under JNLP Runtime
Settings. The Product says that I'm running jre1.5.0_06\bin\javaw.exe

Could this have something to do with it?

Thank you.

-ac
Bart Cremers - 03 Apr 2006 09:21 GMT
You're not giving quite enough info to solve your problem.

To start I would unset the CLASSPATH variable. Normally there will be
no class structure under jdk\bin and you will not need the QT zip that
often. If you need to set a classpath it's generally better to do it on
the command line:

java -cp C:\Program Files\QuickTime\QTSystem\QTJava.zip ...

Now, assuming you're trying to run a program called "newp":

Make sure that the directory you're running from contains a file
"newp.class".

Simply type "java newp" and it should work if and only if you did not
specify a package for the newp class.

If this does not solve the problem, then you should provide more
information on the problem. Source code, typed commands, directory
structure, full error message, ...

Regards,

Bart
jac - 04 Apr 2006 07:39 GMT
Thanks Bart... that fixed it. I forgot that CLASSPATH was as the name
implies, a path for java class designation... your suggestiong solved
my problem.

-ac
Roedy Green - 03 Apr 2006 10:25 GMT
>NoClassDefFoundError

see http://mindprod.com/jgloss/caq.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.