ClassDefNotFound and Cannot find Symbol: Fix

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Avatar
Posts: 2
Joined: Mon Oct 24, 2005 12:12 am

ClassDefNotFound and Cannot find Symbol: Fix

Post by Avatar »

The following will set textpad up so that it correctly compiles and runs java source files in the default package (ie java files without a 'package myPackage;' type header).

This will fix the problem where textpad cannot find classes in the same directory as the current java file, giving a 'Cannot fin symbol: ...' error message.

1.) Install JDK 1.4.2 or 5.0

2.) Set Path variable to include the JDK bin directory
e.g. Path: C:\Windows\System32;C:\Program Files\Java\jdk1.5.0_05\bin

3.) Look for and delete any variable called 'ClassPath'.

After this textpad should compile with the usual control-1 shortcut.

I have a feeling that only the JDK 1.4.2 creates a variable called 'classpath', and that 5.0 doesn't. I can't verify this however.

Tested under WinXP sp2, textpad 4.7.3, jdk 5.0
richY
Posts: 2
Joined: Fri Nov 18, 2005 2:51 pm

Post by richY »

Many thanks! I am taking a two semester course in Java programming, and I am weeks behind on homework mostly because of problems with TextPad. I have been trying to resolve this issue for over a month. Most of the other posts suggest manipulating the classpath variable, which I have done countless times. I was only able to restore order when I deleted the classpath variable, as you have suggested. Again, many thanks. RICH Y
Sari
Posts: 1
Joined: Sat Jan 28, 2006 8:37 pm

:D

Post by Sari »

Thank you thank you thank you!! 'Twas driving me crazy that I could run applets, but not applications! (and I was getting really tired of working at school on my assignments :P)

I was getting an "Exception in thread "main" java.lang.NoClassDefFoundError:" error. Highly annoying, and now very fixed! :D:D

On the bright side, I found this forum so I can check it for further help in the future... which I'm sure I'll need... :roll:
There are 10 types of people in this world: those who know binary and those who do not.
Avatar
Posts: 2
Joined: Mon Oct 24, 2005 12:12 am

Post by Avatar »

This thread also has an explanation and a (better) workaround for this problem.
tpot6
Posts: 1
Joined: Sun Sep 17, 2006 2:31 am

stil does not work

Post by tpot6 »

im sorry but what do you mean by path name? where do i put that and stuff


thanks
User avatar
Nicholas Jordan
Posts: 124
Joined: Mon Dec 20, 2004 12:33 am
Location: Central Texas ISO Latin-1
Contact:

Re: stil does not work

Post by Nicholas Jordan »

tpot6 wrote:im sorry but what do you mean by path name? where do i put that and stuff
thanks
It is a holdover from the days when Bill Gates honestly laughed at the thought that anyone would need more than 640k on a computer.

It means the operating system stores some information in the form of name=value, as you would normally type it in on the screen.

It goes in Autoexec.bat, in the root of C: - there seems to be several text files in various places that are consolodatedby the operating system (nowdays) into the "Registry" ~ which sorta leads into nearly the same problems.

Today, 640k won't even get you a screen and a keyboard .... but heavywight systems still rely on this manner of user-input because one can read it, the computer can parse it, and if you really need a window .... at least keep that mentally separated from a text-based input .... which is what the original question drives towards. :idea:
The only dumb question is one you should have asked and didn't.
Post Reply