Skip to main content
gamedev.net
🔒 Locked

[java] Can't post this...

Started by I Like Bread 2 replies 550+ views
Original Post
I Like Bread
I Like Bread
For some reason, I get redirected to the Forums Home when I click "reply to topic" in the FAQ thread. Anyway, I wanted to add this Q: "Do standalone Java applications and applets run under the same code? If not, how do I account for this while writing?" I.E. Are there guidelines for when I want my app to run strictly from a browser window?
______Numbermind StudiosCurrently in hibernation.
Koroljov
Koroljov
Stand-alone applications need to define the

public static void main(String[] arguments){}

This is the start point of the application.

Applets must be derived from java.applet.Applet, and they usually define the

public void init(){}

as the start point.

The security system of Applets does not allow a lot of things that are allowed in applications, such as writing files and using java.awt.Robot.
Why do my programs never work on other computers?
Strife
Strife
Interesting. I'll let the staff know about the problem.

Thanks for bringing it up. As soon as it gets fixed, I'll add it.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.