Paweł K
Paweł K

Reputation: 221

Java Web Start Security errors

I'm migrating program from JApplet to Java Web Start and I have security problems. My program is signed with my company's certificate and I also added my site to exception list in Java Control Panel but it still gives me this error:

enter image description here

My Java Exception Site list:

enter image description here

My JNLP file looks like this:

<?xml version="1.0" encoding="utf-8"?>

<jnlp spec="1.0+" codebase="http://10.13.3.68:8000/"
      href="myapp.jnlp">
  <information>
    <title>My app</title>
    <vendor>My Company</vendor>
    <description>My description</description>
  </information>
  <resources>
    <j2se version="1.8+"/>
    <jar href="myapp.jar" main="true"/>
    <jar href="myappResources.jar"/>

  </resources>
  <application-desc 
      main-class="MainForm"
  />
</jnlp>

I use java 1.8.0_73. Jar files were properly signed by jarsigner. Do you have any idea how to launch the app with Web Start without this error? HTTP server is on my local PC. When I tried small "Hello World" like apps(they weren't even signed!) with JNLP - they worked. I don't know why I get error with this program.

Upvotes: 2

Views: 1083

Answers (1)

Paweł K
Paweł K

Reputation: 221

After changing my jar manifest file attributes:

Codebase: *
Caller-Allowable-Codebase: *

And adding these lines to my JNLP file:

  <security>
    <all-permissions/>
  </security>

It started working.

The problem was probably that I had

Permissions: all-permissions

in my manifest file and I didn't have proper attribute set in JNLP file.

Second problem was that I forgot to change codebase in my manifest file - I had specific IP there that I was not using anymore.

Upvotes: 1

Related Questions