Why is it i can compile, but not run a java app or applet?

Using the Java SDK with TextPad

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

Post Reply
Mark

Why is it i can compile, but not run a java app or applet?

Post by Mark »

I'm so frustatrated!

This version of textpad is so messed up!

My error >>>>
java.lang.NoClassDefFoundError: C:\Mark\Java\Welcome4/java
Exception in thread "main"
Tool completed with exit code 1

how do i fix this?
Michael Schneider

Re: Why is it i can compile, but not run a java app or apple

Post by Michael Schneider »

Check the settings of the tool to run a java program. It should have java.exe as command, $BaseName as parameter, $FileDir as folder. With this it runs perfectly on my machine. From the exception you get, it seems to be that the file name is not passed correctly. Or you didn't set the classpath, but if it compiles that should not be the case.
Renee

Re: Why is it i can compile, but not run a java app or apple

Post by Renee »

I am having the same problems as Mark - I can compile Java programs using Textpad 4.5.0 but I can not run them without getting the following message:
java.lang.NoClassDefFoundError: DistanceConvert
Exception in thread "main"

DistanceConvert is the name of the program. I tried what you suggested and it still isn't working, unfortunately. Any other ideas? I would love to hear them since 3 other people have already tried to troubleshoot this problem for me over the last week or so.
Thanks, Renee
Omar Kazmi

Re: Why is it i can compile, but not run a java app or apple

Post by Omar Kazmi »

I also get the same problem,

I am running Windows XP with JDK 1.3.1_02 and did not install Microsoft's VM.
I uninstalled and reinstalled JDK 1.3.1_02 and Textpad, but that still did not seem to work. I created a simple "Hello, World" program and tried to run
it from the command prompt interface, I still received the same error.

Exception in thread "main" java.lang.NoClassDefFoundError: ArrayListTest
Press any key to continue . . .


Someone Please help me!
Kjel

Re: Why is it i can compile, but not run a java app or apple

Post by Kjel »

Thank you michael, that was very helpful.

-Kjel Anderson
Carl Slabicki

Re: Why is it i can compile, but not run a java app or apple

Post by Carl Slabicki »

I get the same error.
what you say for the settings, I have that in the "Run Java Application" section.
Is this correct ?

It compiles OK no errors but get the
"java.lang.NoClassDefFoundError: Filename"

How do I set up the ClassPath ?
Thanks
Carl F. Slabicki
Post Reply