What the Tech logo
Welcome! Register for a free account (or login) > How does it work?
  1. Quickly register. It will only take 60 seconds.
  2. Start a new topic. Ask your question. Wait for an email reply.
  3. Is your system infected? Begin reading the malware removal guide.
register button
Reply to this topicStart new topic
> JAVA Problem, been a long time...
txman
post 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



Hey, I haven't played with JAVA in about three years. I'm using text pad.

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.
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 3)
tallin
post Dec 7 2008, 11:29 AM
Post #2


SuperMember
Group Icon

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,

Go to the top of the page
 
+Quote Post
CatByte
post Dec 7 2008, 12:26 PM
Post #3


Classroom Administrator
Group Icon

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.
Go to the top of the page
 
+Quote Post
Ax238
post Dec 17 2008, 05:12 PM
Post #4


ASCII and ye shall receive.
Group Icon

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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts   2 MobileMania 45 Yesterday, 08:56 AM
Last post by: 8210GUY
No new 42 Ron.M 541 19th March 2010 - 08:33 PM
Last post by: Ron.M
No New Posts   9 solteras88 114 19th March 2010 - 01:44 PM
Last post by: CatByte
No New Posts   12 lazycoach1 170 18th March 2010 - 10:26 AM
Last post by: ken545

RSS Time is now: 21st March 2010 - 05:42 AM
Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk.
Member site: Alliance of Security Analysis Professionals | UNITE Against Malware
Memory Forums | Auto Repair Forum
© Geeks to Go, Inc. | All Rights Reserved | Privacy Policy