0

I'm trying to figure out why my jnlp file isn't working. I'm new to all this so I'd like to check if I did everything correctly. I made a project with JavaFX, in which main class is called Main.java, and then created ExecutableJar file myApp.jar. When I double click on this jar, it opens up and everything works perfectly. Then I tried creating a jnlp file with the same name as my jar file, myApp.jnlp. I did it like this:

<jnlp spec="1.0+" 
    codebase="url of my site here"
    href="myApp.jnlp">

    <information>
        <title>My Title</title>
    </information>

    <resources>
        <j2se version="1.6+"/>
        <jar href="myApp.jar" main="true" /> 
    </resources>

    <application-desc
        name="Application"
        main-class="Main.class"
    <application-desc>

    <update check="background" />
</jnlp>

In an html file I added it like this:

<a href="myurlhere/myApp.jnlp">LAUNCH</a>

Since I don't have any certificate for my jar file, I added url to my file into Exception Site List in Java Control Panel/Security. But when I try to run it I get an exception com.sun.deploy.net.FailedDownloadException: Unable to load resource: https://myUrlHere/myApp.jnlp I have tried many solutions, including granting all permission in java.policy files, but nothing helped. When I tried it on another computer, on which I haven't tried any weird solutions before I got an error: "Could not find main-class Main in myUrlHere/myApp.jar" Am I doing something incorrectly? I tried running it locally, but it was even worse then. I tried to follow this tutorial: https://www.youtube.com/watch?v=BKuCfNNely4, but instead I used my school server.

NotStudent
  • 39
  • 1
  • 10
  • The Java Plug-In which is needed for JWS or applets has been deprecated and removed from most browsers. *"I added url to my file into Exception Site List in Java Control Panel/Security"* The exception site list has not worked for an even longer time. Moot point, but you must be using a v. old browser and Java version. – Andrew Thompson Jun 10 '19 at 02:16
  • @AndrewThompson so how can I run it then? Do I need a certificate? Although when I click the button on my site I download the jnlp file, my browser doesn't even try to run it. So I'm trying to run it basically via double clicking jnlp file. I don't know if that helps with this whole plug-in situation. – NotStudent Jun 10 '19 at 08:23
  • I'd offer the user a downloadable [application installer](https://docs.oracle.com/javase/8/docs/technotes/guides/deploy/self-contained-packaging.html). – Andrew Thompson Jun 10 '19 at 08:58

0 Answers0