wood burning stoves*
The moose likes Java in General and the fly likes is applet still important in java ? 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 » Java in General
Bookmark "is applet still important in java ?" Watch "is applet still important in java ?" New topic
Author

is applet still important in java ?

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, how common the developer still using applet for gui ? thank you !
Cay Horstmann
author
Ranch Hand

Joined: Nov 14, 2004
Posts: 114
    
  10
I am afraid applets are not very common any longer. Sun is valiantly trying to push Java Web Start as an alternative, and I do like Web Start. There is also an effort from Sun to merge the applet and Web Start infrastructure. All of those are good things, but they move at a glacial speed.

And then there is, of course, the browser issue... How many people really want to install the Java Plug-in into IE?

It's too bad. I really like the concept of trying out an app on the web, and of having automatic updates with zero administration. With broadband, download issues aren't what they used to be. Java Web Start has a pretty cool security model that allows for some local file and print access, without requiring certificates. (End-user accepted certificates are evil: "Do you want to grant this application all permissions? Yes/No")

If you are just starting to plan your app, I'd suggest you implement it either as a web-based app, with an HTML interface, or as a Swing app. You can always deploy the Swing app with Web Start if you want internet delivery.

Cheers,

Cay


Author of Java 8 for the Really Impatient
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
Hi Cay,

I havent used Java Web Start before. I would like to know does the Web Start in fact is an improved version of Applet? or it is a different thing?

Nick


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
somkiat puisungnoen
Ranch Hand

Joined: Jul 04, 2003
Posts: 1312
I think, Java WebStart is innovation of Applet but JWS is easy to use and flexible.


SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
Java WebStart is innovation of Applet but JWS is easy to use and flexible.

In which aspects?

Nick
Cay Horstmann
author
Ranch Hand

Joined: Nov 14, 2004
Posts: 114
    
  10
A JWS application doesn't run in a browser (but it can be launched
from a browser--this works through a MIME association)

However, just like an applet, the class files are cached, and there is a mechanism for downloading them again if the version has changed.

And, just like an applet, the JWS application runs under a security manager. There are some nifty improvements in the "sandbox", in particular, dialogs for loading and saving files, and for printing, that tell the user: "Hey, this is untrusted code wanting to do this specific thing, is that ok?"

Ideally, Sun would merge all the advantages, making JWS and applets essentially identical, except that an applet would run in a browser and a JWS app would run standalone. They say they are working on that, but it hasn't happened in Tiger.

Cheers,

Cay
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982

A JWS application doesn't run in a browser (but it can be launched
from a browser--this works through a MIME association)

So, could I say, JWS is a kind of server application (which needs a server to contain it, or it is of a daemon) that interacts with applications via socket or MIME?

Nick
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8904

Originally posted by Nicholas Cheung:

So, could I say, JWS is a kind of server application (which needs a server to contain it, or it is of a daemon) that interacts with applications via socket or MIME?

Nick


There a FAQ for JWS
http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/faq.html


Groovy
Cay Horstmann
author
Ranch Hand

Joined: Nov 14, 2004
Posts: 114
    
  10
No, JWS is not a server application. It consists of

- a client-side program launcher (javaws)
- a MIME association in the browser that associates a launch file (with
extension .jnlp) with javaws

You don't install anything on the server. You merely prepare the launch file and a JAR file. The launch file contains info where to find the jar file, what the app is called, and so on.

Your URL points to the launch file. The browser then says "whoa, a JNLP file, I don't know what to do with that, but wait, there is a helper app that does". So it calls javaws. The javaws app parses the launch file, fetches the JAR file (maybe from cache if there is no need to get a newer version), and launches your app under a security manager.

HTH,

Cay
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Applet has about disappeared from meaningful work in the real world. I still see a few for cool image manipulation and games.

But they're alive and well in the corporate world - captive users with a tightly controlled workstation configuration, including security policies to let Java reach "out of the sandbox". We use them to communicate with other Windows apps and DLLs for things like 3270 emulation and computer telephony integration. We also use them to allow the server to push messages to the user, e.g. a pop-up window that warns users some other system is unavailable for an hour.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
Thanks Cay.

Thus, JWS is just like the old-style Applet that we need to prepare a JAR, in addition with the launch file, then the JAR will be *shipped* to the caller when it is being invoked, isnt it?

Nick
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is applet still important in java ?
 
Similar Threads
Java program protection.
Applet not initialized error
WA #1.....word association
Clock
Clock