JMX params in jnlp file?

I tried the following entry in jnlp to expose jmx inmy app.
<resources>
<j2se version="1.6.0_12" java-vm-args="-Xverify:none -Xmx1024m -XX:MaxPermSize=128m" href="http://hostname:11931/LB/jre"/>
<property name="com.sun.management.jmxremote.port" value="5432"/>
<property name="com.sun.management.jmxremote.authenticate" value="false"/>
<property name="com.sun.management.jmxremote.ssl" value="false"/>
</resources>  It doesnt seem to work. Can anybody please tell me how to do this in jnlp file.

You probably do hate java, cause it's a really strict language, everything has to be valid (type-safety, catching exceptions, and so on), and this should give some perspective about validation issues. I dont hate java. Just my id.
A forum usually has 3 ways:
a) somebody already managed your same issue through the forum, you just need searching
b) somebody already managed your same issue on his own and happens to be a forum user (this is just luck, and luck is a rare thing!)
c) people with proper knowledge help you out, in this case (looks like your case) you'd better try what you're told, 'cause it may be just a step in a process you don't figure out because of some lack about the whole (otherwise you wouldn't be here in the first place).zzzzzzzzzzzzzzzzzzzzzz
This provided, does your code work as a standalone app (without JWS)? Yea it works. I could connect to it using JConsole
What's the output (with JWS) for System.out.println(System.getProperty(+anyOfYourProperties+))?Yea that works. Just the JMX parameters are eaten away
I don't know much about JMX but I know for sure setting system properties didn't work for me for initial context, even thought the properties where there, I had to pass them explicitly through the proper constructor.Well I know that now. Thanks

Similar Messages

  • ".. access denied: ... jnlp read" error in applet with NO .jnlp file!

    I'm trying to embed a Java program called ImageJA [http://pacific.mpi-cbg.de/wiki/index.php/ImageJA] into a webpage. I'm using ASP.NET with XHTML 1.0. Since I'm embedding it as an object in the html code, it should not cause any issues from that end. Unforunately, when I try I get an error saying "java.security.AccessControlException: access denied (java.util.PropertyPermission jnlp read)". The weird thing is, there is no jnlp file anywhere (including the .jar and codebase).
    I'm able to run it successfully if I change the permissions in my java.policy file, but that solution only works for my local machine.
    The .jar file (the only one) has been signed (I believe). I followed the steps as suggested [http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/guide/plugin/developer_guide/rsa_signing.html], with the exception of contacting VeriSign/Thawte (I wish to have this be self signed).
    This seems like a very odd issue to me, and I'm running out of hair. Can anyone help?
    Here's my html code:
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
    <title>Untitled Page</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <object
    classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    codebase = "[http://java.sun.com/update/1.5.0/jinstall-1_5-windows-i586.cab]"
    width="500" height="500">
    <param name = "code" value = "ij.ImageJApplet.class" />
    <param name = "codebase" value = "ImageJA" />
    <param name = "archive" value = "ij-1.44a.jar" />
    <param name="type" value="application/x-java-applet;jpi-version=1.4.2" />
    <param name="scriptable" value="true" />
    </object>
    </div>
    </form>
    </body>
    </html>
    Edited by: Sythion on Jul 13, 2010 2:19 PM

    Sythion wrote:
    I'm trying to embed a Java program called ImageJA [http://pacific.mpi-cbg.de/wiki/index.php/ImageJA] ..
    I suggest you take up the problem through the [channels suggested by the API developers|http://pacific.mpi-cbg.de/wiki/index.php/Help:Contents].

  • Stop firefox from prompting to open jnlp file

    Love JWS!!
    Works great for me on both IE and FF browsers using a little bit of JavaScript.
    The only drawback I see is that Firefox will prompt the user to open file.jnlp with the default download/open dialog.
    Anyone know how to prevent this?
    Do you implement the JS in a manner that is different, allowing seamless function in FF too?
    heres what my launch page looks like for the notepad example;
    <html>
    <head>
    <meta http-equiv="Content-Language" content="en" />
    <meta name="GENERATOR" content="PHPEclipse 1.0" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Demo Web Launch</title>
    <script language="JavaScript" type="text/javascript"> 
    var detect = navigator.userAgent.toLowerCase();
    var windowsIE = (checkPlatform("msie") && checkPlatform("win"));
    function checkPlatform(string)
        place = detect.indexOf(string) + 1;
        return place;
    </script>
    </head>
    <body bgcolor="#FFFFFF" text="#000000" link="#FF9966" vlink="#FF9966" alink="#FFCC99">
    <script language="JavaScript" type="text/javascript">
      if (windowsIE) {
        document.write("<OBJECT codeBase=http://java.sun.com/update/1.5.0/jinstall-1_5_0_05-windows-i586.cab classid=clsid:5852F5ED-8BF4-11D4-A245-0080C6F74284 height=0 width=0>");
        document.write("<PARAM name=app VALUE=http://java.sun.com/products/javawebstart/apps/notepad.jnlp>");
         document.write("<PARAM NAME=back VALUE=false>");
         document.write("</OBJECT>");
    if (navigator.mimeTypes && navigator.mimeTypes.length) {
         webstartAvailable = navigator.mimeTypes['application/x-java-jnlp-file'];
    if (!webstartVersionCheck("1.5")) {
         window.open("http://jdl.sun.com/webapps/getjava/BrowserRedirect?locale=en&host=java.com",
            "needdownload");
    function webstartVersionCheck(versionString) {
        // Mozilla may not recognize new plugins without this refresh
        navigator.plugins.refresh(true);
        // First, determine if Web Start is available
        if (navigator.mimeTypes['application/x-java-jnlp-file']) {
            // Next, check for appropriate version family
            for (var i = 0; i < navigator.mimeTypes.length; ++i) {
                pluginType = navigator.mimeTypes.type;
    if (pluginType == "application/x-java-applet;version=" + versionString) {
    return true;
    launchTID =setInterval('launchJNLP("http://java.sun.com/products/javawebstart/apps/notepad.jnlp")',
         100);
    function launchJNLP(app) {
    if (webstartVersionCheck("1.5")) {
    clearInterval(launchTID);
    window.location = app;
    </script>
    </body>
    </html>

    Right, well I was more thinking about other end users than myself, and their first visit.
    I think the prompt with an unknown file type might be discomforting for some of my visitors.
    Did I read right however, that with the updates to 1.6 will come a fix to this?
    In other words, Joe Blow, first-timer comes, clicks, and voila! open application, just like IE.
    Thanks!

  • How to embed jnlp file into html page using object tag

    hi everyone,
    i have written one jnlp file like this.
    <?xml version="1.0" encoding="utf-8" ?>
    <!-- JNLP file for Demo applicaion -->
    <jnlp spec="1.0+" codebase="http://localhost:9080/base/" href="SampleExample.jnlp">
         <information>
              <title>Demo Application</title>
              <vendor> </vendor>
              <description>Sample Demo Application</description>
              <offline-allowed/>
         </information>
         <security/>
         <resources>
              <j2se version="1.3+" />
              <jar href="common.jar" main="true" download="eager" />
              <jar href="classes12.jar" download="eager" />
              <jar href="toplink.jar" download="eager"/>
              <package name="com.applet.*" part="applet" recursive="true"/>
         </resources>
         <applet-desc name="grid" main-class="com.applet.PriceGrid" width="1000" height="300"/>
    </jnlp>
    i am trying embed that jnlp file using object tag like
    <OBJECT
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="1000" HEIGHT="300" NAME="grid">     
    <PARAM NAME="jnlp" VALUE="http://localhost:9080/base/SampleExample.jnlp">
    </OBJECT>
    but i am not able to load the applet using Web Start.
    Can anyone please help me. This is very Urgent for me.
    Thanks & Regards,
    Shiva.

    thanks.
    i am giving my problem clearly. i have one applet. Previously i am loading the applet in my html page using object tag like this...
    <OBJECT
    classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH="1000" HEIGHT="300" NAME="grid">
    <PARAM NAME="CODE" VALUE="com.adp.base.applet.PriceGrid.class" >
         <PARAM NAME="ARCHIVE" VALUE="common.jar,classes12.jar,toplink.jar" >
         <PARAM NAME="NAME" VALUE="grid" >
    <PARAM NAME="type" VALUE="application/x-java-applet">
    <PARAM NAME= "cache_option" VALUE ="no">
    </OBJECT>
    now what i need to do is
    i need load the applet only first time using web start and when ever the applet code changes in the server i need to reload the applet.
    for that i kept all the applet resources in .jnlp file.i want to cache all the resources which are in .jnlp file and applet must be displayed within a web page within a browser.
    Webstart always open a new application windows.
    I need to run an Applet embedded within a web page within a browser.
    Is there a way to still use Webstart?

  • Syntax of the JNLP file (web start) for JFX to allow desktop shortcut/icon?

    I'm having a hard time getting this to work. I'm using NetBeans v7.1.2. First of all - the resulting .jnlp file comes with the applet, as well as the application specification. The classloader is different in both of the cases from what I've seen.
    <applet-desc width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback" name="jwsapp" >
    <param name="requiredFXVersion" value="2.0+"/>
    </applet>
    <jfx:javafx-desc width="800" height="600" main-class="jwsapp.Main" name="jwsapp" />
    What I did was edit out the applet part - now there is no entry in the "Type" of application in the javaws cache, it's simply blank. And it's still launched as an applet (judging by the console trace). Now we have "<jfx:javafx-desc", instead of application-desc? What does that affect? Is it safe to just fallback to 'application-desc' (then the type is properly detected)? I haven't been able to find any info on this whatsoever.
    Shortcuts.. I have Java 2.1.1 installed and this:
              <shortcut online="false">
                   <desktop/>
              </shortcut>
    does absolutely nothing for me. The shortcut never appears (even though this addition to .jnlp was designated by NetBeans). Moreover, how would I go about attaching icons to this shortcut?
    Does anyone have a working .jnlp example, that is actually able to allocate a shortcut with a predefined icon on the desktop? Thank you.
    Edited by: 919083 on Aug 12, 2012 5:06 AM
    Edited by: 919083 on Aug 12, 2012 5:07 AM

    It works fine for me.
    I'm using latest FX samples and latest 7u6 on Mac OS X.
    Tested with slightly modified version of BrickBreaker.jnlp that includes
    <shortcut online="false">
    <desktop/>
    </shortcut>
    and the shortcut is always created to me.
    Could you please try the latest 7u6 build?
    If it's still reproducible, please file a new bug at http://javafx-jira.kenai.com/
    and also could you please attach an example to reproduce the problem?

  • ResourceBundles    entry in jnlp file

    Hi,
    To use this Language.properties file is their any entry to be specified in jnlp file , so that it takes lang file from the outside of the jar file.
    Thanks,
    LeoSun.

    You probably do hate java, cause it's a really strict language, everything has to be valid (type-safety, catching exceptions, and so on), and this should give some perspective about validation issues. I dont hate java. Just my id.
    A forum usually has 3 ways:
    a) somebody already managed your same issue through the forum, you just need searching
    b) somebody already managed your same issue on his own and happens to be a forum user (this is just luck, and luck is a rare thing!)
    c) people with proper knowledge help you out, in this case (looks like your case) you'd better try what you're told, 'cause it may be just a step in a process you don't figure out because of some lack about the whole (otherwise you wouldn't be here in the first place).zzzzzzzzzzzzzzzzzzzzzz
    This provided, does your code work as a standalone app (without JWS)? Yea it works. I could connect to it using JConsole
    What's the output (with JWS) for System.out.println(System.getProperty(+anyOfYourProperties+))?Yea that works. Just the JMX parameters are eaten away
    I don't know much about JMX but I know for sure setting system properties didn't work for me for initial context, even thought the properties where there, I had to pass them explicitly through the proper constructor.Well I know that now. Thanks

  • Calling JNLP file via Servlet

    Hi Folks,
    I need to pass runtime parameters to my jnlp file from URL param, like ?requestNum=12345&mergeId=1.
    So I created a Servlet to process the request and add the requestParams at runtime in the JNLP file,
    In the doGet Method I have teh following piece of code,
    String[] args = new String[]{"requsetNum",request.getParameter("requestNum"),"mergeId",request.getParameter("mergeId")};
    response.setContentType("application/x-java-jnlp-file");
    PrintWriter out = response.getWriter();
    //It writes the jnlp content prperly in console,          System.out.println(JnlpFileContentBase.readBeforeArgElementsContent()+JnlpFileContentBase.populateArguments(args)+JnlpFileContentBase.readAfterArgElementsContent());
    //I split the jnlp file content before and after the argument area out.println(JnlpFileContentBase.readBeforeArgElementsContent()+JnlpFileContentBase.populateArguments(args)+JnlpFileContentBase.readAfterArgElementsContent());
    out.close();
    But when i run on server the above the jnlp is not starting up,
    Am i missing something in the doGet method? is the PrintWriter out object is enough to write back the content?
    Please help me to find out what am missing out here.
    Thanks
    Subash

    Hi Andrew,
    Thanks for notifying that, but that due to my testings with several combinations, I copied the file and kept direcly under WEB-INF and under the webapps/ElemFinder and several places to see it could be retried or not. And hence copied one of the errors. Nothing worked btw.
    I suspected initially it could be because of calling another jnlp file, but now i have my consolidated single jnlp file, but still have the FileNotFoundException for the jar file I have,
    sb.append("<jar href=\"WEB-INF/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar\"/>\n"); // code from Servlet
    This is the firs jar resource under the resource elements
    Where I get the Exception,
    java.io.FileNotFoundException: http://localhost:8080/ElemFinder/ElemFinderEngineInvoker/WEB-INF/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
    I think its basically issues with reading the resource files,
    I tried with several options for this file either, placing under WEB-INF, under webapps/ElemFinder ... etc. Nothing seems to be working,
    Any entries to be put in web.xml for this?
    Pls help me to get rid of this....
    Thanks
    Subash
    PS: BTW i dint try in teh util u gave sice the jnlp already is downloading from my App, do you think still needed to check in the util?

  • JNLP file caching

    I have a JNLP file that does not include <offline-allowed/>. How long does JWS cache such a JNLP file?
    The reason I ask is that I had a bug (my fault) with which the JNLP file didn't correctly reference itself---it referenced a non-existent JNLP file. JWS gave me an error, but the JNLP file it listed in the error report was a different JNLP file altogether---one that I was working on earlier, and that didn't even exist anymore!
    How can I make sure the JNLP file is never cached? Do I have to send all sorts of headers to turn of the cache, such as Pragma: no-cache and the like?
    Garret

    Ooh, this is really bad.
    JWS apparently caches the JNLP uses it for any remote JNLP accessed at the same remote URL ignoring any URL query parameters!.
    I have a JNLP that is dynamically generated at example.com/jnlp?param=value
    Once I've downloaded the application, JWS tucks it away and uses it forever and ever!
    If later I try to access a different JNLP at example.com/jnlp?param=anothervalue, JWS completely ignores the contents of the actual JNLP it gets from the web and uses its locally cached version, which of course has a different href than the one that was generated from example.com/jnlp?param=anothervalue. JWS then tries to go get the JNLP from the wrong href, either retrieving a different JNLP or giving an error.
    What can I put in my JNLP to tell JWS not to cache it? Why doesn't JWS look at the whole URL, or look at times and dates, or something rather than just blindly caching my JNLP?
    Garret

  • Trying to call a Java3D application from .jnlp file

    Hi everybody,
    I'm trying to execute a java3D simple program making use of a *.jnlp* file, but isn't working...
    Can anybody help? Thanks in advance.
    This is what I have:
    simple.jnlp
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+"
    codebase="file:///the_path/jnlp/">
    <information>
      <title>Hello JNLP</title>
      <homepage href="http://whatever.com" />
      <vendor>My self </vendor>
      <offline/>
    </information>
    <resources>
      <j2se version="1.2+" />
      <jar href="bin/HelloJava3Da.jar" />
      <jar href="bin/j3dcore.jar" />
      <jar href="bin/j3dutils.jar" />
      <jar href="bin/vecmath.jar" />
    </resources>
    <application-desc main-class="HelloJava3Da" />
    </jnlp>First, I had to generate the HelloJava3Da.jar, which contains HelloJava3Da.class (my program compiled and working when using java command).
    Generation of HelloJava3Da.jar :
    $ jar cf HelloJava3Da.jar HelloJava3Da.class
    $ jarsigner -keystore myKeys HelloJava3Da.jar jdcFinally, when I try to run simple.jnlp, making use of Firefox:
    firefox simple.jnlpThe result is:
    Error: Unexpected exception: java.lang.reflect.InvocationTargetException
    java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.javaws.Launcher.executeApplication(Launcher.java:1272)
         at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1218)
         at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1065)
         at com.sun.javaws.Launcher.run(Launcher.java:105)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.ExceptionInInitializerError
         at javax.media.j3d.VirtualUniverse.<clinit>(VirtualUniverse.java:227)
         at HelloJava3Da.<init>(HelloJava3Da.java:23)
         at HelloJava3Da.main(HelloJava3Da.java:53)
         ... 9 more
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
         at java.security.AccessController.checkPermission(AccessController.java:546)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkAccess(SecurityManager.java:712)
         at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:288)
         at java.lang.ThreadGroup.getParent(ThreadGroup.java:139)
         at javax.media.j3d.MasterControl$16.run(MasterControl.java:3680)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.media.j3d.MasterControl.<clinit>(MasterControl.java:3673)
         ... 12 moreI have already made the same procedure with a none Java3D program (*TheTime.class*) and everything run well... With my java3D program is not...
    TheTime.java
    import java.awt.*;
    import javax.swing.*;
    import java.io.*;
    import java.net.*;
    public class TheTime {
      public static void main(String args[]) {
        JFrame frame =  new JFrame("Time Check");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JLabel label = new JLabel();
        Container content = frame.getContentPane(); 
        content.add(label, BorderLayout.CENTER);
        String message = "missing";
        BufferedReader reader = null;
        try {
          Socket socket = new Socket("time.nist.gov", 13);
          InputStream is = socket.getInputStream();
          InputStreamReader isr = new InputStreamReader(is);
          reader = new BufferedReader(isr);
          reader.readLine(); // skip blank line
          message = reader.readLine();
        } catch (MalformedURLException e) {
          System.err.println("Malformed: " + e);
        } catch (IOException e) {
          System.err.println("I/O Exception: " + e);
        } finally {
          if (reader != null) {
            try {
              reader.close();
            } catch (IOException ignored) {
        label.setText(message);
        frame.pack();
        frame.show();
    HelloJava3Da.java
    import java.applet.Applet;
    import java.awt.BorderLayout;
    import java.awt.Frame;
    import java.awt.event.*;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.universe.*;
    import com.sun.j3d.utils.geometry.ColorCube;
    import javax.media.j3d.BranchGroup;
    import javax.media.j3d.Canvas3D;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    import java.awt.GraphicsConfiguration;
    //import com.sun.j3d.utils.universe.SimpleUniverse;
    //   HelloJava3Da renders a single, rotating cube.
    public class HelloJava3Da extends Applet {
      public HelloJava3Da() {
       setLayout(new BorderLayout());
       GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
       Canvas3D canvas3D = new Canvas3D(config);
       add("Center", canvas3D);
       BranchGroup scene = createSceneGraph();
       // SimpleUniverse is a Convenience Utility class
       SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
       // This will move the ViewPlatform back a bit so the
       // objects in the scene can be viewed.
       simpleU.getViewingPlatform().setNominalViewingTransform();
       simpleU.addBranchGraph(scene);
    } // end of HelloJava3Da (constructor)
      public BranchGroup createSceneGraph() {
        // Create the root of the branch graph
        BranchGroup objRoot = new BranchGroup();
        objRoot.addChild(new ColorCube(0.4));
        return objRoot;
    } // end of CreateSceneGraph method of HelloJava3Da
    //  The following allows this to be run as an application
    //  as well as an applet
    public static void main(String[] args) {
       Frame frame = new MainFrame(new HelloJava3Da(), 256, 256);
    } // end of main (method of HelloJava3Da)
    } // end of class HelloJava3Da

    I have a collection of Java3d applets launched with Java3d:
    http://astral.mobile-visuals.com/3d_visuals.php
    You can compare your code for the page with mine, for instance this one:
    <applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
    width=100%
    height=98%
    archive="astrals.jar,
    http://download.java.net/media/applet-launcher/applet-launcher.jar,
    http://download.java.net/media/java3d/webstart/release/j3d/latest/j3dcore.jar,
    http://download.java.net/media/java3d/webstart/release/j3d/latest/j3dutils.jar,
    http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar,
    http://download.java.net/media/gluegen/webstart/gluegen-rt.jar,
    http://download.java.net/media/java3d/webstart/release/vecmath/latest/vecmath.jar">
    <param name="codebase_lookup" value="false">
    <param name="subapplet.classname" value="OrchideaOptM">
    <param name="subapplet.displayname" value="Orchideic Morph">
    <param name="jnlpNumExtensions" value="1">
    <param name="jnlpExtension1" value="http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp">
    <param name="progressbar" value="true">
    <param name="noddraw.check" value="true">
    </applet>
    -----------------

  • If I want to set -Xbootclasspath , how to do it in jnlp file

    if I want to set -Xbootclasspath to let jvm know my classpath, how to do it in jnlp file. or have other way to do it.

    If I want to orb, (now I am using openOrb) , I had to
    let jvm load Orb which I want to use. Did you put those Orb classes into jars and list them in the jnlp file of your Web Start app?
    Regards,
    Marc

  • JNLP file not opening in Windows 8 and IE 10

    I am trying to launch the ROES ordering tool through WHCC prints and it has always worked on my other IE 10 through Windows 7 but on my new computer with Win 8 I cannot get it to launch because of the JNLP file not opening... and it won't work on desktop
    mode either... What do I need to do??

    Hi,
    Have you installed the java Runtime Environment?
    If not, I would also suggest you to refer to the link to install the latest version of Java:
    http://www.java.com/en/
    Please note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Then follow the link to set default programs as Java for the file:
    Choose the programs
    Windows uses by default
    http://windows.microsoft.com/en-US/windows-8/choose-programs-windows-uses-default
    Hope this helps,
    Ada Liu
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Could not load file/URL (file not found) error for JNLP file

    I am completely baffled in trying to figure out why I am getting the following error for some JNLP files but not others:
    Error: could not load file/URL specified: C:\Users\tom\AppData\Local\Temp\javaws2
    java.io.FileNotFoundException: C:\Users\tom\AppData\Local\Temp\javaws2 (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)I have Googled around this forum and elsewhere, and have seen reports that this error is IE-specific, and seems to have something to do with no-cache headers being sent, or with the client browser's cache being full or turned off (which is not my case). I saw the information in the JavaWS FAQ, which recommended turning off security constraints for the JNLP's URI. I tried that, and it didn't help. One of the very baffling things is that I have created several variations of the JNLP file, with varying combinations of jars and property resources, and some combinations always work while other combinations never work. Here's an example:
    <jnlp spec="1.0+" codebase="$$codebase">
       <information>
          <title>demo app</title>
          <description>illustrates weird bug</description>
       </information>
       <resources>
          <j2se version="1.5+"/>
          <jar href="randomFile.jar"/>
          <property name="xxx" value="xxxx"/>
          <property name="swing.metalTheme" value="steel"/>
       </resources>
    </jnlp>The above file always fails with the error shown at the top of this message. However, if I remove either of the two properties, it works fine. And I have created other variations with lots of properties, some of which work. All of these variations are in the same directory in the war file, served by the exact same servlet (a slightly modified version of the jnlp.sample.servlet.JnlpDownloadServlet provided with JDK 1.6.0_3). Assuming that a no-cache header is the problem, what on earth could be causing some JNLP files to always be served with a no-cache header, while others are never served with a no-cache header?
    On a related note, any recommended debugging techniques for seeing what headers are being transmitted? I tried adding a simple check for a "debug=true" parameter in the servlet that causes it to set the content type to "text/plain" instead of JNLP, and that allows me to see (rather than execute) the JNLP XML that's being returned, but it doesn't show me the HTTP headers that are being sent back. If any caching headers are being set, I think it must be being set by the servlet container itself, as it's nothing being set in the servlet code that I can see. So I don't see any way on the server side Java code to output or log the actual HTTP response (or is there?). Any tips in that regard much appreciated.
    Edited by: TomC125468 on Aug 19, 2009 1:35 PM

    Hi Luca-Sanna,
    Thanks for the response. Re browsers, yes, it fails in IE but it succeeds in Firefox. The info on the JavaWS FAQ and other places all seem to indicate that it's an IE issue concerning handling of the cache-control headers.
    I should check in my webserver forum (Sun WebServer 7) to see about logging options. Sniffing on the client side is not possible, as my app is required to use HTTPS exclusively, and unfortunately that also precludes a telnet GET request.

  • Can't get that damned WebStart jnlp file to work!!!

    hi i have a problem, i can't get webstart to work. lool at my homepage http://www.deutronium.de.vu/games.html. the WebStart files of the first two games of the page do not work. i tried all things but i can't get them to work for me. it always give me an error message that it cannot find a resource.
    this is my jnlp file, the jars are in the same directory:
    <?xml version="1.0" encoding="utf-8"?>
      <jnlp spec="1.0+" codebase="http://www.deutronium.de.vu/games/Dedris/" href="Dedris.jnlp">
      <resources>
        <jar href="http://www.deutronium.de.vu/games/Dedris/Dedris.jar" />
        <j2se version="1.2 1.3 1.4 1.4.1" />
      </resources>
      <application-desc main-class="Dedris" />
    </jnlp>

    I think it's has something to do with your webserver. I took everything as is and just changed the urls and it worked. It has to be, because the same thing happens with NumberGame and I didn't change anything but that. If you want, I could host them until you fix it or get a working one.

  • How to specify a JRE range in jnlp file?

    We have a java app which uses Java Web Start. The jnlp file is configured with [j2se version="1.5+"]. So if JRE 1.5 and 1.6 are installed, the app is run on 1.6.
    Now, we have requirement where the app should be restricted to run only within the range - JRE 1.5.0_07 through JRE 1.5.0_17
    [j2se version="1.5*"] will not work - it will always launch the app with the latest jre from 1.5 family.
    I can request an exact product version by including the href attribute. [j2se version="1.5.0_14" href="http://java.sun.com/products/autodl/j2se"/]
    But how do I specify a specific range of JREs in the jnlp file so that JWS picks up a JRE from that range only? So if 1.5.0_07, 1.5.0_17 and JRE 6 are installed, it should run the app on 1.5.0_17.
    Can JNLP really allow you to select specific range of JREs? Is there a good way to accomplish this? Please help.

    sunjavaboy wrote:
    ..how do I specify a specific range of JREs in the jnlp file so that JWS picks up a JRE from that range only? So if 1.5.0_07, 1.5.0_17 and JRE 6 are installed, it should run the app on 1.5.0_17.From the JNLP Specification
    *4.6 Java Runtime Environment*
    Several JREs can be specified, which indicates a prioritized list of the supported JREs, with the most preferred version first. For example,
        <java version="1.3" initial-heap-size="64m"/>
        <java version="1.2">
          <resources> ... </resources>
        </java>So your app. would need more along the lines of..
        <java version="1.5.0_07 1.5.0_08 1.5.0_09 1.5.0_10 1.5.0_11 1.5.0_12 1.5.0_07 1.5.0_13 1.5.0_14 1.5.0_15 1.5.0_16 1.5.0_17 " />
        <java version="1.6+" />Actually you'd need the list of 1.5 versions reversed. Well, you get the idea hopefully. For more on versioning, see my [JWS versioning page|http://pscode.org/jws/version.html].

  • Deploying FX as a Desktop App - jnlp file codebase should be...what?

    Howdy,
    If I try and run my deployed JavaFX app on another PC I get an error pointing back to the codebase that NB created in the <appname>.jnlp file:
    codebase="[http://localhost:8082/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/E%3A/JavaFX/Projects/Concentration/Concentration11/dist/]"My main question is, for a standalone desktop FX app you want to distribute, what should the codebase be?
    I assume you don't point to your developer machine's URL because of course that won't exist on someone else's machine. And unlike most web examples, this won't be running from a server.
    Many other examples refer to running the jar file from the command prompt - not acceptable if you are selling an applet, or even just distributing to the general public.
    So how does this work - how do you set up the jnlp file for desktop deployment? And, do you have to manually do this, or is there something I am missing in NB (6.8) ?
    Many thanks in advance.

    Hi Phil and thank you. I admit have been avoiding learning to compile from the command prompt or with other tools due to the ease that NB affords - but it seems that NB is introducing some issues lately.
    I haven't tried the other tools yet, but I thought maybe I could just edit the NB created jnlp file:
    [http://forums.sun.com/about:blank]<jnlp spec="1.0+" codebase="file:/" href="Concentration11.jnlp"> [http://forums.sun.com/about:blank]<information>  <title>*Concentration11*</title>  <vendor>*Gary*</vendor>  <homepage href="http://localhost:8082/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/E%3A/JavaFX/Projects/Concentration/Concentration11/dist/"/>  <description>*Concentration11*</description>  <offline-allowed/>  </information> [http://forums.sun.com/about:blank]<resources>  <j2se version="1.5+"/>  <extension name="JavaFX Runtime" href="http://dl.javafx.com/1.2/javafx-rt.jnlp"/>  <jar href="Concentration11.jar" main="true"/>  <jar href="lib/derby.jar"/>  <jar href="lib/derbyclient.jar"/>  <jar href="lib/derbytools.jar"/>  <jar href="lib/.netbeans-derby_JapaneseWords.jar"/>  </resources> [http://forums.sun.com/about:blank]<application-desc main-class="com.sun.javafx.runtime.main.Main">  <argument>*MainJavaFXScript=dbPackage.Main*</argument>  </application-desc>  <update check="background"/>  </jnlp>Replacing the code base with your file idea, if I try to run from the jnlp file it complains it can't find the resource:
    com.sun.deploy.net.FailedDownloadException: Unable to load resource: file:/Concentration11.jnlp
    at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
    <...more...>Sorry to be so dense. Any ideas what I am flubbing up this time?
    Thank you Phil.

Maybe you are looking for

  • Home hub 5 firmware Update

    Hi all got a firmware update this morning on Christmas Day (good timing bt ) it's now on 3. Firmware version: Software version 4.7.5.1.83.8.173.1.6 (Type A) Last updated 24/12/13 Looked through the online manager cannot really see any changes maybe j

  • How to read a file in another location using Java ?

    Hi all, i suppose the below code reads my file 'ridata.dat' when it is in the same folder as my java class file. How can i read it from a different location? ---------------------------------------------------------------FileRead.java----------------

  • Pass parameter to DB trigger

    Hi All I wanted to pass a parameter to DB trigger via forms 6i. Please explain me how to do it. Thanking You Regards Lakmal

  • Duplicate thumbnails

    Somehow, I've made a library management error. The photos in this particular project are filed in chronologically named folders (2007, 2008 etc with sub-sets of albums). The thumbnails in each of the albums are fine - no problem. But in the project i

  • FileNotFoundException in Reading/Writing Applet

    Hi, I want to use an Applet to write some data into the existing 'test.txt' file but I get a FileNotFoundException. URL url = new URL(this.getDocumentBase(),"test.txt"); URLConnection connection = url.openConnection(); connection.setDoOutput(true); c