General discussion

Locked

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

By diazolidineyl ·
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

This conversation is currently closed to new comments.

7 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by delaware_samurai In reply to compiles fine but won't e ...

I am quite sure you need to view it in an applet viewer or a web page.

Collapse -

by diazolidineyl In reply to

Poster rated this answer.

Collapse -

by Roger.hunt2 In reply to compiles fine but won't e ...

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.

Collapse -

by diazolidineyl In reply to

Poster rated this answer.

Collapse -

by riversstephanie In reply to compiles fine but won't e ...

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

Collapse -

by diazolidineyl In reply to

Poster rated this answer.

Collapse -

by diazolidineyl In reply to compiles fine but won't e ...

This question was closed by the author

Back to Web Development Forum
7 total posts (Page 1 of 1)  

Related Discussions

Related Forums