Using Network Installed JRE for JNLP

Hello All;
First post here so I hope I pull this off correctly. I have been using these forums a bit to help me develop the JNLP deployment of an inhouse application. Basically I have a JAR file, and am using a servlet via tomcat to dynamically generate my JNLP file (since I have params passed to the jar) and push to the user's browser. I then have the jnlp mime type set via tomcat so that when the servlet flushes the stream, javaws starts up and processes the application. The problem I have is that I am telling the jnlp file to use java version 1.5+, however, there are some users here that have Java 1.4 installed locally. We have Java 1.5 installed on our server, and most of our applications use a "driver" that sets up the java home to that directory. Is there a way that I can tell JNLP to use that installation of the JRE? The reason I dont want to use the 'autoupdate' function is because not all users have the proper permissions to install applications on their system. Here is the code I use in my servlet:
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.csc.eri.config.ERIConfigFile;
import com.csc.eri.logger.ERILoggerFactory;
import com.csc.eri.logger.IERILogger;
* Servlet designed to handle all JNLP application requests
public class JnlpServlet  extends HttpServlet {
     private static final long serialVersionUID      = 1L;
     private static IERILogger logger                = ERILoggerFactory.create();
     String jnlpSpec;
     String jnlpCB;
     String title;
     String vendor;
     String homepage;
     String desc;
     String descShort;
     String descTool;
     String javaVersion;
     String javaLocation;
     String jarLocation;
     String mainClass;
     String cacheDays;
     String fileName;
     String[] jvmOpts;
     String[] extensionNames;
     String[] extensionLocations;
     String[] applicationOrder;
     boolean allowNewer;
     boolean showJnlp;
      * Initialize all variables
      * @throws IOException
     private void initVars() throws IOException {
          ERIConfigFile config = ERIConfigFile.getInstance();
          jnlpSpec                = config.getProperty("jnlp.spec");
          jnlpCB                    = config.getProperty("jnlp.codebase");
          title                    = config.getProperty("jnlp.title");
          vendor                    = config.getProperty("jnlp.vendor");
          homepage                = config.getProperty("jnlp.homepage");
          desc                    = config.getProperty("jnlp.description");
          allowNewer               = config.getProperty("jnlp.allow_newer_jvm")
                                                  .toLowerCase()
                                                  .equals("yes")?
                                                            true : false;
          showJnlp               = config.getProperty("jnlp.show_jnlp")
                                                  .toLowerCase()
                                                  .equals("yes")?
                                                            true : false;
          // Test variables so we dont launch on error
          try {          
               testVars();               
          } catch (NullPointerException npe) {
               throw new IOException(npe.getMessage());
      * Method to ensure that all data was properly loaded from the
      * configuration file.  We want to make sure that everything
      * is fine and display any messages to the screen before
      * the application is launched.
     private void testVars() {
          logger.info("Checking Configuration");
          ArrayList<String> errList      = new ArrayList<String>();
          ArrayList<String> warnList      = new ArrayList<String>();
          // Errors
          if (jnlpSpec      == null) errList.add("Missing Spec");
          if (jnlpCB           == null) errList.add("Missing Codebase");
          if (title          == null) errList.add("Missing Title");
          if (vendor          == null) errList.add("Missing Vendor");
          if (homepage     == null) errList.add("Missing Homepage");
          if (desc        == null) errList.add("Missing Description");
          if (javaVersion == null) errList.add("Missing Java Version");
          if (jarLocation == null) errList.add("Missing Jar Location");
          if (mainClass   == null) errList.add("Missing Main Class");
          if (cacheDays   == null) errList.add("Missing Cache Days");
          if (applicationOrder == null) errList.add("Missing Application Param Order");
          if (fileName    == null) errList.add("Missing File Name");
          // Warnings
          if (javaLocation == null) warnList.add("Missing Java Location");
      * Implementation of the doGet method.  Creates the jnlp xml stream
      * and outputs to the browser
     public void doGet(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException
          logger.info("Servlet Initialized");
          // Init variables
          initVars();
          // Generate output
          String outputString = generateOutputString(request);
          // This is the file name as cached by the browser
          String attachment = "inline; filename=\"" + fileName + "\"";     
          // Set our MIME type
          response.setContentType("application/x-java-jnlp-file");  
          // Add a header that states the max age or the cache
          response.addHeader("Cache-Control", "max-age=" + cacheDays);  
          // Attach the inline content
          response.addHeader("Content-disposition", attachment); 
          // Prepare our stream writer
          OutputStreamWriter out = new OutputStreamWriter(response.getOutputStream()); 
          // Push to the browser
          logger.info("Posting To Browser");
          out.write(outputString.toString()); 
          out.flush(); 
          out.close();
      * Posts information to the browser
     public void doPost(HttpServletRequest request,
              HttpServletResponse response)
          throws ServletException, IOException
          doGet(request, response);
      * Generate the servlet's output stream.  This method uses
      * all of the information gathered from the eri configuration
      * file
      * @param request     The request sent to the servlet, needed
      *                          to parse the arguments
      * @return               Return the string output
     private String generateOutputString(HttpServletRequest request) {
          // Create our output string
          StringBuffer outputString = new StringBuffer();
          outputString.append(JnlpFieldCreator.xmlHeaderBlock(          "1.0", "utf-8"));
          outputString.append(JnlpFieldCreator.jnlpSpecBlock(               jnlpSpec, jnlpCB));
          outputString.append(JnlpFieldCreator.informationBlock(          title,
                                                                                     vendor,
                                                                                     homepage,
                                                                                     desc,
                                                                                     descShort,
                                                                                     descTool));
          outputString.append(JnlpFieldCreator.securityBlock());
          outputString.append(JnlpFieldCreator.resourcesBlock(          javaVersion,
                                                                                     allowNewer,
                                                                                     javaLocation,
                                                                                     jarLocation,
                                                                                     jvmOpts,
                                                                                     extensionNames,
                                                                                     extensionLocations));
          outputString.append(JnlpFieldCreator.applicationDescBlock(     mainClass,
                                                                                         request,
                                                                                         applicationOrder));
          outputString.append(JnlpFieldCreator.jnlpEndBlock());
          return outputString.toString();
}

Also here is the jnlp file created, sorry i ran out of chars in my first post
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://ad292673:8080/eri/app">
<information>
     <title>Electronic Release Version 4</title>
     <vendor>---</vendor>
     <homepage href="http://ad292673:8080/" />
     <description>Application for auditing and releasing drawings</description>
     <description kind="short">Electronic Release is used to help users
          audit and perform release actions on part drawings, tooling drawings, table
          of limits, and web drawings</description>
     <description kind="tooltip">ERI v4.0</description>
</information>
<security>
     <all-permissions/>
</security>
<resources>
     <j2se version="1.5*" href="http://java.sun.com/products/autodl/j2se"/>
     <jar href="./eri-view_ddmdemo.jar" main="true" part="mainClass" download="eager"/>
     <extension name="EclipseLibs" href="./jnlp/EclipseLibs.jnlp"/>
     <extension name="EriLibs" href="./jnlp/EriLibs.jnlp"/>
     <extension name="JdomLibs" href="./jnlp/JdomLibs.jnlp"/>
     <property name="eri.stage" value="devl" />
</resources>
<application-desc main-class="com.csc.eri.view.swt.Application">
     <argument>c087919</argument>
     <argument>ddm</argument>
     <argument>release</argument>
     <argument>-</argument>
     <argument>-</argument>
     <argument>09005b8b829bf8b6</argument>
</application-desc>
</jnlp>

Similar Messages

  • Automatic download/install JRE via JNLP

    Under Java Web Start Reference (http://java.sun.com/products/javawebstart/developers.html)
    "A MAIN feature of the ... JNLP... is the ability to automatically download and install JREs onto the user's machine".
    Many have taken this to mean "if the client doesn't have the necessary JRE it will be installed". Well, if the client doesn't have ANY JRE isn't that the same thing as not having the necessary JRE installed? Apparently not. It appears that it is similar to the old joke: How to be a millionaire: 1) First, get a million dollars. The documentation might be enhanced if this chicken/egg situation were mentioned. It seems that we have to write scripts, etc to either point to a JRE download site or somehow manage the install ourselves. I started to look into this but then realized YOU HAVE TO HAVE ADMIN RIGHTS to install the JRE on the client.
    This may all be self-evident to those who have been through this but it's a bitter lesson. If what I have written is not true would someone set me straight and tell me how to get around the admin rights problem? Oh, and does the admin rights problem persist if the the client has a JRE but JNLP needs to download/install a different version? This may be the mortal blow to three months' effort at getting J2EE/J2SE in the door at my company: all we want is to download and run a small Java app for the user to use regardless of which machine he or she is using.

    To change the Registry, Windows requires admin rights. This may (or may not be something you can achieve with Secondary Logon Rights - see http://support.microsoft.com/Default.aspx?kbid=225035 ) There is also a lot of information about this on the web, you should do some further research.
    To run applets and browser related programs requires that Java install the JRE, which uses Browser Helper Objects (BHO's) and that involves Registry entries.
    However, if you only need to run Java programs from the commandline, then the possibility exists to install the Java JDK without a public JRE. That could be done by a simple copy of the appropriate directory(s). This will give you a private JRE inside the JDK, and doesn't make any Registry entries. (Of course, then applets can't be run.) That JRE can then be accessed using a full path to the java.exe executable. (I don't know whether using Sun's downloaded installer will do this - it may still require admin privileges.)
    You're in an area where you'll probably have to do some experimentation. I would address the JNLP questions to the Java Web Start forum, there are some good people that monitor that forum.

  • WebStart 1.4.2 doesn't find installed JRE for 1.4.2 ?

    I have installed J2RE1.4.2_04. As far as I can tell, it works just fine and there are registry keys set for
    Java Runtime Environment for 1.4 and 1.4.2_04 which are set to the same thing. However, when I
    run my webstart app, I get an error with the general information that "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."
    Having turned tracing and output on, I look in the log and see
    javawsApplicationMain: Installed JRE: null
    So, for some reason, WebStart doesn't think I have an installed JRE. Could someone tell me why?
    I have tried various incantations of version, such as
    <j2se version="1.4.2_04"/>
    <j2se version="1.4.2"/>
    <j2se version="1.4.2+"/>
    <j2se version="1.4.2*"/>
    All of these result in the same error. If I try either of
    <j2se version="1.4+"/>
    <j2se version="1.4"/>
    WebStart recognizes that I do in face have a JRE installed, but then I have other problems. I would
    prefer to get the 1.4.2 problem fixed first since I require 1.4.2 and some boxes have 1.4.1 on them.
    Thanks for any ideas!
    : jay

    This is confusing and done poorly in my opinion but the only "versions" of Java 2 are 1.2, 1.3, and 1.4 (1.5 is coming). If you specify anything past those (as your first four examples do), Web Start assumes a product specific version and you have to provide a URL to download it. Even if it is on the machine, Web Start downloads the version and stores a separate copy of it.
    See http://java.sun.com/products/javawebstart/developers.html#auto for details.
    I think the only thing you can do if multiple versions of 1.4 are installed is go into Web Start preferences and uncheck the box so it is not enabled.

  • Installing JRE for J2SE application on fanless linux mini pc.

    Good afteroon.
    I want install a JRE for J2SE application on mini pc fanless .It is possible?
    What about hardware settings,performance of this mini pc?
    Bye.

    Was wondering this myself. Cannot find a class path on ubuntu. if there is one at all.

  • How to connect with VPN of type L2TP programatically in IOS8 ? canse NEtwoatically in IOS8 ? can i use NEtwork/Extension framework for this?rk/Extension framework for this?

    I have a mobileconfig file and the VPNType is L2TP . How can i connect to this VPN programatically in IOS8 ?Apple's Network/Extension framework has methods which supports IPSEC and IKEV2 protocols(NEVPNProtocolIPSec, NEVPNProtocolIKEv2). Can i use Network/Extension framework to connect with L2TP type VPN ?

    I have a mobileconfig file and the VPNType is L2TP . How can i connect to this VPN programatically in IOS8 ?Apple's Network/Extension framework has methods which supports IPSEC and IKEV2 protocols(NEVPNProtocolIPSec, NEVPNProtocolIKEv2). Can i use Network/Extension framework to connect with L2TP type VPN ?

  • Can I use new install disks for older computer?

    I have a new MBP (which I'm very excited about!). I am going to pass my two-year old MBP to one of my college kids. I would like to wipe it clean as he will be transferring all of his own info onto it from his current MBP (which will then be passed down to another college kid). I can't find the original install disk. Can I use the ones that came with the new machine?

    No. The install disks are specific to the model they ship with.
    I've read that a Retail copy of Snow Leopard will allow you to essentially do a 'fresh' install of the OS, but it does not include the diagnostics and configuration features of your original system disks.
    You can call Apple and order a replacement set of disks for a nominal charge (around $40, I think I've read.) Since you're keeping it in the family, that would be an important thing to have with the Mac in case you cannot locate the originals.

  • Using packaged install, asks for serial. Proxy issue?

    We have a very tight proxy on our production machines, we are trying to install a package created from the Creative for Teams packager on one of these production machines and it's asking us for a serial number.
    I've allowed *.adobe and adobelogin.com is there another domain that it needs to connect to to get the proper licensing info.

    Search is your friend....
    http://discussions.apple.com/thread.jspa?messageID=7808470&#7808470

  • Using network-attached storage  for logic 9

    My iMac's FW 800 Bus is no longer working says my Local Authorised Apple Repair centre
    Why and how it failed noone knows
    Option 1
    New Mother Board  = £600  No thankyou
    Option 2
    New Computer
    Option 3
    Transferring my 350Gig Sample Librrary  (IvoryII/Omnisphere/Rmx/LASS etc ) to an ethernet based system
    Anyone got any thought on the latter
    Would an NAS system or a SAN system be able to read and write fast enough?

    network attached storage was very slow, not to mention unsecured... i would suggest getting the new apple airport extreme base station and attaching an external USB disk instead.

  • How i use my network at home for iphone dy usb

    how i use network at home for iphone by USB

    Look for documentation on setting up a SOCKS Proxy for Linux. Installation on the Mac is almost identical. Here's a good place to start.
    <http://www.linux.org/apps/all/Daemons/Proxy.html>

  • Jre for solaris x86

    hi,
    I know that there is a separate JRE for Solaris X86. But my problem is that i have Solaris x86 installed an amd 64 bit machine and also on an Intel 64 bit machine.
    I would like to know if it is possible to use the same jre for both the machines.
    Edited by: Diganth.A on Feb 4, 2009 11:16 AM

    Diganth.A wrote:
    hi,
    I know that there is a separate JRE for Solaris X86. But my problem is that i have Solaris x86 installed an amd 64 bit machine and also on an Intel 64 bit machine.
    I would like to know if it is possible to use the same jre for both the machines.
    Edited by: Diganth.A on Feb 4, 2009 11:16 AMThis all depends on the operating system your are using and the type of 64 bit hardware architecture type.
    Can you please provide more specific details about the architecture and operating systems you are trying to install your JRE on?
    Typically you will want to download a pre-configured JRE for your OS platform and hardware architecture.

  • OS 10.4 Install DVDs for iMac G5 won't load OS 10.4 on PB G4, Help!

    Having recently bought a used PowerBook G4 1.5Ghz 12", it came without Install Disks. I want to reformat the Drive in the PowerBook before I use it. I tried to use the Install disks for my iMac G5 & the iMac G5 Install disk wouldn't let me Install or Reformat the PowerBook Drive. Are the Install Disks now Product specific? Is it possible to use install disks from a G4 iBook to install OS 10.4 on my G4 PowerBook?

    The OEM installer discs that come with specific Mac models generally cannot be used to install OS X on other models. In particular you cannot use the G5 installer on a G4 or vice versa.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

  • Mac Pro Install disc for a Macbook Pro?

    Hi everyone,
    Just wondering if theoretically it would be possible to use the install discs for Leopard on a new Macbook Pro. Meaning that the disc says 'MAC PRO: Mac OS X ...." but would they still work alright on a late 2009 Macbook Pro?
    Thanks guys!

    Just wondering if theoretically it would be possible to use the install discs for Leopard on a new Macbook Pro.
    No. A Mac generally can't start up from an OS older than the one which shipped with it.
    (48324)

  • Delivery from Planning when not using networks

    Hi Gurus,
    Could anybody please help me with the following. We are using Easy Cost Planning to plan all costs against projects. We are also not using networks and activities for our projetcs.
    Is it possible to do delivery from projects (CNS0), without planning materials on networks against the project and if so, how do you do it?
    Thanks for your assistance,
    De Wet

    Hi,
    To deliver through CNS0, the materials should be planned against network and also those materials should be available in "Q" stock.
    Tnx.
    Abdul

  • Security Alert / Revocation info for the sec cert since installing JRE 6u31

    We've been trying to keep up with getting the latest JRE client installed in our environment but since we rolled out update 31, our helpdesk is being flooded with calls with getting a popup box
    "Revocation information for the security certificate for this site is not available. Do you want to proceed?"
    Yes/No/View Certificate
    The cert is issued to javadl-esd-secure.oracle.com
    It affects all of our Windows users and all of which have IE 9, and it affects our standard users with no local admin rights and our SAs who do have local admin rights. Nothing on our network has changed other than going from update 30 to update 31.
    I saw a thread on this forum regarding this the day update 31 from another SA and he was having the exact same issue we were and a couple of people posted follow-ons to it ....now, when I go to that link I get "The specified message [10187748] was not found. "
    We've tried installing Java 7update 4 but that has its own problems.
    If we roll back to update 30, the problem goes away until the automatic updater starts nagging you to update.
    As far as what I've folktale answers I've found online:
    "make sure the time is set correctly" - check, we set time off an NTP hosted in our home state.
    "Silent installer is the problem" - Can't blame this - never used a silent installer - we've only installed via downloading the offline version of update 31, and use the web installer stub and both of those cause problems.
    Is there a way to fix this aside from going into every profile and changing the certificate purposes, or is Oracle going to get around to fixing their cert?

    Hello,
    We have spent some time looking into this and we are not able to reproduce this and suspect that it could be an issue on the machines were the installation is taking place, or due to a networking issue. This is not an attempt to just toss is back and say 'not our problem'. We were certainly concerned with this post and wanted to verify that our certs and the revocation list does not have issues.
    Third Party document on various causes for this error:
    http://www.brighthub.com/internet/security-privacy/articles/82291.aspx
    - Update Root certs
    - Time/date out of sync, lear SSL state
    - re-register the dll files
    Microsoft article about with possible issues, the article is limited to Windows 2000, though it may apply to other versions:
    http://support.microsoft.com/kb/308087
    - Clear the Automatically detect proxy
    - Use a proxy server for this connection, enter address and port number of the proxy server that you use
    Also, we found we were able to access the revocation list through our internet network as well as outside our network. Not being able to access the revocation list could be an issue. Here is that URL:
    http://crl.usertrust.com/USERTrustLegacySecureServerCA.crl
    If you are able to identify an issue with cert or if the above solutions do not resolve the issue, please update this thread. Also update the thread if one of these does indeed solve the issue. It is always good to share what worked with others who could be seeing the same issue.
    -Roger
    updated Mar 15, 2012 w/additional text and links.

  • JRE 1.4.2_10 Silent install using MSi and JRE 5.0_06

    I have been unable to install JRE 1.4.2_10 using the msi and mst silently. My company requires all applications be installed using and msi not an exe. and with no user intervention. I can install using the msi and mst but not silently,.
    Also it does not allow me to choose IE as the default browser. I change the setting in the MST for IE, but this does not work, I still have to manually go in and change it after the install.
    I have the same issue with version 5.0_06. This does allow me to choose IE as the default browser but does not install silently.
    I am installing on Windows 2000 SP4.

    Can't help you with the MSI/MST part of your question directly, however we use the following command line:
    jre-1_5_0_04-windows-i586-p.exe /s /v" /qn ADDLOCAL=jrecore,extra IEXPLORER=1 REBOOT=ReallySuppress JAVAUPDATE=0 SYSTRAY=0"
    You might be able to make IEXPLORER=1 work for you via the MSI?
    Additionally, you can manage JRE settings via the following method -
    Place a file called 'deployment.config' in the following location:
    %SystemRoot%\Sun\Java\Deployment
    This file can act as a pointer to a configuration file (aka jre.properties)
    The contents of 'deployment.config' would look like (as an example):
    deployment.system.config=file://///servername/share/jre.properties
    'jre.properties' would then contain this like:
    deployment.version=1.5.0
    deployment.browser.path=C\:\\Program Files\\Internet Explorer\\iexplore.exe
    deployment.javaws.version=javaws-1.4.2_05
    deployment.system.cachedir=C\:\\Temp\\Java\\cache
    deployment.system.cachedir.locked
    deployment.user.logdir=C\:\\WINNT\\Debug\\UserMode
    deployment.user.logdir.locked
    deployment.proxy.type=3
    deployment.proxy.type.locked
    deployment.cache.max.size=10m
    deployment.cache.max.size.locked
    deployment.trace=false
    deployment.trace.locked
    deployment.log=false
    deployment.log.locked
    deployment.javapi.lifecycle.exception=false
    deployment.javapi.lifecycle.exception.locked
    deployment.console.startup.mode=DISABLE
    deployment.console.startup.mode.locked
    deployment.browser.vm.iexplorer=true
    deployment.browser.vm.iexplorer.locked
    deployment.browser.vm.mozilla=false
    deployment.browser.vm.mozilla.locked
    deployment.javaws.shortcut=NEVER
    deployment.javaws.shortcut.locked
    deployment.javaws.associations=NEVER
    deployment.javaws.associations.locked
    deployment.security.askgrantdialog.show=true
    deployment.security.askgrantdialog.show.locked
    deployment.security.askgrantdialog.notinca=true
    deployment.security.askgrantdialog.notinca.locked
    deployment.security.browser.keystore.use=true
    deployment.security.browser.keystore.use.locked
    deployment.security.notinca.warning=false
    deployment.security.notinca.warning.locked
    deployment.security.expired.warning=false
    deployment.security.expired.warning.locked
    deployment.security.jsse.hostmismatch.warning=false
    deployment.security.jsse.hostmismatch.warning.locked
    deployment.security.sandbox.awtwarningwindow=false
    deployment.security.sandbox.awtwarningwindow.locked
    deployment.security.sandbox.jnlp.enhanced=false
    deployment.security.sandbox.jnlp.enhanced.locked
    deployment.system.tray.icon=false
    deployment.system.tray.icon.locked
    For more details:
    <http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html>
    This could help you as well? Good luck.

Maybe you are looking for

  • Encore DVD Writing Cancels won't play on DVD player issue

    So I have a very confusing issue with encore. When I press build everything works fine. Then writing begins. The moment the writing reaches the end of the progress bar (the exact moment)  the progress bar goes to empty and the bottom bar says canceli

  • How to Check and Uncheck the JCheckBox in the JTable?

    Dear Friends, I created a Table using JTable and it consists first column is JCheckBox (JCheckBox is included in JTable by using TableCellRenderer) and two more columns with Id and Name. How to enable the check and uncheck the JCheckBox in the Table

  • Intercepting image buffer data

    I'm trying to develop a program which needs some image processing to occur on the stream of data being drawn to the screen as displayed by the camera. I don't actually need to capture the video, just process portions of the screen space. How should I

  • IBooks Author table of contennts

    Is it possible to add a different image on each table of contents page?

  • Text wrap while sending a form by email

    Hi, I have sent a form by e-mail.But the text in the form is getting wrapped. If I compare the PDF document in the e-mail with the normal print output the text is not in a readable format in PDF. Can anyone know what's the reason for this. Regards, A