Java security is getting stricter and tighter. I feel like Ora * le is telling me to quit Java.
When I was asked to issue a digital certificate because the certificate was about to expire, I received a USB that can only be recognized by WinPC. But I don't have WinPC at hand. I have a test environment, but I can't boot from jnlp because I can't sign.
So, I'm going to launch the app without using Java Web Start. ** Note: For testing purposes only. Not recommended. ** **
Suppose you have a jnlp file that looks like this.
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <jnlp codebase="http://127.0.0.1/application/"> <information> <title>test_project</title> <vendor>Kai Shoya</vendor> <description/> </information> <resources> <jar href="main.jar"/> <jar href="library.jar"/> <j2se version="1.7+" initial-heap-size="512m" max-heap-size="1024m"/> </resources> <application-desc main-class="com.example.test.Main"/> <security> <all-permissions/> </security> </jnlp>
Do it this way. (vocabulary...
#!/bin/bash URL="http://127.0.0.1/application" SCRIPT_PATH="$(cd $(dirname $0); pwd)" LIB_PATH="$SCRIPT_PATH/lib" mkdir -p $LIB_PATH cd $LIB_PATH curl -O "$URL/main.jar" curl -O "$URL/library.jar" java -cp "$LIB_PATH/*" com.example.test.Main
There are three points.
<jnlp codebase =" http: /127.0.0.1/application "> and
<jar href =" main.jar "/> and fetch with curl
Pass the path of the file downloaded with
The path doesn't go well with -cp and -jar
<application-desc main-class =" com.example.test.Main "/> is the main class name
Please note that even if you rewrite jnlp like this, a security error will occur. It took hours to resolve this. .. ..