Welcome! Register for a free account (or login) > How does it work?
|
|


Dec 7 2008, 02:31 AM
Post
#1
|
|
|
Authentic Member ![]() ![]() Group: Authentic Member Posts: 30 Joined: 5-July 07 Member No.: 71,221 Operating System: Windows XP Home Edition SP2 |
I load up my .java file, compile it, and run it, and it comes back with the error: Exception in thread "main" java.lang.NoClassDefFoundError: helloworld Press any key to continue . . . I know it's something I've completely overlooked, and theres a real easy fix to it, just for the life of me I can't remember how to get it to include that class file. |
|
|
|
![]() |
Dec 7 2008, 11:29 AM
Post
#2
|
|
![]() SuperMember Group: Tech Classroom Posts: 2,709 Joined: 21-March 06 From: Australia Member No.: 52,151 Operating System: Windows XP/SP3 |
Hi txman,
Have a look in Add and Remove, if you have old Java utilites present uninstall them manually or download and run JavaRa.exe to do it for you. The latest Java Runtime Environment can be found here. You do need to keep Java up to date as old versions are vulnerable to your system and should always be removed before installing the newest version. Kind regards, |
|
|
|
Dec 7 2008, 12:26 PM
Post
#3
|
|
![]() Classroom Administrator Group: Classroom Admin Posts: 9,670 Joined: 18-November 04 From: Canada Member No.: 18,614 Operating System: xp sp3 |
Here's a little research that may or may not assist
Classpath is not correctly set. Read documents http://java.sun.com/j2se/1.5.0/docs/tooldo...ex.html#general Setting the Classpath How Classes are Found Basic Tools - javac Basic Tools - java Problem often occurs when reinstalling Java, easy to fix: right-click on my computer, Properties, select the Advanced Tab, then press the Environment Variables button below and a window pops up. At the bottom all you have to do is delete CLASSPATH and QTJava variables in the list. |
|
|
|
Dec 17 2008, 05:12 PM
Post
#4
|
|
![]() ASCII and ye shall receive. Group: Tech Team Posts: 723 Joined: 9-November 06 From: Somewhere out there Member No.: 64,025 Operating System: XP Pro SP2 |
Also, this link might be beneficial:
Exception in thread "main" java.lang.NoClassDefFoundError |
|
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
2 | MobileMania | 45 | Yesterday, 08:56 AM Last post by: 8210GUY |
|||
![]() |
42 | Ron.M | 541 | 19th March 2010 - 08:33 PM Last post by: Ron.M |
|||
![]() |
9 | solteras88 | 114 | 19th March 2010 - 01:44 PM Last post by: CatByte |
|||
![]() |
12 | lazycoach1 | 170 | 18th March 2010 - 10:26 AM Last post by: ken545 |
|||
|
Time is now: 21st March 2010 - 05:42 AM |