This discussion is archived
1 2 3 Previous Next 32 Replies Latest reply: Oct 29, 2013 7:26 AM by TerDale Go to original post RSS
  • 15. Re: Java 7 u45 Web Start application won't launch
    user4754121 Newbie
    Currently Being Moderated

    This work for the demo app but not for the eclipse app.

    The launcher starts but the execution fail with following error.

     

     

    at org.eclipse.equinox.launcher.WebStartMain.basicRun(WebStartMain.java:78)

        at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

        at org.eclipse.equinox.launcher.WebStartMain.main(WebStartMain.java:57)

        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)

        at java.lang.Thread.run(Unknown Source)

     

     

    The line where Launcher fail:

    System.getProperties().put(PROP_FRAMEWORK, fwkURL);

    Seems to be insufficient permissions.

     

    Attirbutes:

    Application-Name: xxxx

    Codebase: *

    Permissions: all-permissions

    Trusted-Only: true

    Trusted-Library: false

     

    Attirbutes Case2:

    Codebase: *

    Permissions: all-permissions

    Trusted-Only: false

    Trusted-Library: true

     

    !ENTRY org.eclipse.osgi 2 0 2013-10-21 11:45:26.978

    !MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:

     

    Bundle are not found, unknown Application ID.

     

    So this does not help for me and anyone who want to start eclipse based app with webstart 7U45.

     

    Andreas

  • 16. Re: Java 7 u45 Web Start application won't launch
    beda304d-4f2b-4dd2-8ec7-0b5246984eb2 Newbie
    Currently Being Moderated

    I found that I had to re-sign all of the Eclipse jars and add Trusted-libarary: true and Permissions: all-permissions to each one to get the RCP app to launch without warnings.

  • 17. Re: Java 7 u45 Web Start application won't launch
    Wolfgang Newbie
    Currently Being Moderated

    Exactly, I did not mention this before because it was kind of obvious to me, I also changed the manifests of all the eclipse-jars and resigned them.

  • 18. Re: Java 7 u45 Web Start application won't launch
    user9146454 Newbie
    Currently Being Moderated

    beda304d-4f2b-4dd2-8ec7-0b5246984eb2 wrote:

     

    I found that I had to re-sign all of the Eclipse jars and add Trusted-libarary: true and Permissions: all-permissions to each one to get the RCP app to launch without warnings.

    Trusted-Library: true has known compatibility issues with Update 45, so for those landing here from a Google search, please read this article first.  It may have solved some Eclipse RPC issues, but it will cause an additional dialog to be shown every time for those programmers using JavaScript/LiveConnect.  Here's the link again:

     

    https://blogs.oracle.com/java-platform-group/entry/7u45_caller_allowable_codebase_and

     

    Straight from the horse's mouth (so to speak), here's the quote from the article that says NOT to use Trusted-Library:

    The workaround for end-user dialogs is described on the 7u45 release notes, which explains removing the Trusted-Library attribute for LiveConnect calls in favor of Caller-Allowable-Codebase. This provides necessary protections (without warnings) for all users at or above the security baseline. Client installations automatically detect updates to the secure baseline and prompt users to upgrade.

    -Tres

  • 19. Re: Java 7 u45 Web Start application won't launch
    user4754121 Newbie
    Currently Being Moderated

    Ok, I was at this point for some day´s.

    I use Trusted-Library=true eclipse starts without the warning. But it did not run. It seems for me like a missmatched jnlp config or so. If I start it Trusted-Library=false everything run but I got the warning. I`m realy confused.

    Is it possible to get the a jnlp file which works for an rcp/eclipse application?

  • 20. Re: Java 7 u45 Web Start application won't launch
    beda304d-4f2b-4dd2-8ec7-0b5246984eb2 Newbie
    Currently Being Moderated

    Keep in mind that properties you're sending in the JNLP now don't get sent to your application unless you have a signed JNLP. See my comment #10 in this thread...it sounds like you need to switch how you send parameters to the Eclipse code.

     

    - Dylan

  • 21. Re: Java 7 u45 Web Start application won't launch
    user4754121 Newbie
    Currently Being Moderated

    Pls remember my application runs. The only change I made is to the Trusted-Library=true ever things else remains. I can switch between them.

    My jnlp is a part of the launch plugin with the required path an filename "JNLP-INF/APPLICATION.JNLP". I got also errors if some difference between there.

    As far as I know the properties will be ignored if the JNLP is unsigned. But signed JNLP could use properties as used till now. I commit this. I try also your suggestion #10.

    I think the problem is in the range of codebase of the xml jnlp tag.

    Therefor I am interested on a working JNLP which a rcp/eclipse app starts.

  • 22. Re: Java 7 u45 Web Start application won't launch
    user9146454 Newbie
    Currently Being Moderated

    beda304d-4f2b-4dd2-8ec7-0b5246984eb2 wrote:

     

    Keep in mind that properties you're sending in the JNLP now don't get sent to your application unless you have a signed JNLP. See my comment #10 in this thread...it sounds like you need to switch how you send parameters to the Eclipse code.

     

    - Dylan

    Dylan,

     

    I tried researching the signed JNLP and it seemed like an unofficial specification and couldn't determine how far back this was supported.

     

    I for one would like to create a signed JNLP especially if it resolves issues.  Can you link to a good tutorial for this?  Since the JNLP is simply an XML file, I didn't know where to start, since most signed items in Java tend to be JAR files....

     

    Thanks in advance.

     

    -Tres

  • 23. Re: Java 7 u45 Web Start application won't launch
    sbrodrigues Newbie
    Currently Being Moderated

    Hi Wolfang,

     

    I am facing the same problem of dynamically generating the JNLP and hence cannot sign it. I tried passing the properties as arguments as you suggested but could not get the property in my main class. Note that my Main Class is home grown wrapper class that calls the Eclipse Main class

     

    Original.

    <property name="webrcp.location" value="https://localhost/Generator"/>

     

     

    After Option # 1 ( Does not work.. gives webrcp.location not found. )

    <application-desc main-class="com.webstart.Main">

    <argument>-webrcp.location</argument>

    <argument>https://localhost/Generator</argument>


    After Option # 2 ( Does not work.. gives webrcp.location not found. )

    <application-desc main-class="com.webstart.Main">

    <argument>-Dwebrcp.location=https://localhost/Generator</argument>

    </application-desc>


    Ideas... anything I am doing wrong? Thanks for your help.


    -Rodrigues



     



  • 24. Re: Java 7 u45 Web Start application won't launch
    beda304d-4f2b-4dd2-8ec7-0b5246984eb2 Newbie
    Currently Being Moderated

    Rodrigues,

     

    Is webrpc.location something you pick up in your code? I had one custom (not OSGi) argument that I was using. After changing the JNLP from property elements to argument element, I had to change my Java code from System.getProperty(MY_PROP) to

    String myProp = null;

    String[] commandLineArgs = Platform.getCommandLineArgs();

                    for (int x=0; x < commandLineArgs.length; x++){

                        if (commandLineArgs[x].contains(MYPROP)){

                            myProp = commandLineArgs[x + 1];

                            break;

                        }

                    }

  • 25. Re: Java 7 u45 Web Start application won't launch
    user9146454 Newbie
    Currently Being Moderated

    I examined the JavaDetection.jar and it seems to use this technique [tinyurl.com].  I know this doesn't help the dynamically generated jnlp users out there (sorry!), but since I use a static jnlp, I'm going to try this tonight.

     

     

    Coderanch to the rescue (again) [coderanch.com]

    Reading the JNLP Spec (JSR-56)

    Section 5.4.1 SIGNING OF JNLP FILES states:

    A JNLP file can optionally be signed. A JNLP Client must check if a signed version of the JNLP file

    exists, and if so, verify that it matches the JNLP file that is used to launch the application. If it does not

    match, then the launch must be aborted. If no signed JNLP file exists, then the JNLP file is not signed,

    and no check needs to be performed.

     

     

    A JNLP file is signed by including a copy of it in the signed main JAR file. The copy must match the JNLP file used to launch the application. The signed copy must be named:JNLP- INF/APPLICATION.JNLP. The APPLICATION.JNLPfilename should be generated in upper case, but should be recognized in any case. The signed JNLP file must be compared byte-wise against the JNLP file used to launch the application. If the two byte streams are identical, then the verification succeeds, otherwise it fails. As described above, a JNLP file is not required to be signed in order for an application to be signed. This is similar to the behavior of Applets, where the Applet tags in the HTML pages are not signed, even when granting unrestricted access to the Applet

     

     

    -Tres

  • 26. Re: Java 7 u45 Web Start application won't launch
    Wolfgang Newbie
    Currently Being Moderated

    AAFAIK "-D<property>" is also considered "insecure".

    I did not use arguments but simply transformed my properties into "secure" ones by adding the "jnlp."-prefix, my custom launcher iterates through all properties and removes the prefix again so that the following code works just like before.

     

    This is what I used as wrapper:

     

    import org.eclipse.core.launcher.WebStartMain;
    import java.util.Properties;
    
    class WrapperMain
    {
     public static void main(String... args)
     {
              Properties props = System.getProperties();
              for (String key : props.stringPropertyNames()) {
                   if(key.startsWith("jnlp.")) {
                        System.setProperty(key.substring(5), props.getProperty(key));
                    }
              }
        
        org.eclipse.core.launcher.WebStartMain.main(args);
      }
    }
    

     

    Probably not the most elegant solution but I did not have to modify any subsequent code and could continue to use all properties like before.

     

    Before:

     

    <property name="osgi.clean" value="true"></property>



    After:

     

    <property name="jnlp.osgi.clean" value="true"></property>

     

     

    Hope that helps

     

    Wolfgang

  • 27. Re: Java 7 u45 Web Start application won't launch
    sbrodrigues Newbie
    Currently Being Moderated

    Wolfang,

     

    The jnlp. prefix did the wonderful trick for me ! Thank you much ! Not sure how simply adding a prefix like that makes the properties more secure though. But regardless many thanks to you and the community !!

     

    -Rodrigues

  • 29. Re: Java 7 u45 Web Start application won't launch
    user4754121 Newbie
    Currently Being Moderated

    Read this thread:

    http://stackoverflow.com/questions/19394570/java-jre-7u45-breaks-classloader-getresources

     

    This is exactly what I mean and the eclipse launcher do that.

    So I can´t understand how you are got a rcp/swt application to run.

    I use an E3.7.2 target, but I also looked at 4.3 and this launcher do the same, so the behavior should also the same.

     

    Now I got the properties to run thanks for the sample code.

    If a JNLP is signed, unsecured properties work!

    Only on unsigned JNLP is a workaround necessary. I use a dynamic JNLP this is the better solution for me.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points