Start jnlp that has expired and can no longer be started without using Java Web Start

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. ** **

Conclusion

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.

  1. Combine <jnlp codebase =" http: /127.0.0.1/application "> and <jar href =" main.jar "/> and fetch with curl

  2. Pass the path of the file downloaded with java -cp The path doesn't go well with -cp and -jar

  3. <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. .. ..

<jnlp codebase="./lib/">

Recommended Posts

Start jnlp that has expired and can no longer be started without using Java Web Start
Problems that can easily be mistaken for Java and JavaScript
After using Android Studio 3, Java application dependencies can no longer be resolved, so what to do about it
Ruby 2.7.2 has been released and deprecated warnings will no longer be issued by default
Compiled kotlin with cli with docker and created an environment that can be executed with java