This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Applets and the fly likes Call the main method class in Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Call the main method class in Applet" Watch "Call the main method class in Applet" New topic
Author

Call the main method class in Applet

mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 243

Hi,
I have an applet in which i am calling a swing class main method like this.



When i execute this it is showing what i anticipated. but when i embed my applet in a web application page, it is showing an error message.

I have run my project like the fallowing folder structure(i copied the applet project jar file to current folder and all the jar files used in that project to path)
web
|-----WEB-INF
|
|----- Swing.jar(which has applet class)
|
|----- other jar files(used in swing project)
|
|-----index.jsp

my code in jsp is

please help me
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

applet doesn't have permission to terminate the JVM.


PM Me If You Want to get Urgent Help on Java Programming
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41634
    
  55
In an applet you should use DISPOSE_ON_CLOSE.


Ping & DNS - my free Android networking tools app
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Call the main method class in Applet