Implementing Java Web Start may need to pay attention to the following questions:
1. JAVA Web Start has been brought by JDK1.4, but it also needs to be manually founded to find JDK1.4
The Javaws *** installation file is running in the record will install Java Web Start.
D: / program files / java web start directory, pay attention to run Java online
The program will be downloaded to the directory after the program of Web Start. Javaws / Cache directory.
2. Be aware of the configuring web sever, such as JRUN, you need to configure Web Application -> Demo -> Mime Type Mapping, where you want to add new MIME types:
JNLP: Application / X-java-jnlp-file
JAR: Application / X-java-jnlp-file
Other Web Sever, such as Tomcat, may have to modify the web.xml file manually, add as follows:
Application / X-java-jnlp-file
Mime type>
If you do not perform the above configuration, you run the * .jnlp file directly in the browser directly, only the text in * .jnlp, in fact, the above process is equivalent to the association with the .jnlp suffix, make sure you can return in your browser. The correct MIME type.
3. Format of JNLP file
====================================
'Specify the J2SE version 1.0,' UTF-8 'is the encoding format, this code is generally not required.
XML Version = "1.0" encoding = "UTF-8"?>
'Specify the main directory of the Server side
'Setting some information, including: Title, Provider, Description, Home, etc.
'Specify that you want to download to the local JAR file (note that all files need to be packaged to download)
resources>
'Specify the main class at runtime
'You can specify the parameters run, you can have multiple parameters, you can write in parallel.
====================================
** Download Resource Error
The "Download Resource Error" may appear when using Java Web Start, and the approximate error message is as follows:
*********************************************************** *****
JNLPEXCEPTION [CATEGORY: Download Error: Exception: Java.io.IOException: Rename Failed in Cache: LaunchDesc: null] AT .....
*********************************************************** *****
This error is because every time you call Java Web Start, you will find the program to update the program and download the program to the cache directory under the local Java Web Start directory, if Cache
There is already the same name file, and the file is being used, then the newly downloaded file will have a rename failed error, and the local manual is deleted.
The file will also report: the file is being used! Here, Java
The SIGN mechanism in web start may mark each JAR file. Sometimes you see javaw.exe in the task manager, you can delete the local JAR file after termination, indicating This
Some local files may still keep the file lock! Sometimes even if all Java programs are killed even if you take the Task Manager
Still an error, you must log out of Windows, don't know if it is Java Web Start
It's your own problem.
** argument
If you need to deliver the parameters to the * .jar file, you can use the following code:
Sometimes you need to see the information of the system.out.print statement in * .jar, you can open the JWS console, you can set it in the preferences in JWS Manager.
** Security
During the Java Web Start, the local file operation, access remote database, etc. are safe to limit, and if you want to implement these operations, it is generally
Add code in JNLP:
The above code represents all operations, but to achieve this, you need to perform SIGN operations on the * .jar file, which is a safe signature, which can be used.
The KEYTOOL and JARSIGNER tools in JDK are signed, steps are as follows:
** KeyTool
For example: keytool -genkey -alias myself -keypass 888888
'-alias means a pseudonym, to remember this pseudonym, followed by
'-Keypass Enter a password.
The keystore file is usually generated, and KeyTool has some other options to view help in Console.
** jarsigner
For example: jarsigner -alias myself ***. JAR
Jarsigner represents a visa to the JAR program. You can set the all-permissions properties only if the visa program can set.
** Root Certification
You can also choose Root certification in the preferences in JWS Manager.
** CERTIFICATE
The default of the RSA and DSA is used by default in Jarsigner. Some companies also want to buy the Certificate files themselves, but both ways should be running, generally running the Java Web Start program for the first time.
The dialog box will pop up to confirm whether the authentication is recognized.
** Last description
Because it is also a newbie to JWS, there are many problems just awareness. If there is an improper expression or understand the skin, please bear with me.