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

Similar Messages

  • IE downloads jnlp-file

    I can not launch my application from IE.
    When I launch it from Command Prompt like this:
    javaws project.jnlp
    it works fine.
    But when I try to launch it from IE
    http://localhost:8080/project.jnlp
    it starts to download jnlp-file.
    What am I doing wrong?
    I use TomCat and it's web.xml file contains
    <mime-mapping>
    <extension>jnlp</extension>
    <mime-type>application/x-java-jnlp-file</mime-type>
    </mime-mapping>

    Make sure web start is installed, which is looks like it is.
    That should associate itself with jnlp files.
    In Explorer, Tools, Folder Options, File Types tab
    should be an entry for JNLP files to launch with javaws.exe
    Also needs to be associated with application/x-java-jnlp-file mime type
    (web start should have set both of these up).
    Make sure the IE setting:
    Empty Temp Internet Files when browser is closed = off/unchecked
    Empty your IE cache after restarting tomcat making sure that mime type is set there too, and then try again.
    Something else you can try is to double click your jnlp file and make sure web start opens it.

  • How to place exe file entries in JNLP

    I want the client to get the exe file while downloading using the jnlp file. my code use the exe file. so what will be the correct entry in the jnlp file. I have used many options but while downloading it gives the "CORRUPT JAR FILE " message.
    Please suggest

    Java WebStart is not a general purpose installer for random software. It is a deployment and update mechanism for Java software.
    You can only download JAR files through Java WebStart. If you really want to distribute an exe (there are probably better ways than JWS, though), you could wrap it in a JAR file and write a Java program that puts it in the right place on the client machine and starts it.
    Please note that you need to sign the jars and request full permissions for this to happen.

  • Always prompted to save JNLP file

    Hello! We have a simple servlet that basically just queries a few things off of the HttpServletRequest and spits back a dynamically generated JNLP file. For some reason, when we were running with Tomcat 4.0.6 this worked fine, but with the upgrade to Tomcat 4.1.29 it does not. IE always prompts to open or save the file - it never just launches JWS automatically anymore.
    Any suggestions on what we can fix? I'll put the interesting parts of the servlet below.
    Thanks in advance!
    -Angelina
    Servlet:
    public class JNLPServlet extends HttpServlet{
        public void doGet(HttpServletRequest request, HttpServletResponse response)
           throws IOException, ServletException {
            try {          
                response.setHeader("Cache-Control", "public");
                response.setContentType("application/x-java-jnlp-file");
                String sessionId = getSessionId(request);
                ServletOutputStream out = response.getOutputStream();
                java.net.InetAddress[] hostNetAddrs =
                              java.net.InetAddress.getAllByName(request.getServerName());
                String hostIpAddr = hostNetAddrs[0].getHostAddress();
                out.println(generateJNLP(sessionId, request.getServerName(),
                                         hostIpAddr, request.getRemoteUser()));
                out.flush();          
            catch (IOException ex) {
                response.sendError(javax.servlet.http.HttpServletResponse.
                                   SC_SERVICE_UNAVAILABLE, ex.getMessage());
            catch (Exception ex) {
                response.sendError(javax.servlet.http.HttpServletResponse.
                                   SC_INTERNAL_SERVER_ERROR, ex.getMessage());
        protected String generateJNLP(String sessionId, String host, String ip, String userName){
            StringBuffer buf = new StringBuffer();
            buf.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
            buf.append("<jnlp spec=\"1.0+\" codebase=\"http://" + ip + ":80/cmv2/\">\n");
            buf.append("<information>\n");
            buf.append("<title>App V2.3 on " + host + "</title>\n");
            buf.append("<vendor>EMC Corporation</vendor>\n");
            buf.append("<homepage href=\"http://www.emc.com\" />\n");
            buf.append("<description>Program for monitoring performance.");
            buf.append("</description>\n");
            buf.append("<icon href=\"cm.gif\" width=\"32\" height=\"32\" depth=\"3\" size=\"1k\" />\n");
            buf.append("<offline-allowed />\n");
            buf.append("</information>\n");
            buf.append("<security>\n");
            buf.append("<all-permissions />\n");
            buf.append("</security>\n");
            buf.append("<resources>\n");
            buf.append("<j2se version=\"1.4+\" href=\"http://java.sun.com/products/autodl/j2se\"");
            buf.append("initial-heap-size=\"64m\" max-heap-size=\"194m\" />\n");
            buf.append("<property name=\"host_name\" value=\"" + host + "\"/>\n");
            buf.append("<property name=\"host_port\" value=\"80\"/>\n");
            buf.append("<property name=\"host_IP\" value=\"" + ip + "\"/>\n");
            buf.append("<property name=\"secure_host_port\" value=\"443\"/>\n");
            buf.append("<property name=\"session_id\" value=\"" + sessionId + "\"/>\n");
            buf.append("<property name=\"user_name\" value=\"" + userName + "\"/>\n");
            buf.append("<jar href=\"cmv2.jar\" />\n");
            buf.append("<jar href=\"ohj-jewt-4_1_9.jar\" />\n");
            buf.append("<jar href=\"help-4_1_9.jar\" />\n");
            buf.append("<jar href=\"oracle_ice-5_06_3.jar\" />\n");
            buf.append("<jar href=\"emcshared.jar\" />\n");
            buf.append("<jar href=\"xerces.jar\" />\n");
            buf.append("</resources>\n");
            buf.append("<application-desc main-class=\"com.emc.wclient.Login\">\n");
            buf.append("</application-desc>\n");
            buf.append("</jnlp>\n");
            return buf.toString();
    }

    The underlying problem is a combination of tomcat 4/5 being more standard and IE being less standard. Tomcat changed to automatically add ";charset=ISO-8859-1" to the end of the Content-Type header while IE appears to not correctly process the Content-Type header.
    IE maintains a list of known MIME types in the registry under [HKCR]\MIME\Database\Content Type. There you will find an entry for 'application/x-java-jnlp-file' which indicates that this MIME type is treated as a file with the suffix '.jnlp'.
    Unfortunately, IE treats EVERYTHING after the Content-Type: as the MIME type NOT just the stuff between the ':' and the ';'. Thus instead of looking for a registry entry for 'application/x-java-jnlp-file' it winds up looking for 'application/x-java-jnlp-file;charset=ISO-8859-1" and doesn't find it.
    If you duplicate the 'application/x-java-jnlp-file' entry with the name 'application/x-java-jnlp-file;charset=ISO-8859-1' everything works. Alternatively, if you make sure the 'file name' portion of the URL which requests the jnlp spec has the suffix '.jnlp' IE will work correctly. If you are generating the jnlp spec via your own servlet you can control the behavior of Tomcat by calling 'setCharacterEncoding(null)' on the response object (note this is not a method of the HttpServletResponse interface, you have to cast to the underlying concrete type).
    So, I think IE's use of the 'suffix' is non-standard and IE's handling of the Content-Type header field is just broken. If you can make the requesting URL have the .jnlp suffix you are ok; otherwise, there does not appear to be a good solution.

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

  • 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

  • How to read JNLP files

    Hi , every body ,
    Cn any body give me the procedure to read a jnlp file ????
    Thanks ,
    SB

    This code may help you:
    This is in C:\Program Files\Java\jdk1.6.0_03\sample\jnlp\servlet\src\classes\jnlp\sample\servlet
    The file name JnlpFileHandler.java:
    public synchronized DownloadResponse getJnlpFileEx(JnlpResource jnlpres, DownloadRequest dreq)
         throws IOException {
    String path = jnlpres.getPath();
    URL resource = jnlpres.getResource();
    long lastModified = jnlpres.getLastModified();
    _log.addDebug("lastModified: " + lastModified + " " + new Date(lastModified));
    if (lastModified == 0) {
    _log.addWarning("servlet.log.warning.nolastmodified", path);
    // fix for 4474854: use the request URL as key to look up jnlp file
    // in hash map
    String reqUrl = HttpUtils.getRequestURL(dreq.getHttpRequest()).toString();
    // SQE: To support query string, we changed the hash key from Request URL to (Request URL + query string)
    if (dreq.getQuery() != null)
    reqUrl += dreq.getQuery();
    // Check if entry already exist in HashMap
    JnlpFileEntry jnlpFile = (JnlpFileEntry)_jnlpFiles.get(reqUrl);
    if (jnlpFile != null && jnlpFile.getLastModified() == lastModified) {
    // Entry found in cache, so return it
    return jnlpFile.getResponse();
    // Read information from WAR file
    long timeStamp = lastModified;
    String mimeType = _servletContext.getMimeType(path);
    if (mimeType == null) mimeType = JNLP_MIME_TYPE;
    StringBuffer jnlpFileTemplate = new StringBuffer();
    URLConnection conn = resource.openConnection();
    BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
    String line = br.readLine();
    if (line != null && line.startsWith("TS:")) {
    timeStamp = parseTimeStamp(line.substring(3));
    _log.addDebug("Timestamp: " + timeStamp + " " + new Date(timeStamp));
    if (timeStamp == 0) {
    _log.addWarning("servlet.log.warning.notimestamp", path);
    timeStamp = lastModified;
    line = br.readLine();
    while(line != null) {
    jnlpFileTemplate.append(line);
    line = br.readLine();
    String jnlpFileContent = specializeJnlpTemplate(dreq.getHttpRequest(), path, jnlpFileTemplate.toString());
    jnlpFileContent is the string which has all the content of the JNLP.
    //Anjali

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

  • Unable to set JNLP file more specifically then version 1.6+ for JavaFX

    The jnlp files produced for my JavaFX by NetBeans or the Eclipse plugin have <j2se version="1.5+"/>. When I launch my JavaFX applet from a page in my web-app, on machines with versions of java prior to ~1.6.0_14 the applet doesn't display. To try to force a Java update, I've been experimenting with the j2se version entry. I've got 1.6.0_16 on my development machine, and tried <j2se version="1.6.0_16+"/> and <j2se version="1.6.0.16+"/> to test out the jnlp. I expected that the applet would launch on my development machine, but the instead the java console stated that the version doesn't exist and the applet didn't display. I tried <j2se version="1.6.0_14+"/>, and I was warned that installing 1.6.0_14 would be a downgrade; I expected that my later version of java would pass the test and simply run the applet. What should I be using for the jnlp j2se version value to run properly such that a proper java update dialog is presented when necessary, and the applet just runs when the machine has a proper version of java installed?

    Hi,
    Try these 3 solutions
    1. Did you start vncserver services as:
    service vncserver start
    2.Check that port 5901 has not been blocked by a firewall:
    # nc -vz localhost 5901
    You should get a connection and a termination. If you get an error, fix the firewall.
    3. service iptables stop
    Hope This Helps
    Regards,
    -DK

  • Using DRS to specify Java version when executing JNLP file.

    We have an application that executes from a JNLP file that we are told is version sensitive.  We have a rule set created for a number of apps that work just fine to meet this goal.  However, when creating a rule to execute this JNLP application we are having issues getting it to work.  To simplify the process we created a certificate hash rule for this application and when reviewing console\trace we can see it correctly identifying and executing under the Java 6U29 environment.  The issue is that even though 6u29 is being invoked it does not work (merely displays a "application error" message).  However, if I instead launch the JNLP file using the Javaws.exe in the 1.6.0_29 folder the app loads fine.  When comparing behavior with the rule set environment and a 6u29 only environment I saw some peculiar entries. 
    basic:   jvmParams: [JVMParameters: isSecure: false, args: "-Xmx256m" "-Xms32m" "-DEAS_HOME=http://appserver:10080/easconsole/" "-DEPM_ORACLE_INSTANCE=http://appserver:10080/easconsole/" "-DUSE_FOXTROT_BY_DEFAULT=NO" "-DDEFAULT_COMMAND_MANAGER=com.essbase.eas.framework.client.defs.command.UICommandManager" "-Deas_country=US" "-Deas_language=EN" "-DEAS_CONSOLE_LOG=LOG_NULL" "-Djava.util.logging.config.class=oracle.core.ojdl.logging.LoggingConfiguration" "-DmaxFileSize=1000000" "-DmaxLogSize=5000000" "-Dformat=ODL-Text" "-DEAS_LOG_FORMAT=ODL-Text" "-Dsun.awt.keepWorkingSetOnMinimize=true" "-Dswing.defaultlaf=oracle.bali.ewt.olaf2.OracleLookAndFeel" "-Dswing.metalTheme=OracleBlueTheme"]
    basic: cmd 0 : C:\Program Files\Java\jre1.6.0_29\bin\javaw.exe
    basic: cmd 1 : -Dsun.awt.keepWorkingSetOnMinimize=true
    basic: cmd 2 : -Dswing.metalTheme=OracleBlueTheme
    basic: cmd 3 : -Xmx256m
    basic: cmd 4 : -Xms32m
    Xbootclasspath/a:C:\Program Files\Java\jre1.8.0_25\lib\javaws.jar;C:\Program Files\Java\jre1.8.0_25\lib\deploy.jar;C:\Program Files\Java\jre1.8.0_25\lib\plugin.jar
    basic: cmd 6 : -classpath
    basic: cmd 7 : C:\Program Files\Java\jre1.8.0_25\lib\deploy.jar
    basic: cmd 8 : -Djnlpx.vmargs=LURzdW4uYXd0LmtlZXBXb3JraW5nU2V0T25NaW5pbWl6ZT10cnVlAC1Ec3dpbmcubWV0YWxUaGVtZT1PcmFjbGVCbHVlVGhlbWUALVhteDI1Nm0ALVhtczMybQA=
    basic: cmd 9 : -Djnlpx.jvm=C:\Program Files\Java\jre1.6.0_29\bin\javaw.exe
    basic: cmd 10 : -Djnlpx.splashport=50425
    basic: cmd 11 : -Djnlpx.home=C:\Program Files\Java\jre1.8.0_25\bin
    basic: cmd 12 : -Djnlpx.remove=false
    basic: cmd 13 : -Djnlpx.offline=false
    basic: cmd 14 : -Djnlpx.relaunch=true
    basic: cmd 15 : -Djnlpx.session.data=C:\Users\Username\AppData\Local\Temp\session7225377494424974596
    basic: cmd 16 : -Djnlpx.heapsize=33554432,268435456
    basic: cmd 17 : -Djava.security.policy=file:C:\Program Files\Java\jre1.8.0_25\lib\security\javaws.policy
    basic: cmd 18 : -DtrustProxy=true
    basic: cmd 19 : -Xverify:remote
    basic: cmd 20 : -Dsun.awt.warmup=true
    basic: cmd 21 : -Djava.security.manager
    basic: cmd 22 : com.sun.javaws.Main
    basic: cmd 23 : C:\Users\Username\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\2\56c68c82-305f8577
    network: Created version ID: 1.7
    basic: Exiting
    So it appears that the 6u29 version of Javaws.exe is getting called however some of the configured paths are being set to the 8u25 path.  Not sure if its a cause but does seem to be relevant since on the exact same system if I run the JNLP specifically with the 6u29 exe it works as expected.  Any assistance would be appreciated. 

    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].

  • Reload of JNLP file fails

    Hi all,
    I update my JWS application. I needed to add a JAR archive and so I added a <jar>-entry in my JNLP file (that is included as extension within the main JNLP file).
    I now notice that a lot of users of my application don't get the newly added JAR archive (the application is throwing ClassNotFoundExceptions), so I think that their JNLP-file isn't updated when they start the application.
    From their bugreports I know that this problem is independent from the Java version they use (I get reports from 1.4.2 up to 1.6.0). And because the error is reported very often, I don't think that it's a proxy problem.
    Shouldn't the JNLP files as well as the JAR files be reloaded every time it changes on the server? Is there a way I can solve this without forcing every user to empty their Java Web Start cache?
    Thanks in advance,
    Markus

    Markus...
    If you find a solution, please let me know...
    So far, with very limited testings, it seems that IE 6.0 will download the new jnlp file, the FireFox will download only if you clear the browser cache; and I haven't figure out how to force the desktop shortcut that was created during the first installation to download the new jnlp file.
    Thanks....

  • 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

  • Web Start : JAR resources in JNLP file are not signed by same certificate

    What does this error mean exactly?
    All the jars in this JNLP file are signed by the same certificate it's just that some of them are also signed by another certificate.
    According to this closed/fixed bug : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4928787
    Web Start should not be rejecting jars due to multiple signers???
    Is this a regression in 1.6? or was this never actually fixed?
    I can make this work by not signing these 'presigned' jars and putting them into extension JNLP files but this is less than desirable.
    Some reasons for not using the extension JNLP:
    -- Avoid this bug (which is also marked closed but not fixed) --> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6566071
    -- I would like to sign all the jars I deliver with my own certificate.
    -- I would also like to give my clients the ability so sign the jars themselves (their own certificate) after they certify the application for distribution throughout their organization.

    Thanks for responding.
    Here is an example that will show the problem. If you want to try yourself:
    NanoHTTPD.java is from here -> [http://elonen.iki.fi/code/nanohttpd/|http://elonen.iki.fi/code/nanohttpd/]
    C:\test>java -version
    java version "1.6.0_03"
    Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
    Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode)
    C:\test>dir
    Volume in drive C has no label.
    Volume Serial Number is CCC7-E05D
    Directory of C:\test
    04/10/2008  12:34 PM    <DIR>          .
    04/10/2008  12:34 PM    <DIR>          ..
    04/10/2008  11:04 AM               130 hello.java
    04/10/2008  11:30 AM               500 hello.jnlp
    04/10/2008  11:06 AM                89 hellohelper.java
    04/10/2008  09:52 AM            20,547 NanoHTTPD.java
                   4 File(s)         21,266 bytes
                   2 Dir(s)  26,292,060,160 bytes free
    C:\test>type hello.java
    public class hello
    public static void main(String[] args)
    System.out.printf("Hello %s\n",hellohelper.getString());
    C:\test>type hellohelper.java
    public class hellohelper
    public static String getString()
    return "World";
    C:\test>type hello.jnlp
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://localhost/" href="" >
        <information>
            <title>hello</title>
            <vendor>hello</vendor>
            <description>hello</description>
        </information>
        <security>
            <all-permissions/>
        </security>
        <resources>
            <j2se version="1.6" />
            <jar href="hello.jar"/>
            <jar href="hellohelper.jar"/>
        </resources>
        <application-desc main-class="hello"/>
    </jnlp>
    C:\test>javac *.java
    Note: NanoHTTPD.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: NanoHTTPD.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    C:\test>jar cvf hello.jar hello.class
    added manifest
    adding: hello.class(in = 524) (out= 332)(deflated 36%)
    C:\test>jar cvf hellohelper.jar hellohelper.class
    added manifest
    adding: hellohelper.class(in = 283) (out= 212)(deflated 25%)
    C:\test>keytool.exe -genkey -alias hello1 -keystore hello1keys.jks -dname cn=hello1 -storepass hello1 -keypass hello1
    C:\test>keytool.exe -genkey -alias hello2 -keystore hello2keys.jks -dname cn=hello2 -storepass hello2 -keypass hello2
    C:\test>jarsigner -keystore hello1keys.jks -keypass hello1 -storepass hello1 hellohelper.jar hello1
    Warning:
    The signer certificate will expire within six months.
    C:\test>jarsigner -keystore hello1keys.jks -keypass hello1 -storepass hello1 hello.jar hello1
    Warning:
    The signer certificate will expire within six months.
    C:\test>start java -cp . NanoHTTPD
    C:\test>javaws hello.jnlpAt this point click accept to trust the code and the program runs. Here is the console output:
    Java Web Start 1.6.0_03
    Using JRE version 1.6.0_03 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\4381
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    0-5: set trace level to <n>
    Hello WorldNow for second signature, and run again:
    C:\test>jarsigner -keystore hello2keys.jks -keypass hello2 -storepass hello2 hellohelper.jar hello2
    Warning:
    The signer certificate will expire within six months.
    C:\test>javaws hello.jnlpThis time it fails. Console output:
    Java Web Start 1.6.0_03
    Using JRE version 1.6.0_03 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\4381
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    m:   print memory usage
    o:   trigger logging
    p:   reload proxy configuration
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    0-5: set trace level to <n>
    #### Java Web Start Error:
    #### JAR resources in JNLP file are not signed by same certificateTo verify jars:
    C:\test>jarsigner -verify -verbose -certs hello.jar
             135 Thu Apr 10 12:39:26 CDT 2008 META-INF/MANIFEST.MF
             256 Thu Apr 10 12:39:26 CDT 2008 META-INF/HELLO1.SF
             770 Thu Apr 10 12:39:26 CDT 2008 META-INF/HELLO1.DSA
               0 Thu Apr 10 12:37:36 CDT 2008 META-INF/
    sm       524 Thu Apr 10 12:37:04 CDT 2008 hello.class
          X.509, CN=hello1
          [certificate will expire on 7/9/08 12:38 PM]
      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore
      i = at least one certificate was found in identity scope
    jar verified.
    Warning:
    This jar contains entries whose signer certificate will expire within six months.
    C:\test>jarsigner -verify -verbose -certs hellohelper.jar
             141 Thu Apr 10 12:38:56 CDT 2008 META-INF/MANIFEST.MF
             262 Thu Apr 10 12:41:30 CDT 2008 META-INF/HELLO2.SF
             770 Thu Apr 10 12:41:30 CDT 2008 META-INF/HELLO2.DSA
             262 Thu Apr 10 12:38:56 CDT 2008 META-INF/HELLO1.SF
             770 Thu Apr 10 12:38:56 CDT 2008 META-INF/HELLO1.DSA
               0 Thu Apr 10 12:37:44 CDT 2008 META-INF/
    sm       283 Thu Apr 10 12:37:04 CDT 2008 hellohelper.class
          X.509, CN=hello2
          [certificate will expire on 7/9/08 12:38 PM]
          X.509, CN=hello1
          [certificate will expire on 7/9/08 12:38 PM]
      s = signature was verified
      m = entry is listed in manifest
      k = at least one certificate was found in keystore
      i = at least one certificate was found in identity scope
    jar verified.
    Warning:
    This jar contains entries whose signer certificate will expire within six months.Why does javaws say: "JAR resources in JNLP file are not signed by same certificate" when clearly they are both signed by the same certificate (the one aliased by CN=hello1)?

  • 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

  • ".. 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].

Maybe you are looking for

  • T61 sorround sound how to do it

    Hello sorry for my english. I have t61 with Win XP and dock station with SPDIF coaxial output. How to do it to work? Where in windows chose coaxial output. When i put on the dock DVI to HDMI works fine but i need sorround sound?

  • Replacing a ssd with a sshd?

    Can the stock ssd on a new MacBook pro 15.4" with retina be replaced with a hybrid ssd (Sshd)?  I want upgrade mine.  Also if it can will it void the warranty? THanks for the help!

  • Throwing fault to client

    hi all ...first of all i use 10.1.3.1. 1)I have defined a fault in service.xsd: <complexType name="SubscriberError"> <sequence> <element minOccurs="1" maxOccurs="1" name="errorCode" type="int"/> <element minOccurs="1" maxOccurs="1" name="errorDesc" n

  • Can FI run live first, then AA run later?

    Dear Experts, I just wonder could we let the customer to use FI first in the first phase, and subsequently they run AA in the 2nd phase (maybe 3-6months later after FI run live). Will there be any problem in period-end depreciation run? I guess the p

  • How to Install CA Certificates in B2B

    Hello I am new to B2B and I got CA and trusted certificates from our client. I used KeyStore tool and loaded all CA and trusted certificates and generated .jks file and used in the B2B certification section. With this I am able to connect to the clie