Discussion Locked

compiles fine but won't execute.......

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I just created a simple applet in java using textpad. I debugged it and then compiled. Textpad said "Tool completed successfully" which is what it usually says when the program should work, however when I ran the applet from text pad the program wouldn't execute. Then I executed it from firefox and at the bottom of the browser it said "Applet notinited" and "Loading Applet Failed". I then opened up the java console and it said "NullPointerException". Well this whole concept of the program compiling successfully and then not excecuting is tottally new to me.... It won't even initiate and show logic errors....

If anyone knows what this is or can provide examples it would be greatly appreciated. I'd rather not send the source to anyone , but if they need it I can (send an email to diazolidineyl@gmail.com). However don't tell me the answer! Also I've only been programming since Jan. So I know there are a lot of other mistakes.

One more question. I know when programming applications in java you can use escape characters to format your text is there anything equivalent in creating applets???

Many Thanks

-Tim

7 replies

by roger.hunt2

Check your parameters for the 'Run Java Applet' tool. It is probably the access path or parameter on the command. To check select 'Configure' from the menu, then 'Preferences' and expand 'Tools'. Now click on the 'Run Java Applet' and you will see the parameters for the command. Mine shows
1) Parameters = $BaseName
2) Inital Folder = $FileDir.

If this does not work or your setup is the same look at the help. There is a list of substitutions you can use. Try a couple of different ones until you get it to work.

I think my setup requires the Class to be in the same directory as the source.

by riversstephanie

Could be a number of things send source!
NullPointerException is a common error for newbies. I got some time let me know.

This discussion is closed to new replies.