wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes A Silly question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "A Silly question" Watch "A Silly question" New topic
Author

A Silly question

Hui Zhao
Ranch Hand

Joined: Jul 09, 2007
Posts: 116
I developed a mixture of a GUI a 2D application.Then I want deploy it into a html web page.
My question is how many ways for doing it?
Which way is the best?

Thanks
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

There are two primary ways you could do it.

1) As an Applet
2) Using Java Web Start (JWS)

To deploy as an Applet, you would need to do some modification to your code so that it is an Applet, rather then an application. Using JWS, you can basically deploy your application as is.

The main difference is that an applet runs "inside" the web page. Just like all those wonderful advertisements on web pages today that use Flash, the applet appears within the web page. If the user closes the browser, or navigates away from the page, the Applet stops.

Using JWS, the application runs outside the web page (and outside the browser). In other words, it runs as if the user had it installed on their computer. And as mentioned above, if you go the Applet route, your program must extend either Applet or JApplet (which is a subclass of Applet).

The "tricky" part of both of these technologies is that you do not know what (if any) version of the JRE the user has installed on their computer. There are ways to set a minimum requirement in the deployment code. So if your Application needs Java version 1.5 or later, and the user has 1.4.2 installed, an installer is automatically launched to install the 1.5 version (assuming you set up your JWS JNLP page or your Applet's <object> tag correctly).

Take a look at the Sun's Java Web Start Documentation - there are developers guides and how to get started guides. There is also a JWS forum here at JavaRanch, as well as a forum on Applets.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A Silly question
 
Similar Threads
I Was Unable To Do The Drag and Drop Question At The Exam
fname ???
this below gives 192.168.10.2 well in which case this gives 127.0.0.1
byte range...
Doubt on EL