JNLP file and replication

Hello,
I have an application that I launch with JNLP that I am trying to replicate to some other servers.
The "resources" tag in my JNLP file has some property settings and then all the signed jars. There is also an "extension" tag with a JNLP file that includes some unsigned jar files.
I am going to use some sort of replication software to copy all of the jnlp, jar, and html files from our main server to our remote servers.
The goal is to be able to upgrade the application on the main server and have the remote servers automatically be upgraded by replicating the changed files from the main to the remote servers.
The problem that I am having is that some of the properties in the jnlp file are server specific. Therefore, I would like to pull these properties out of the main jnlp file and put them in another jnlp file that would not be replicated. This file would be included by the main jnlp file. This file would contain the settings that are different between each of the servers.
I have tried putting these properties in a jnlp file and including that jnlp file as an extension to the main jnlp file, but then my application cannot see these properties.
Does anybody know how I can do this or why what I am doing doesn't work? Is there another way that I am not thinking of?
Thanks in advance for any help.
Tom

properties set in an extension jnlp file are only loaded (set as system properties) the first time code in that extension is loaded.
For this reason you may need to put a dummy method in a jar in the extension, and call it before testing the properties.
Also note, if you want to put properties in an unsigned extension, they will not be set unless they begin with "javaws." or "jnlp." (or are on the release specific list of secure properties).
/Andy

