简体   繁体   中英

How can I launch Java Web Start locally

I am attempting to replace all of my Applets with Java Web Start applications. The problem I am having is that I have not seen any examples where the codebase attribute is specified as a directory within the local file system. I have tried setting the codebase to the directory that contains both the JNLP file and the executable JAR in each of the following ways:

codebase="file://users/mystuff" href=myJWS.jnlp"

codebase="http://localhost/users/mystuff" href=myJWS.jnlp" 

When I attempt to launch the JWS app I get an application error that tells me:

Unable to launch application.
Component:  file://users/myStuff/myJWS.jnlp

OR

Component:  http://localhost/users/myStuff/myJWS.jnlp
Reason: Unable to load resource

It looks to me like I am specifying the codebase incorrectly. Any ideas about how to fix this.

The local file protocol needs three forward slashes:

codebase="file:///F:/users/mystuff" href=myJWS.jnlp"

Don't forget to add the exception to the exception site list in the java console security panel. You can be as specific as you like or add the whole drive for testing:

file:///F:/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM