Configure jnlp file to correct encoding?

In my application I need to work with ISO-8859-1, because I have some special characters like ç, ã, á...
I configure my jnlp file to ISO-8859-1, but when I download the application web start don't show correct characters in "<title>compensação</title>", I didn't see correct characters "çã".
<?xml version="1.0" encoding="ISO-8859-1"?>
If someone can help me, I a new web start user, I may have forgotten to set some item.
I'm using java 1.5 with tomcat 5.5.
Thanks!!

I solved a similar issue through unicode entities, ç should be &#0231; (charmap will help you with the other chars).
Bye.

Similar Messages

  • Accented character encoding in JNLP files

    Hi everyone:
    Maybe I am missing something trivial, but I am having trouble encoding French accented characters in my JNLP files. For example, I tried to encode the name "Qu&eacute;bec" as follows:
    - Qu&eacute;bec: the file is not parsed completely and the application-desc tag appears to be missing. I know that this problem has already been reported by German and Swedish fellows.
    - Qu&eacute;bec: the file is parsed correctly but the &eacute; tag is not converted to "&eacute;."
    - Qu&#233;bec: the &#233; tag is not converted either.
    - Qu\u00d9bec: no conversion...
    - Qu\00d9;bec: still no conversion...
    How should I encode my accented characters so that they appear correctly in Java Web Start presentation windows?
    Thanks in advance for any help...
    Jean-Fran&ccedil;ois Morin

    Rather than trying some kind of escape sequence, how about just storing the file as whatever "native" codepage your system likes and then converting it to UTF-8 with the native2ascii utility for deployment (not ideal, but it may work):
    As mentioned here:
    http://java.sun.com/products/javawebstart/docs/developersguide.html#dev
    Which links to here:
    http://java.sun.com/products/jdk/1.1/docs/tooldocs/win32/native2ascii.html
    (the document appears to be identical for the various JDK releases--if you want the 1.3 version, just change 1.1 to 1.3 in the URL above).
    I don't know if this is simpler on not. HTH!
    John

  • Cannot parse *.Config file. Ensure you have configured the 'paypal' section correctly.

    I have added PayPal setting in web.config file and I can access paypay from my local. 
    I have copied that setting into web.debug.config and web.release.config but I can't access and I got the error from server.
    May I know what could be the reason?
    Cannot parse *.Config file. Ensure you have configured the 'paypal' section correctly.
    <paypal>
        <settings>
          <add name="mode" value="sandbox" />
          <add name="connectionTimeout" value="360000" />
          <add name="requestRetries" value="1" />
          <add name="clientId" value="xxx" />
          <add name="clientSecret" value="ccc" />
        </settings>
      </paypal>

    You can't add arbitrary application configuration to web.config, as that is used by Web API. Instead, add a configuration setting in the "app settings" section of the Configure tab in the portal.

  • Please ensure that the applicationhost.config file is correct and recommit the last configuration changes made

    I am receiving event ID 5189 on Server 2008 R2, IIS 7.5.  I experience this error across a number of servers, each of which is running only the default web site, but have 600+ applications running on the default web site.  Each application
    has its own application pool.  My point is, the applicationhost.config is rather large.
    I have seen a number of posts on this error message, but my issue itself seems to differ somewhat.  I am aware of a similar post: http://social.technet.microsoft.com/Forums/en-US/3128ee93-1319-4cc2-9257-003512caf476/event-id-5189-microsoftwindowswas?forum=exchangesvrgeneral
    which points to KB http://technet.microsoft.com/en-us/library/cc734988%28v=ws.10%29.aspx
    However, in my case, it doesn't seem that the extreme measures for this resolution are required.  The error usually indicates a corrupted applicationhost.config that must be manually fixed, or otherwise the WAS service needs to be restarted, or the
    server itself, etc.
    In my case, the issue can usually be fixed by an application pool recycle, or at worst a stop/start.  I have an application which is sensitive to recycles, and so we do not have periodic recycle events configured for this application, which is the bulk
    of the applications on the servers.  It seems to me that this issue is usually caused by the application being in use when there is an applicationhost.config change.
    For instance, we have one application that we deploy using msdeploy.  We found that when we ran an installation for this application via msdeploy, we were receiving this event, and we would subsequently get 500 errors in the application (sometimes the
    application pool corresponds to that which is identified in the event log, sometimes it doesn't).    It seems like applications that were being hit at the time the applicationhost.config was modified by msdeploy were affected.  In an attempt
    to correct this, we moved from msdeploy to a batch file containing appcmd commands.  This also did not resolve the issue.
    I have another application which is installed using PowerShell commandlets.  We started to notice that this script also caused the issue to occur on occasion.  As I continued to identify different processes that resulted in the same issue, I came
    to the conclusion that this is likely due to any change in the applicationhost.config.  I assume the issue is that the applicationhost.config is modified during a read operation to the file by the application pool, or WAS service, and that the recycle
    event, which corrects the issue, forces a re-read of the applicationhost.config, resolving the bad-read issue.
    Has anyone else experienced this, or do you have any recommendations?  My current work-around is to not install any applications during peak hours, and performing an IISRESET after installs are completed, to ensure application stability.
    Message              : The Windows Process Activation Service failed to generate an application pool config file for application pool 'myAppPool'. The error type is '7'. To resolve this issue,
    please ensure that the applicationhost.config file is correct and recommit the last configuration changes made. The data field contains the error number.
    Id                   : 5189
    Version              : 0
    Qualifiers           : 49152
    Level                : 2
    Task                 : 0
    Opcode               : 0
    Keywords             : 36028797018963968
    RecordId             : 324108
    ProviderName         : Microsoft-Windows-WAS
    ProviderId           : 524b5d04-133c-4a62-8362-64e8edb9ce40
    LogName              : System
    ProcessId            : 0
    ThreadId             : 0
    MachineName          : MyComputer
    TimeCreated          : 3/3/2014 9:03:24 PM
    ContainerLog         : system
    MatchedQueryIds      : {}
    Bookmark             : System.Diagnostics.Eventing.Reader.EventBookmark
    LevelDisplayName     : Error
    KeywordsDisplayNames : {Classic}
    Properties           : {System.Diagnostics.Eventing.Reader.EventProperty, System.Diagnostics.Eventing.Reader.EventProperty, System.Diagnostics.Eventing.Reader.EventProperty}

    As an update to this issue, after doing some research, it appears the behavior is related to a new feature in IIS7 called Application Pool Isolation (http://technet.microsoft.com/en-us/library/dd163536.aspx).
    This new feature prevents cross-application spillage by isolating the configuration for each application pool in IIS.  So in reality, an application pool never actually reads the applicationhost.config - that is just a master file, and each time it
    is update, it triggers a change to the individual application pool configuration files, located in C:\inetpub\temp\apppools.
    We did try setting Advanced Settings > Disable Recycling for Configuration Change to true, but after an IIS reset we were still able to reproduce the issue - worse actually, because in our test program, which continually hits the web
    service, and also continually makes apphost.config changes, when the two events collide, the 500.19 issue precipitates; but after an additional change to the apphost.config, it seems that the additional changes will actually correct the issue (seemingly forcing
    another recycle, which is also how we resolve the issue manually); after making this setting adjustment, once the 500.19 issue precipitates, additional changes to the apphost.config does not correct the problem, only a manual recycle corrects it.  This
    is the recycling.disallowRotationOnConfigChange property of the app pool.  We also set the setting for recycling.disallowOverlappingRotation to True as well, with the same result.
    We ARE able to prevent this issue by setting the C:\inetpub\temp\apppools\myapppool\myapppool.config to read-only, but for obvious reasons, this is not a desired work-around.
    It seems like what is happening is that any change to the ApplicationHost.config is resulting in each of the C:\inetpub\temp\apppools temp application pool config files being updated as well, in addition to triggering an application pool recycle.  It
    seems to me the desired behavior would be that these files are only updated if the applicationhost.config changes are specific to that application pool - but that doesn't seem to be the behavior.
    After turning on failed request tracing, I was able to narrow the error down more:
    ModuleName
    AnonymousAuthenticationModule
    Notification
    2
    HttpStatus
    500
    HttpReason
    Internal Server Error
    HttpSubStatus
    19
    ErrorCode
    2147942413
    ConfigExceptionInfo
    \\?\C:\inetpub\application\application\web.config ( 9) :Failed to decrypt attribute 'password'
    Notification
    AUTHENTICATE_REQUEST
    ErrorCode
    The data is invalid. (0x8007000d)
    This seems to be pretty static.  Trying to look into possible causes of this issue.

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

  • Console does not launch OVM 3.1.1, Win7x32 Firefox15/IE8 - Empty .jnlp file

    I have installed Oracle VM Manager 3.1.1, and two Oracle VMS servers; all seems to have gone pretty well after some learning curve. After success here, I created Clone of the most recent PeopleTools 8.5.2 and PeopleSoft HCM templates, and was able to start those machines. (Or at least, the Virtual Machine status shows "Running..." - read on.)
    However, when I try to launch the console, I get no success. First, when accessing the VMM server over HTTPS (port 7002), Java doesn't even try to start. Instead, basically, I get a screen blink and nothing else when I try to Launch Console from HTTPS. But when using HTTP:myVMM:7001, I get further. The Java logo appears briefly, and then I get "Application Error - Unable to launch the application" dialog. When I click on Details, I see the following under the Exception tab:
    JNLParseException[ Could not parse launch file. Error at line 0.]
         at com.sun.javaws.jnl.XMLFormat.decode(Unknown Source)
         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.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
         at com.sun.javaws.Main.launchApp(Unknown Source)
         at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
         at com.sun.javaws.Main$1.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Looking further into this, the .jnlp that's presented to JAVA by Launch Console is zero bytes in length. What might cause the .jnlp file to be empty?

    Thank you very much for your rapid reply, SPA2! It's encouraging!
    You named the file correctly, and there is only one ovm_rasproxy-ws.jnlp on the system. It is at /u01/app/oracle/ovm-manager-3/machine1/base_adf_domain/servers/AdminServer/tmp/_WL_user/ovm_core/tgzc2b/war/ovm_rasproxy-ws.jnlp. It is not empty - has a size of 1028 bytes, and the contents are listed at the bottom of this message.
    I don't know how to start the vncviewer directly from the OVM Manager machine. I did install the package (twice, in fact... and the second time stated "package tightvnc-java-1.3.9-3.noarch is already installed" There are no executables in the tightvnc-java-1.3.9-3.noarch.rpm package, and I have not found indication of what the URL would be. Can you help with that?
    Trying to find the version of Java from http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&ved=0CCwQFjAB&url=http%3A%2F%2Fwww.java.com%2Fen%2Fdownload%2Finstalled.jsp&ei=cFyOUL6OHpHo8QSrn4GIBg&usg=AFQjCNH6zuZGOL1prgUuefMNfg4eSpEOjQ I see "Something is wrong. Java is not working." So I uninstalled and reinstalled Java. Now it is Java 7 Update 9.
    Also - to further check this out, I did Save instead of Open from Firefox (IE does not give that option). Firefox saved a 0 byte file. I really appreciate the help.
    Contents of ovm_rasproxy-ws.jnlp:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="${Scheme}://${Server}:${ServerPort}/ovm/rasproxy/"
    href="ovm_rasproxy-ws.jnlp?${RequestUri}">
    <information>
    <title>Oracle VM Remote Access Service</title>
    <vendor>Oracle</vendor>
    <homepage>http://support.oracle.com/</homepage>
    </information>
    <resources>
    <!-- Application Resources -->
    <j2se version="1.5+"
    href="http://java.sun.com/products/autodl/j2se" />
    <jar href="ovm_rasproxy-signed.jar" main="true" />
    <jar href="commons-logging-1.1.1.jar" />
    </resources>
    <application-desc main-class="com.oracle.ovm.ras.proxy.RasProxyApplet">
    <argument>-server</argument>
    <argument>${Server}</argument>
    <argument>-service</argument>
    <argument>${Serviceid}</argument> <!--dynamic-->
    ${Credentials}
    </application-desc>
    <security>
    <all-permissions/>
    </security>
    <update check="always"/>
    </jnlp>
    Edited by: Dennis Lovelady on Oct 29, 2012 3:32 AM
    Edited by: Dennis Lovelady on Oct 29, 2012 3:36 AM to answer about installation of tightvnc and about Java version
    Edited by: Dennis Lovelady on Oct 29, 2012 4:10 AM

  • Indicated instalation path of the aplication in JNLP file

    Hi everybody,
    First of all, i would like to apologize about my english. Sorry about it.
    I got a problem with a deploymet of an application using Java Web Start.
    My application deploys correctly but i need a way to indicate where's the path i want to download the app.
    I've been read all documentacion about it but the argument productpath of the JNLP file doesn't works.
    I try a lot of differents ways in JNLP file, like:
    <application-desc main-class="MyPrincipalClass">
    <argument>-java</argument>
    <argument>-productpath</argument>
    <argument>DownloadedPath</argument>
    </application-desc>
    But any of them work.
    I need a way to indicate where the app must be downloaded when JNLP file is executed.
    Thanks in advanced.
    Regards from Isaac.

    ..the boss would like to have the possibility of decide
    where the application would be installed (for example: c:/MyApp/).Win XP?Start | Settings | Control Panel
    Java
    General (tab - default)
    'Temporary Internet Files' Settings.
    'Location:'  ChangeThis is how the end user (or their system administrator)
    can choose the installation location for Java Web-Start
    applications.
    Explain that to boss, and the end user, and I think
    they will be far less interested in the application
    itself offering an independent installation path.
    (after all - If I want my JWS apps. to be stored
    on the 'shared data' drive, I do not want to have
    to configure it for every single Web Start app. -
    just the plug-in - once)
    I've seen that this could be possible using
    productpath property in JNLP but this doesn't work.Huh? I do not know what you are refering to.
    Can you provide a net reference for 'productpath'?
    If chossing installation path it's not possible, ...It is (ultimately - though I want you to talk your
    boss out of such nonsense), as mentioned by
    Orclev using an 'installer' element - but that will be
    at the loss of a lot of other functionality (also as
    mentioned).
    i'd like to know how can obtain (during the
    downloaded process) the path where the
    application is being installed. Still not convinced the app. needs it, but on
    that matter, is your application running in
    a trusted environment? It is far easier to
    determine app. classpath if that is the case
    (in fact I am not sure it can be done in an
    untrusted app. - and that might be a security
    problem).

  • Dynamic generation of jnlp file

    I'm dynamically generating a jnlp file using a jsp to pass run-time parameters over to my Java application thusly:
    <%
    response.setContentType("application/x-java-jnlp-file");
    String userName = request.getParameter("username");
    String password = request.getParameter("password");
    String batchId = request.getParameter("batchid");
    out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
    out.println("<jnlp ");
    out.println("spec=\"1.0+\" ");
    out.println("codebase=\"http://server/directory\" ");
    out.println("href=\"this jsp file\">");
    ... other jnlp stuff...
    out.println("<application-desc main-class=\"myApp.myClass\">");
    out.println("<argument>" + userName + "</argument>");
    out.println("<argument>" + password + "</argument>");
    out.println("<argument>" + batchId + "</argument>");
    out.println("</application-desc>");
    out.println("</jnlp>");
    And use args[] to attempt to get the passed parameters in the Java application:
    userName = args[0];
    password = args[1];
    batchId = args[2];
    However, they don't seem to be passed over to the application as I get NullPointerExceptions. If I try to trace the state of the arguments by adding:
    FileOutputStream f = new FileOutputStream("w:output.txt");
    BufferedWriter w = new BufferedWriter(new OutputStreamWriter(f, System.getProperty("file.encoding")));
    w.write("userName: " + userName);
    w.write("password: " + password);
    w.write("batchId: " + batchId);
    f.flush();
    f.close();
    The output file is completely empty.
    1. Am I passing the arguments in wrongly?
    2. Why is the output not being written in the file?
    My thanks in advance for any assistance offered.
    Erkton

    Erkton,
    I use a similar approach and it does work. The main gotchas I found were typos. I would suggest temporarily changing the
    response.setContentType("application/x-java-jnlp-file");
    line to
    response.setContentType("text/xml");
    and looking at your JNLP file as XML and verifything that you got everything write. Look for beginning and end tags, stuff like that.
    Once you have it right then switch it back to JNLP.
    One other thing to look out for is Internet Explorer doesn't like jnlp files unless they end with a .jnlp extension. I had to rename my jnlp files to end with .jnlp instead of .jsp for IE to parse them correctly. I don't think thats the issue you are running into, but you may want to look out for it.

  • 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

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

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

  • Issue With Signed JNLP file

    Hello,
    There seems to be a restriction in signed JNLP files with regards to relative path set in codebase ?
    (when we set the codebase to be a full url of the download site it works.).
    The problem for us is we want JNLP file for dev and Prod to be identical and not having to hardcode
    download URL.
    We have a start.jnlp which start our app. All our jars are signed. To avoid the usual warning message
    we decided to sign the JNLP file and include JNLP-INF/APPLICATION.JNLP in our jar that contain the main file.
    //start.jnlpl and APPLICATION.JNLP have the following
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp codebase="webstart" href="start.jnlp">
    </jnlp>
    Error/Exception
    BadFieldException[ The field <jnlp>codebase has an invalid value in the signed launch file: webstart,webstart]
         at com.sun.javaws.jnl.XMLUtils.getAttributeURL(Unknown Source)
         at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
         at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
         at com.sun.javaws.LaunchDownload.checkSignedLaunchDescHelper(Unknown Source)
         at com.sun.javaws.LaunchDownload.checkSignedLaunchDesc(Unknown Source)
         at com.sun.javaws.Launcher.prepareLaunchFile(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)
    Any input will be greatly appreciated.
    Thanks
    Jc

    >
    There seems to be a restriction in signed JNLP files with regards to relative path set in codebase ?
    (when we set the codebase to be a full url of the download site it works.).>That is a problem. Sun seems to think there are many forms of launching where the codebase must be explicitly set for the JNLP to work correctly, and this is one of them. In fact, the only time I know it will work with a relative codebase is when embedding an applet using JNLP - and then it has to have no codebase to work!
    >
    The problem for us is we want JNLP file for dev and Prod to be identical and not having to hardcode
    download URL.>But this is really a matter of approaching the problem the most efficient way, and I would argue that way is to write a build file which will make both versions of the application. It might require a more complicated build file (OK - it will require a more complicated build file), but once it is done you will barely notice any difference in build time, and you can get on with development.

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

    I am running my application under Java Web Start with different jars signed. I following the advances use multiple JAR files in JNLP files below.
    But i message error "+*JAR resources in JNLP file are not signed by same certificate*+" is posted still.
    Could you please help me to solve it?
    Thanks
    Best Regards,
    Tuan Pham
    index.jnlp_
    +<?xml version="1.0" encoding="utf-8"?>+
    +<jnlp spec="1.0+" codebase="http://localhost:8080/quotationsys" href="index.jnlp">
    +<information>+
    +<title>File Viewer</title>+
    +<vendor>IBM developerWorks</vendor>+
    +<homepage href="index.html"/>+
    +<description>File Viewer</description>+
    +<description kind="short">File Viewer</description>+
    +</information>+
    +<security>+
    +<all-permissions/>+
    +</security>+
    +<resources>+
    +<j2se version="1.5.0_*" />+
    +<jar href="quotationsys.jar"/>+
    +<nativelib href="swt-lib.jar"/>+
    +<jar href="swt.jar"/>+
    +<extension href="extlib.jnlp"/>+
    +</resources>+
    +<application-desc main-class="layout.MainMenu"/>+
    +</jnlp>+
    extlib.jnlp_
    +<?xml version="1.0" encoding="utf-8"?>+
    +<jnlp spec="1.0+" codebase="http://localhost:8080/quotationsys" href="index.jnlp">
    +<information>+
    +<title>File Viewer</title>+
    +<vendor>IBM developerWorks</vendor>+
    +<homepage href="index.html"/>+
    +<description>File Viewer</description>+
    +<description kind="short">File Viewer</description>+
    +</information>+
    +<security>+
    +<all-permissions/>+
    +</security>+
    +<resources>+
    <jar href="cvom.jar"/>           
    <jar href="CrystalReportsRuntime.jar"/>
    <jar href="CrystalCommon2.jar"/>
    <jar href="DatabaseConnectors.jar"/>
    <jar href="JDBInterface.jar"/>
    <jar href="keycodeDecoder.jar"/>
    <jar href="pfjgraphics.jar"/>
    <jar href="QueryBuilder.jar"/>
    <jar href="commons-collections-3.1.jar"/>
    <jar href="commons-configuration-1.2.jar"/>
    <jar href="commons-lang-2.1.jar"/>
    <jar href="commons-logging.jar"/>
    <jar href="com.ibm.icu_3.8.1.v20080530.jar"/>
    <jar href="log4j.jar"/>
    <jar href="xpp3.jar"/>
    <jar href="jai_imageio.jar"/>
    <jar href="logging.jar"/>
    <jar href="com.azalea.ufl.barcode.1.0.jar"/>
    +</resources>+
    +<component-desc/>+
    +</jnlp>+
    Edited by: pttuan on Apr 13, 2009 1:55 AM

    Are all of the jars in extlib.jnlp signed by the same cert? I think that the extension mechanism lets you get around having all of the jars for an overall app have the same signer, but I think it's still required that all of the jars within a given jnlp file have to have the same signer. So for you, all the jars in index.jnlp have to be signed by "cert A" and all the jars in extlib.jnlp have to be signed by "cert B". If that's not the case, you may need to split it up into multiple extensions.

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

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

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

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

Maybe you are looking for