Similar Messages

  • Specific version of jre in .jnlp file and downloading from local server

    Hi,
    I have couple of questions regarding the specific version of jre in Java WebStart.
    1) I have specified the jre version in .jnlp file as below.
    <resources>
    <j2se version="1.3.1_02"/>
    </resources>
    When I saw the File/Preferences/Java of Java WebStart installation, there is an entry with the "Product Version" value as 1.3.1_02 as I installed jre also before launching my application. Still it complains as,
    The application has requested a version of the Java 2 platform (JRE) that is currently not locally installed. Java Web Start was unable to automatically download and install the requested version. The JRE version must be installed manually.
    Error Code 11 (11 Could not locate requested version) returned from server when accessing resource: (http://java.sun.com/products/autodl/j2se, 1.3.1_02)
    When it is there already, why it is trying to get from the Sun's site.
    2) I want Java WebStart to download the specified version of jre from my local server, I specified this in the following way,
    <resources os="Windows">
    <j2se version="1.3.1_02" href="http://host:9095/j2re-1_3_1_02-win.exe"/>
    </resource>
    I got the error saying,
    Bad MIME type returned from server when accessing resource: (http://host/j2re-1_3_1_02-win.exe, 1.3.1_02) - application/octet-stream. where host is my server name. What I need to do here.
    Can I have multiple resource tags one for each os.
    Help is highly appreciated.
    Thanks,
    Sreedhar.

    Hi Sreedhar,
    There are some other useful threads in this forum on this topic:
    the "Automatically Installing the IBM JRE 1.2.2" thread has tips from somebody who's put together auto-download of JREs from his own web site:
    http://forum.java.sun.com/thread.jsp?forum=38&thread=71061
    Also, the behavior of the j2se tag is discussed a little in the "Using a specific JRE" thread: http://forum.java.sun.com/thread.jsp?forum=38&thread=158075
    The first step is to add an href attribute to your j2se tag. I was just experimenting with this this afternoon,
    and it appears that unless that href is specified (even if it's the java.sun.com default autodl URL!) JWS will not properly check locally-installed 1.3.1 JREs. Once you include Sun's autodl URL as an href, JWS will at least properly enforce the product version among locally-installed JREs. Of course, Sun doesn't actually include 1.3.1 in its autodl section, so it won't download it for you, but it will enable checking of the JREs already installed.
    The second step is downloading JREs from your own web site, which is more complicated and explained better by other messages in the forum. But basically, JWS is not simply looking for a .exe installer for a particular JRE. It hits the webserver with a query and expects the webserver to give it back an installer's JNLP file. Look at the referenced threads for more details.
    Jim

  • .jnlp files and regeneration

    Hello all,
    I currently run a .jnlp from 2 different places:
    1 - from within my internal network
    2 - from the outside
    When I run from within the network, I use http://scar:70000/
    When I run outside the network, I use http://scar.pridelands.com:70000/
    So, I do the following:
    1. Run http://scar.pridelands.com:70000/generate_me
    2. Results: The .jnlp file generated has http://scar:70000/ throughout the entire file and not http://scar.pridelands.com:70000/.
    It is though the thing is cached, somewhere, somehow ...
    Can someone please provide some kind of insight as to how files can be generated?
    TIA

    You can go and delete the cached files in C:\Documents and Settings\<user>\Application Data\Sun\Java\Deployment\cache\javaws\http\ from this folder
    Thanks,
    Suresh
    [http://sureshdevi.co.in|http://sureshdevi.co.in]

  • Jnlpdownloadservlet and dynamic jnlp file

    Problem: we want the version handling (+ jardiff) of JnlpDownLoadServlet, but we also need to construct the jnlp file dynamically (for example: a .jsp file). It seems to me there are two solutions, neither of them good: a) hack the JnlpDownloadServlet (or roll our own), intercepting the jnlp-file-reading code to forward to the jsp page that generates the jnlp xml data and use the generated response as the file contents.
    b) generate each jnlp file dynamically and then store it in a temporary location for the JnlpDownloadServlet to pick up. This entails aging the temporary jnlp files and deleting them so the server doesn't get clogged with dead jnlp files.
    Is there a third possibility? Or something in the pipe for the near future?
    (Note: Web Start Services is not a solution for this task since WSS doesn't support jar versioning, and since the $$properties mechanism does not appear to be ideal for passing a lot of dynamic jnlp information.)
    Thanks in advance for any advice.

    My jsp page actually generates the list of jars for the application. It also passes some info specific to the user session by means of the jnlp file. Since we are doing games, the list of applications keeps growing. By generating the resource elements dynamically for a game, we can reduce maintenance (as opposed to having a large number of jnlp files with mostly duplicate code) -- especially when a version is updated.
    Till we can move to 1.5, I plan to use the temporary file creation method.
    Thanks, --John                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • I am getting a "java.lang.RuntimeException: Error loading file:....NULL content-length." message when attempting to load a jnlp file

    I am the applications administrator for an instance of Galaxy server. In Galaxy there is an option / plugin to opne a BAM file via the Integrative Genomics Viewer (IGV) created at the Broad Institute. When invoked it downloads a jnlp file and launches IGV and then is supposed to open the BAM file in the viewer. However, when it attempts to open the BAM file I get the following error:
    "An Error occurred while loading: http://galaxy/display_application/52cef830ad5766ca/igv_bam/web/29212308ff643a94/data/galaxy_52cef830ad5766ca.bam
    java.lang.RuntimeException: Error loading file: http://galaxy/display_application/52cef830ad5766ca/igv_bam/web/29212308ff643a94/data/galaxy_52cef830ad5766ca.bam NULL content-length."

    UPDATE
    Compiling from command line I found out that the class definition for oracle.oats.scripting.modules.basic.api.IteratingVUserScript is missing. Do you know what .jar file contains this class?
    Thanks.
    Fede.

  • 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?

  • Download  resources that are not listed in the JNLP file

    There is some way to download resources that are not listed in the JNLP file, and then
    ask for them with DownloadService ? (isResourceCached)
    thanks.

    currently, the jnlp spec requires DownloadService to access only resources specified in the jnlp file..
    changing this is a proposed RFE for the next spec version:
    4908304: JWS DownloadService should not require mention in JNLP file
    /Dietz

  • Cannot open .jnlp file when asked to open with firefox web browser in ubuntu 11.10 using firefox 6

    After upgrading to ubuntu 11.10 the firefox 6 browser cannot download and open .jnlp file from the interactivebrokers website. Usually I go to the IB website and download tws.jnlp file which is opened in the firefox web browser. But now when I click on the Open with Firefox Browser button, the firefox browser opens a new tab and display the same open window again.

    Seems that after upgrading to 11.10, jnlp files open with firefox instead of javaws (Java Web Start).
    If you right click the file on the download folder and choose "open with" you can manually select java web start.
    Ubuntu bug...
    You can right click any .jnlp file and select "properties", go to "Open With" tab, mark Sun Java 6 Web Start and click "Set as Default". Should fix it. I don't know what would happen if you have the default ubuntu java instead of Sun's. Maybe this wouldn't be necessary.

  • Problem in jnlp file

    hi,
    For sandbox i created the repository.jnlp file and used.
    at the same time i created the repository.jnlp file for developement server but it giving the error as
    "com.sap.aii.utilxi.misc.api.ReconnectRuntimeException"
    "Cannot open connection on host: (     )  and port:
    i think there is problem in rmi port..
    Is the RMI port is same for both sandbox and Development server????
    regards
    sasi

    hi,
    ur not able to see the file in development pls do chk with the client nos and ports
    make that the file is in active mode
    provide some more info
    thnx
    sampath

  • How do you set a parameter value in a jnlp file?

    I am trying to figure out how to assign a value to a parameter within a jnlp file and then call that into the main class file. My main class file is below. I want to set firstName inside of the JNLP config file, but am convinced it is impossible. Any thoughts?
    public class Greeting
    private String firstName;
    public Greeting()
    public String getName ()
    if( firstName == null)
    firstName = "Day";
    return firstName;
    }//end method
    public static void main (String args[])
    Greeting greeting1 = new Greeting ();
    greeting1.getName();
    System.out.printf("%s\n", greeting1.getName());
    }

    In the jnlp file, add the Name as a runtime argument for running the Greeting class from its main(). Then add a constructor like
    public Greeting(string name){
    firstName = name;
    }and then change the Greeting greeting1 = new Greeting ();to Greeting greeting1 = new Greeting (args[0]);A side note, most people on here get all bent out of shape if you don't put your code in the Code formatter on here, in case you didn't know about it before. It's just easier to read.

  • About multiple JARs in jnlp file

    If the application has number of jar files, then how to accomodate those in <resources> element of jnlp file?
    I have tried by putting those jars in a single folder and giving the complete path of *.jar files but its not working.
    Can anyone please suggest some solution?

    If the application has number of jar files, then how
    to accomodate those in <resources> element of jnlp
    file?The other poster gave a broad outline, for more details,
    see section 4.3 "Specifying Code Resources" of the
    JNLP Specification*.
    * The JNLP Spec. is donwloadable, but is not
    available for on-line browsing.
    http://java.sun.com/products/javawebstart/download-spec.html
    I have tried by putting those jars in a single folder** Where?
    and giving the complete path ...It is best to specify a path relative to, and 'below'
    the codebase.
    ...of *.jar files but its not working. That is not very specific. What is 'not working'?
    Perhaps the code is just lazy - in need of a bit
    of a rest and a holiday?
    Most other problems show errors in the Java
    Console. The Java Console can be configured
    to automatically open when launching a JWS
    app., and that is a good thing when an app. is
    not launching correctly.
    See the options in the Java Control Panel for
    auto-popping the console.
    Can anyone please suggest some solution?1) Configure the Java Console to open
    automatically, and copy/paste any exceptions
    seen.
    2) Check the JNLP file for well formedness***,
    before posting it here.
    3) ** Describe the paths to your JNLP file, and each
    of the paths to the resources.
    *** The well-formedness of a JNLP file (which is
    XML) can be checked in a little tool I put here..
    http://www.physci.org/xml/xmltools.html#xmlwfc

  • Problem with .jnlp file

    Hello,
    I am trying to use JFileChooser to open and select a file. I am using NetBeans to develope my application. When I run it in NetBeans it works just fine and I can open and select the file. However, when I run my .jnlp file and click on the button nothing happens. Why is that? Here's a sample of my code:
    private JButton getBtnJFileChooser() {
         if (btnJFileChooser == null) {           
    btnJFileChooser = new JButton("Open...");
    btnJFileChooser.setBounds(275, 110, 90, 20);
    btnJFileChooser.addActionListener(new OpenAction());
         return btnJFileChooser;
    class OpenAction implements ActionListener {
    public void actionPerformed(ActionEvent ae) {
    // Open a file dialog
    fc = new JFileChooser();
    int retVal = fc.showOpenDialog(SC_DOC_gui.this);
    if (retVal == JFileChooser.APPROVE_OPTION) {
    // The user selected a file, process it
    File file = fc.getSelectedFile();
    // Update user interface.
    //lblMsgArea.setText(file.getName());
    lblMsgArea.setText("Load SC_DOC Files");
    }

    I am not quite sure what's going on. When the button is clicked nothing happens. I've been doing research on this and I found a sample code that deals with jnlp and opening files. It's here: http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html#advancedexample
    Now, when I want to use this code I get an error message that the package javax.jnlp.* does not exist. So now I'm trying to figure that one out and I haven't yet. I have installed the latest Java Web Start Technology and this should work. Any advice?

  • JNLP file error

    Hello
    I got some strange behavior in my program and I don't understand why. Here is the situation.
    I have 2 jnlp files with the exact same content except one character.(the name of the file in the href below codebase). The first one is running perfectly fine and the second return me an error. Here are the 2 files (HelloFrame(running fine) and HelloFrame2(returning error))
    The error message is : Il manque le champ obligatoire suivant dans le fichier de lancement : <jnlp>
    which mean : There is missing an obligatory field in the launching file : <jnlp>
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for Notepad -->
    <jnlp spec="1.0+"
          codebase="http://www.gudradain.byethost12.com/"
          href="HelloFrame.jnlp">
       <information>
          <title>HelloWorld Essai</title>
          <vendor>Marc-Andre</vendor>
          <description>HelloWorld Essai</description>
          <homepage href="http://www.gudradain.byethost12.com/"/>
          <description kind="short">Small App pour me pratiquer avec java web start</description>
          <offline-allowed/>
       </information>
       <resources>    
            <jar href="HelloFrame.jar"/>  
         <j2se version="1.6+"
               href="http://java.sun.com/products/autodl/j2se"/>
       </resources>
       <application-desc main-class="Test2.HelloFrame"/>
    </jnlp>
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for Notepad -->
    <jnlp spec="1.0+"
          codebase="http://www.gudradain.byethost12.com/"
          href="HelloFrame2.jnlp">
       <information>
          <title>HelloWorld Essai</title>
          <vendor>Marc-Andre</vendor>
          <description>HelloWorld Essai</description>
          <homepage href="http://www.gudradain.byethost12.com/"/>
          <description kind="short">Small App pour me pratiquer avec java web
    start</description>
          <offline-allowed/>
       </information>
       <resources>    
            <jar href="HelloFrame.jar"/>  
         <j2se version="1.6+"
               href="http://java.sun.com/products/autodl/j2se"/>
       </resources>
       <application-desc main-class="Test2.HelloFrame"/>
    </jnlp>Here is the complete error message :
    MissingFieldException[ Il manque le champ obligatoire suivant dans le fichier de lancement : <jnlp>]
         at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
         at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
         at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
         at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
         at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
         at com.sun.javaws.Launcher.launch(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)

    Ok I found a way to fix this problem but I don't like it. It's really stupid and I don't know why it would in anyway matter but it does. So if anyone could understand something of my following explication and tell me why it do it, I would be really gratefull.
    Here is what cause the problem and what I did to solve it.
    If I create a JNLP file and I don't upload it yet on my server (http://www.gudradain.byethost12.com/) and I try to run it from the folder in which I create it I will get an error message (which seems normal)
    If I upload my JNLP file that I got an error message sometime before on my server and I then try to run it I still get an error message (which I don't understand why because the file is on the server now so it should be able to access it)
    But if I create an exact copy of this file and I put it on the server and then test it (so I didn't get any error message before I test it) now it will work
    What I realize is that if I ever get an error message with a JNLP file that mean my JNLP file is screw and will always return an error message even if I correct this error. WHY!!!???

  • Jnlp file

    I have some software that was coded for Java 1.5 and since updating to Java 1.6 it gives an hs_err_pid<pid>.log on the desktop of the user.
    The source code is not available but the problem does not stop the software working only stops it from closing gracefully so what I was hoping to do was move the error log from the default on Windows of writting to the desktop to writting to another location.
    I ahve found the command -XX:ErrorFile=./hs_err_pid<pid>.log that works from the java command line. This software is deployed using a JNLP file and I would like to get Java to write the error somewhere more subtle than the desktop.
    Does anyone know if this is possible?

    Thanks for the suggestion. I tried the test.jnlp, but it still did not work. I also was not sure what was meant by:
    4) Do the following in c:\test\bin
    javac test.java
    jar cvfm test.jar manifest.txt *.class
    I should also mention that I had everything working before, but the jnlp file was only running the oldest jar file no matter what I did (delete the old jar files and put in a new one, etc.). I tried deleting stuff manually from the cache on the c: drive and now nothing happens at all. Could it be a bug?

  • Jar file and remote mysql connect

    I have a jar file that i want anyone run it.The problem is that the code makes a connection to a database (mysql) to my computer.How anyone can connect to my databse in my computer from another pc without the user have to had the java \ mysql connect or hte mysql.Only the java.I try with a jnlp file and the jar file stored in my computer.I have a host name and i have open the port 3306 for mysql and allow remote connections to mysql.Can you help me;;

    ok i connect to database like this:
    try {
                   String userName = "username";
                   String password = "password";
                   String url = "jdbc:mysql://HOSTNAME/bankloans";
                   Class.forName("com.mysql.jdbc.Driver").newInstance();
                   conn = DriverManager.getConnection(url, userName, password);
              } catch (Exception e) {
                   System.out.prinln(e);
              }The JNPL file
    <?xml version="1.0" encoding="Windows-1251"?>
    <jnlp
      spec="1.0+"
      codebase="http://nasikas.ath.cx:8080/bankloans/"
      href="BankLoans.jnlp">
    <information>
    <title>Bank Loans Programme</title>
    <vendor>Softlets</vendor>
    <description>Bank Loans Programme</description>
    <offline-allowed/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.6+"/>
    <jar href="BankLoans.jar" main="true"/>
    <jar href="mysql-connector-java-5.1.0-bin.jar"/>
    </resources>
    <application-desc main-class="Go"/>
    </jnlp>What is wrong;;

Maybe you are looking for

  • Caller id not working properly Please Help!!

    Mt caller ID ask me me to enter the contact but I know it is in there already and it just shows the number when it used to show the person's name. I don't know how to fix this or is something wrong with my phone? Thanks !!!

  • New Apple discution forums bugs or what?

    Hi, Since the new forums become online, I must admit there is many different issues that looks strange to me. For instance: - when I post, I get a screen with only the top Apple site icons and the botton site support links. I have then to browse back

  • Error while transporting ID objects via CTS

    Dear All, I am facing some issue in Transporting ID objects from Dev to Q. We have a Central SLD for Dev and Qual. Prod has a different SLD. I have used Transport targets in SLD to point the Dev to Qual and Qual to Prod. After this, I created Busines

  • How do I recover data from my macbook pro with a disk that can't be repaired?

    I'm in need of a data recovery solution.  My Macbook pro (17") running OS X Mountain Lion won't boot and is stuck on the gray startup screen with the apple icon and spinning gear and disk utility states "Error: Utility can't repair this disk.  Back u

  • Validating locale specific numeric data.

    Is there is any way to validate a numeric value that can have scientific notation, plus/minus sign and locale specific decimal point. I tried using NumberFormat parse() method but it gives success even if the string is like 1erwrw. Any suggestions?