• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A Silly question

 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic