It's not a secret anymore!*
The moose likes Beginning Java and the fly likes launch java application. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "launch java application." Watch "launch java application." New topic
Author

launch java application.

tim johnson
Greenhorn

Joined: Jul 25, 2001
Posts: 14
Hi,
I would like to know how to launch a java application from an HTML.
Thanks.
Scott Palmer
Ranch Hand

Joined: Jul 11, 2001
Posts: 31
Look at the docs for Java WebStart http://java.sun.com/products/javawebstart/
That's the best bet for launching Java Applications (not applets) from a web page.
tim johnson
Greenhorn

Joined: Jul 25, 2001
Posts: 14
Thanks Scott for the reply.
I installed java web start but get "download error" when I try to run the demo applications, with the following exception:
JNLPException[category: Download Error : Exception: java.net.UnknownHostException: java.sun.com : LaunchDesc: null ]
Can you please help to find what could be the problem?
Also I would like to know whether I can pass arguments to the application when launched using Java Web Start.
Thanks again.
Roy Tock
Ranch Hand

Joined: Jul 16, 2001
Posts: 83
I'm pretty new to Java, so all you ranch hands, please correct me if I'm wrong.
I'm guessing that being able to launch a downloaded java app from a web page would contradict the java security model. From a java app, you can do all sorts of nasty things that an applet shouldn't normally do.
So, in a good way, I'm hoping that you don't find an answer! :-)
Scott Palmer
Ranch Hand

Joined: Jul 11, 2001
Posts: 31
Java WebStart launches the application in a sand box and will specifically ask you to give the application permission to write to the local file sysetm for instance.
Generally applications must be digitally signed and if the signature cannot be validated (a common occurance since most applications seem to be is self-signed jar files) You will be warned and strongly encouraged NOT to allow the program to run. If you choose to ignore this warning then the application will be launched with out the security restrictions such as those normally imposed on an applet.
I have seen problems when I ran using a pre-release JRE. In that case I got some sort of error when WebStart tried to download a JRE that matched what the application was requesting.
As far as I know the application is is launched with no arguments.
 
 
subject: launch java application.
 
Similar Threads
Automatically start java applciation
Setup for Java Application
unix gui problem
Unable to launch the application
How to give Icon to a Jar file ?