0

I am trying to launch my JAR , that contains spring-boot API , through JNPL but I am getting :

java.lang.IllegalStateException: Unable to determine code source archive from \\localhost:8080\webstart\printer-api\printer-api.jar
at org.springframework.boot.loader.Launcher.createArchive(Launcher.java:126)
at org.springframework.boot.loader.ExecutableArchiveLauncher.<init>(ExecutableArchiveLauncher.java:38)
at org.springframework.boot.loader.JarLauncher.<init>(JarLauncher.java:35)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)

My JNLP file is this :

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/webstart/printer-api" href="printer-api.jnlp">
    <information>
        <title>PrinterAPi</title>
        <vendor>ADM</vendor>
        <homepage href="http://localhost:8080/webstart/printer-api"/>
        <description>Web Start</description>
        <offline-allowed/>
    </information>
    <security>
        <all-permissions/>
    </security>
    <resources>
        <j2se version="1.8+"  href="http://java.sun.com/products/autodl/j2se"/>
        <jar href="printer-api.jar" />
    </resources>
    <application-desc main-class="org.springframework.boot.loader.JarLauncher" />
</jnlp>

I have also find what cause the problem in this : Exception when using Spring Boot and Java Web Start (JNLP)

But there was not provide any exact way to solve the problem .

Can anyone help me with a convenient path to Launch JAR(Sprint-Boot API) through Java Web Start/JNPL ?

Ariel
  • 1
  • 2
  • JNLP is not provided or supported in recent versions of java. Before it was deprecated security was tightened significantly. Please provide more detail. – Thorbjørn Ravn Andersen Apr 04 '23 at 18:57
  • I am using Java 8 for my API .Also I have manage to create a JNLP file and add both the JAR(Spring-boot) and JNLP to my web server(Tomcat). When I hit the specific URL , that I have provide inside JNLP , JNLP file is downloaded in my PC . The problem is that when I try to launch the API through the JNLP using Open Web Start / Java Web Start , the is this Exception that I keep getting. The hole problem is with spring-boot and if you see the link that I have include in my question above you will understand why does the Spring-Boot throw this Exception . Is there any way to solve it? – Ariel Apr 05 '23 at 08:04

0 Answers0