Java Web Start (JNLP) getResource return null.

I have a Java Web Start Swing application and with the Java version 1.6.0_u27.
same code run from jdk1.1.8 to jdk 1.6, more then 10 customers it's work fine, java web start only run on jdk 1.4.0 and jdk 1.5.0.
just migrate one customer from Java version 1.5.0_u6 to 1.6.0_u27.
sometimes, the getResource will return null, when system return null, then system cannot get any other resource, always return null.
It only happen in Java web start environment, work fine in command line (java/javaw), and same as the WebStart loses resources post,
"Unfortunately this cannot be reproduced easily. Sometimes this happens after some minutes, sometimes the application can be used for days without problems.",
note. all of my resource files put in the same jar file, one resource file in that jar get fail, all files will be fail.
after I get the url, I will use new BufferedInputStream(url.openStream()); to retrieve data, never use the File object.
for example, get resource from "/path/a1.xml", "/path/a2.xml"....... 30 minutes pass, get same file "/path/a1.xml" will return null, then all resource will return null.
URL url = getClass().getResource(s);
if(url == null) {
System.out.println(getClass().getResourceAsStream(s)); // also null, log only
// if the url == null, the following retrieve will be null
url = Thread.currentThread().getContextClassLoader().getResource(s);
if(url == null){
System.out.println(Thread.currentThread().getContextClassLoader().getResourceAsStream(s)); // also null, log only
ClassLoader loader = getClass().getClassLoader();
if(loader == null){
loader = ClassLoader.getSystemClassLoader();
if(loader != null) {
System.out.println(loader.getResourceAsStream(s)); // also null, log only
url = loader.getResource(s);
if(url == null) {
System.out.println("URL resource still can not found!!" + s);
Edited by: M. Jwo on 2011/11/3 上午 5:40

I ran into the same problem with JNLP and IE.
Here is the trick I am using to make IE think that it is dealing with "real" .jnlp file. This works on JBoss-3.2.1/Tomcat-4.1.24 bundle.
In web.xml:
<servlet>
<servlet-name>fakejnlp</servlet-name>
<description>jsp that generates JNLP on the fly</description>
<jsp-file>start.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>fakejnlp</servlet-name>
<url-pattern>/start.jnlp</url-pattern>
</servlet-mapping>
Now, when you request start.jnlp (perhaps, with HTTP parameters), you end up executing your start.jsp. IE is happy. One limitation, though: if you need to pass parameters, there should be no href attribute in <jnlp> element.
HTH
Alex

Similar Messages

  • Call thirty party java web service but always return null

    hi
    I call a java web service in my application visual studio 2008 c#, but always return NULL.
    I used Tool Fiddler to monitor the traffic between my client and the web service server, it showed the return is not Null.
    Here is my code, please see if anything I do wrong.
    namespace CanOfficer_THQ_vs_IHQ.TestWebReferenceAppointment {
    using System.Diagnostics;
    using System.Web.Services;
    using System.ComponentModel;
    using System.Web.Services.Protocols;
    using System;
    using System.Xml.Serialization;
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Web.Services.WebServiceBindingAttribute(Name="AppointmentServiceSoapBinding", Namespace="http://service.ips.salvationarmy.org/")]
    public partial class AppointmentService : Microsoft.Web.Services3.WebServicesClientProtocol {
    private System.Threading.SendOrPostCallback deleteAppOperationCompleted;
    private System.Threading.SendOrPostCallback importAppOperationCompleted;
    private System.Threading.SendOrPostCallback editAppOperationCompleted;
    private bool useDefaultCredentialsSetExplicitly;
    /// <remarks/>
    public AppointmentService() {
    this.Url = global::CanOfficer_THQ_vs_IHQ.Properties.Settings.Default.CanOfficer_THQ_vs_IHQ_TestWebReferenceAppointment_AppointmentService;
    if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
    this.UseDefaultCredentials = true;
    this.useDefaultCredentialsSetExplicitly = false;
    else {
    this.useDefaultCredentialsSetExplicitly = true;
    public new string Url {
    get {
    return base.Url;
    set {
    if ((((this.IsLocalFileSystemWebService(base.Url) == true)
    && (this.useDefaultCredentialsSetExplicitly == false))
    && (this.IsLocalFileSystemWebService(value) == false))) {
    base.UseDefaultCredentials = false;
    base.Url = value;
    public new bool UseDefaultCredentials {
    get {
    return base.UseDefaultCredentials;
    set {
    base.UseDefaultCredentials = value;
    this.useDefaultCredentialsSetExplicitly = true;
    /// <remarks/>
    public event deleteAppCompletedEventHandler deleteAppCompleted;
    /// <remarks/>
    public event importAppCompletedEventHandler importAppCompleted;
    /// <remarks/>
    public event editAppCompletedEventHandler editAppCompleted;
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
    RequestNamespace="http://service.ips.salvationarmy.org/",
    ResponseNamespace="http://service.ips.salvationarmy.org/",
    Use=System.Web.Services.Description.SoapBindingUse.Encoded,
    ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    [return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string deleteApp([System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int id) {
    object[] results = this.Invoke("deleteApp", new object[] {
    id});
    return ((string)(results[0]));
    /// <remarks/>
    public void deleteAppAsync(int id) {
    this.deleteAppAsync(id, null);
    /// <remarks/>
    public void deleteAppAsync(int id, object userState) {
    if ((this.deleteAppOperationCompleted == null)) {
    this.deleteAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OndeleteAppOperationCompleted);
    this.InvokeAsync("deleteApp", new object[] {
    id}, this.deleteAppOperationCompleted, userState);
    private void OndeleteAppOperationCompleted(object arg) {
    if ((this.deleteAppCompleted != null)) {
    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
    this.deleteAppCompleted(this, new deleteAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
    RequestNamespace="http://service.ips.salvationarmy.org/",
    ResponseNamespace="http://service.ips.salvationarmy.org/",
    Use=System.Web.Services.Description.SoapBindingUse.Encoded,
    ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    [return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string importApp(
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int person,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string name,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string territory,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string location,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] bool primary,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> start,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> end,
    [System.Xml.Serialization.XmlElementAttribute("categories", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string[] categories) {
    object[] results = this.Invoke("importApp", new object[] {
    person,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories});
    return ((string)(results[0]));
    /// <remarks/>
    public void importAppAsync(int person, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories) {
    this.importAppAsync(person, name, territory, location, primary, start, end, categories, null);
    /// <remarks/>
    public void importAppAsync(int person, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories, object userState) {
    if ((this.importAppOperationCompleted == null)) {
    this.importAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OnimportAppOperationCompleted);
    this.InvokeAsync("importApp", new object[] {
    person,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories}, this.importAppOperationCompleted, userState);
    private void OnimportAppOperationCompleted(object arg) {
    if ((this.importAppCompleted != null)) {
    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
    this.importAppCompleted(this, new importAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
    /// <remarks/>
    [System.Web.Services.Protocols.SoapDocumentMethodAttribute(
    RequestNamespace="http://service.ips.salvationarmy.org/",
    ResponseNamespace="http://service.ips.salvationarmy.org/",
    Use=System.Web.Services.Description.SoapBindingUse.Encoded,
    ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
    [return: System.Xml.Serialization.XmlElementAttribute("return", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
    public string editApp(
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] int id,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string name,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string territory,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string location,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] bool primary,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> start,
    [System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] Nullable<System.DateTime> end,
    [System.Xml.Serialization.XmlElementAttribute("categories", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)] string[] categories) {
    object[] results = this.Invoke("editApp", new object[] {
    id,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories});
    return ((string)(results[0]));
    /// <remarks/>
    public void editAppAsync(int id, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories) {
    this.editAppAsync(id, name, territory, location, primary, start, end, categories, null);
    /// <remarks/>
    public void editAppAsync(int id, string name, string territory, string location, bool primary, Nullable<System.DateTime> start, Nullable<System.DateTime> end, string[] categories, object userState) {
    if ((this.editAppOperationCompleted == null)) {
    this.editAppOperationCompleted = new System.Threading.SendOrPostCallback(this.OneditAppOperationCompleted);
    this.InvokeAsync("editApp", new object[] {
    id,
    name,
    territory,
    location,
    primary,
    start,
    end,
    categories}, this.editAppOperationCompleted, userState);
    private void OneditAppOperationCompleted(object arg) {
    if ((this.editAppCompleted != null)) {
    System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
    this.editAppCompleted(this, new editAppCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
    /// <remarks/>
    public new void CancelAsync(object userState) {
    base.CancelAsync(userState);
    private bool IsLocalFileSystemWebService(string url) {
    if (((url == null)
    || (url == string.Empty))) {
    return false;
    System.Uri wsUri = new System.Uri(url);
    if (((wsUri.Port >= 1024)
    && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
    return true;
    return false;
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    public delegate void deleteAppCompletedEventHandler(object sender, deleteAppCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class deleteAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    private object[] results;
    internal deleteAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
    base(exception, cancelled, userState) {
    this.results = results;
    /// <remarks/>
    public string Result {
    get {
    this.RaiseExceptionIfNecessary();
    return ((string)(this.results[0]));
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    public delegate void importAppCompletedEventHandler(object sender, importAppCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class importAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    private object[] results;
    internal importAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
    base(exception, cancelled, userState) {
    this.results = results;
    /// <remarks/>
    public string Result {
    get {
    this.RaiseExceptionIfNecessary();
    return ((string)(this.results[0]));
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    public delegate void editAppCompletedEventHandler(object sender, editAppCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.5483")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class editAppCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
    private object[] results;
    internal editAppCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
    base(exception, cancelled, userState) {
    this.results = results;
    /// <remarks/>
    public string Result {
    get {
    this.RaiseExceptionIfNecessary();
    return ((string)(this.results[0]));

    Hi;
    I used Fiddler to monitor the process, and it showed the request sent thru web service worked and returned a value, but in my .Net application the return captured as NULL. Could you please look into the code above and the result from Filddler and see if
    you can help.
    thank you.
    REQUEST:
    POST https://159.253.140.178/services/AppointmentService HTTP/1.1
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.4252)
    Content-Type: text/xml; charset=utf-8
    SOAPAction: ""
    Host: 159.253.140.178
    Content-Length: 1589
    Expect: 100-continue
    Connection: Keep-Alive
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://service.ips.salvationarmy.org/" xmlns:types="http://service.ips.salvationarmy.org/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
    <soap:Header>
    <wsse:Security mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsse:Username>
    [email protected]
    </wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">
    tpi4IPSws!
    </wsse:Password>
    </wsse:UsernameToken>
    </wsse:Security>
    </soap:Header>
    <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <tns:importApp>
    <person xsi:type="xsd:int">
    169275
    </person>
    <name xsi:type="xsd:string">
    Corps Officer (Cahul-Russia) Test12
    </name>
    <territory xsi:type="xsd:string">
    CAN
    </territory>
    <location xsi:type="xsd:string">
    TEST LOCATION 12
    </location>
    <primary xsi:type="xsd:boolean">
    true
    </primary>
    <start xsi:type="xsd:dateTime">
    2013-05-30T00:00:00
    </start>
    <end xsi:type="xsd:dateTime">
    2014-06-04T00:00:00
    </end>
    <categories href="#id1" />
    </tns:importApp>
    <soapenc:Array id="id1" soapenc:arrayType="xsd:string[1]">
    <Item>
    vpsCat1
    </Item>
    </soapenc:Array>
    </soap:Body>
    </soap:Envelope>
    RESPONSE:
    HTTP/1.1 200 OK
    Server: Apache-Coyote/1.1
    Content-Type: text/xml;charset=UTF-8
    Content-Length: 232
    Date: Fri, 05 Sep 2014 19:45:22 GMT
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <ns2:importAppResponse xmlns:ns2="http://service.ips.salvationarmy.org/">
    <return>
    OK_572463
    </return>
    </ns2:importAppResponse>
    </soap:Body>
    </soap:Envelope>

  • Deploy Forms 10g applications using Java Web Start (JNLP)

    I wonder if anybody can help me out to use WebStart for my Oracle Application . Currently our application is running using Jinitiator.recently i got to know that webstart is another method to run webforms as just as Client/Server ,am not able create an exact JNLP file and i could't see much posts related to this.
    Thanks & Regards
    Najeeb.M

    You can avoid extra windows simply by setting separateFrame=false in the formsweb.cfg. Another helpful tip, if your page does not contain any extra html, is to set the height and width as follows:
    HEIGHT=100%
    WIDTH=100%
    This will cause the applet container to use all available browser window space. It will also cause the applet container size to dynamically adjust if the browser window is resized. This tends to create a more professional look-and-feel.

  • How to debug java web start with jdk1.5?

    i want to debug a JWS app with eclipse, not java console, so I follow Unofficial Java Web Start/JNLP FAQ(http://lopica.sourceforge.net/faq.html) and still not worked.
    the attached session worked at first and broke soon, and I found some idea from Unofficial Web Start FAQ Update/Errata(http://lopica.sourceforge.net/update.html). I did the following:
    set JAVAWS_TRACE_NATIVE=1
    javaws http://localhost/test/test.jnlp
    copy command line from popup window.
    add "transport=dt_socket,server=y,address=7000" to command line:
    C:\progra~1\Java\jdk1.5.0_03\bin\javaw.exe -Xrunjdwp:transport=dt_socket,server=y,address=7000 -Xbootclasspath/a:C:\progra~1\Java\jre1.5.0_04\lib\javaws.jar;C:\progra~1\Java\jre1.5.0_04\lib\deploy.jar -classpath C:\progra~1\Java\jre1.5.0_04\lib\deploy.jar -Djnlpx.home=C:\progra~1\Java\jre1.5.0_04\bin -Djnlpx.splashport=4362 -Djnlpx.jvm="C:\progra~1\Java\jdk1.5.0_03\bin\javaw.exe" -Djnlpx.remove=false -Djava.security.policy=file:C:\progra~1\Java\jre1.5.0_04\lib\security\javaws.policy -DtrustProxy=true -Xverify:remote -Djnlpx.heapsize=NULL,NULL com.sun.javaws.Main http://localhost:8080/test/test.jnlp
    the debugger still gets detached. I don't know what's wrong.
    JWS has come out for many years, I still found so many undocumented skills, even netbeans5 doesn't support it. Sun want to give up java?

    Try checking out this other thread, particularly the reply from dietz333 (I happen to know he's a regular genius when it comes to JavaWS):
            http://forum.java.sun.com/thread.jspa?forumID=38&threadID=569693

  • Java web start and .JRXML

    Hello everyone.
    I have an application form calling from browsers from client side using Java web start (JNLP) and applications has one report (.jrxml file) which is placed at server. I could start application form from client browsers but at the time of executing report it does not respond. There is no message , I think does not find path of where .jrxml file is placed. Can any one help me. Pl. note that reports get executed when users presses button on form.
    With thanks !
    prashant

    bump

  • Free Unofficial Web Start/JNLP FAQ pdf booklet released

    Hi,
    I finally finished the docbook conversion and the Unofficial Java Web Start/JNLP FAQ is now available as a pdf booklet for printing and offline consumption.
    The FAQ is a living, growing list of answers, not just a publish-and-forget-it static dead-tree booklet, help to improve it. Post your insights and corrections here or mail them to [email protected] Your contributions are welcome.
    The FAQ is online at http://www.geocities.com/vamp201/jwsfaq.html
    The pdf booklet is online at
    http://www.geocities.com/vamp201/download/jwsfaq.pdf
    Enjoy
    - Gerald

    Gerald,
    a couple of comments on the FAQ regarding
    Q: Can I use JWS for Intranet apps?
    file:/// works where file:// doesn't
    also including the path to the .jnlp file in double quotes allows to use path containg empty spaces.
    example:
    javaws "file:///C:\Program Files\Java Web
    Start\.javaws\cache\http\Dlocalhost\P80\DMclient\AMdemo.jnlp"

  • Unofficial Web Start/JNLP FAQ updated

    Hi,
    I updated and added new entries to the Unofficial FAQ:
    * Is Web Start available for Macintosh?
    * Does Web Start support downloading jars using FTP?
    * How can I start Web Start's app manager (aka Web Start Player) automatically at boot time/restart time?
    * How can I start Web Start's app manager from a web page?
    * How can I tell Web Start to use either a hotspot or classic virtual machine?
    * How can I connect to a database?
    * How can I reference a Java Help helpset?
    * How can I change the proxy configuration in javaws.cfg?
    * How can I retrieve the proxy settings from Web Start?
    * How can I call other programs or shell scripts in Java?
    * How can I pass dynamic command line arguments to Web Start on the command line?
    * Why doesn't my app run under Web Start?
    Thanks to everyone for posting their insights.
    Note, that I cannot answer your individual questions.
    Please, post your questions on Sun's forum instead of mailing me.
    Any corrections or suggestions, however, are more than welcome, please send them to [email protected]
    - Gerald Bauer
    PS: Here is the Unofficial Web Start/JNLP FAQ link just in case:
    http://www.vamphq.com/jwsfaq.html

    Hi,
    I updated and added new entries to the Unofficial FAQ. Here is this months line up. New Entries:
    * How can I list all resources in a jar?
    * How can I talk to servlets from my Web Start app?
    * How can I use Web Start and RMI together?
    * How can I detect if my app is offline?
    * Can I use Web Start to deploy server apps?
    * Can I use Web Start to deploy apps to mobile devices (J2ME)?
    * Why can't I start Web Start's app manager under Windows? Why does the app manager's preferences dialog fail to appear?
    * Why doesn't Web Start reprompt for proxy logins?
    * Can Web Start handle multiple XML parsers at once?
    Updated Entries:
    * How can I add JNLP MIME-types to my ISP's Apache Web Server?
    * Is Web Start available for Macintosh?
    * How can I connect to a database?
    The Unofficial Java Web Start/JNLP FAQ is located at
    http://www.vamphq.com/jwsfaq.html
    A free 40 page pdf booklet is available as well for offline consumption and printing.
    As always thanks to everyone for posting their insights.
    - Gerald Bauer

  • Java web start error running Asset Editor or any jnlp page

    When I try to launch Asset Editor or Import/Export or any of the jnlp pages that runs using Java Web Start, I get an error. Java 7 Web start starts but It throws “Could not connect to Server. Please check your Java Web Start and Browser proxy settings”.
    I read conflicting opinions on the internet as to what version of JRE/JDK is needed and potentially some issues running Java Web start with Java 7. I have 64-bit java 1.7.0_45 JDK/JRE installed and no other version. I tried installing 32-bit 1.7.0_45 as well. I have tried to run it from 32-bit as well as 64-bit browser also. All situations provide the same error.
    However, when I install JRockit, it seems to work fine. But we cannot use jrockit. We have to use IBM JDK/JRE 7 eventually. Currently, the java web start does not work on Oracle Java as well as IBM JRE.
    Any help is much appreciated.

    I found a solution for this problem. We have to apply patch 17634436.
    https://support.oracle.com/epmos/faces/ui/patch/PatchDetail.jspx?_afrLoop=149081897091441&patchId=17634436&_afrWindowMode=0&_adf.ctrl-state=xfsajjmff_74
    Just thought it will be useful for anyone encountering this problem.

  • Dynamic JNLP - displaying using java web start

    Hi,
    I am creating a dynamic JNLP in a servlet at the server side. Please see below.
    String someJnlpString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n" +
                                                "<jnlp .....    >    </jnlp>";       
            String attachment = "inline; filename=\"launch.jnlp";           
            String ct = "application/x-java-jnlp-file";
            OutputStreamWriter out = new OutputStreamWriter(response.getOutputStream());
            response.setContentType(ct);
            response.setHeader("Cache-Control", "max-age=30");
            response.setHeader("Content-disposition", attachment);
            out.write(someJnlpString);{code}
      Then in my JSP, I am trying to open this JNLP  by using the following code
    {code}        window.open('servlet/DisplayImage?arg=first-arg");The exception that I am getting is JNLParseException could not parse launch file. Error at line 0. If I open the downloaded file then its working.
    Can somebody please advise me how can I directly open that JNLP from the servlet by using java web start?
    Thanks a ton,
    Subhash

    I am able to run it now after clearing the java cache

  • Java Web Start and JNLP Problem

    Hi !
    I�m a student and i need your help for a work that i have to do.
    I have an aplication that parse an XML file.
    The XML file is in ther server, and when i run the aplication with Java Web
    Start and jnlp file i want that the application parse a XML file.
    is this possible??? how can i do ???
    if you dont understand please warn me, that i try to explain better..
    thanks, in advance.
    Rui Silva , Portugal

    I'm not sure that you need webstart.
    Just an applet will allow you to read a file from the server:
    Just open a URL pointing to the .xml file.
    Read the file into a buffer and then parse it.
    Now actually getting the applet to do something with the contents of the .xml file
    is more complicated. Presumably you need to write something which understands the
    contents of the .xml and does something in response to the contents.
    A signed java program can be run from with in webstart which can spawn processes on
    the local machine. os.systemExec("command a b c"); But of course that has cross platform
    problems.
    Good luck

  • Prevent JNLP from being cached in the Java Web Start cache

    Hi,
    when i launch a JNLP it's always being cached in the Java Web Start cache. Is there a way to prevent it from being cached? Some attribute/property inside it?
    Thanks!

    Set the http headers in the response from the server when the client downloads the jnlp file.
    eg Cache-control no-cache
    Expires (use same date as "date" header)
    Note that over SSL on Internet Explorer 8 this will not work. All other configurations should be ok.

  • Firefox asks me everytime on JNLP files rather than its set 'Java Web Start'

    See I have classes with a 'Java Web Start' program which every week I download different JNLP files to start the Java program.
    I have set fire fox to use 'Java Web Start Launcher' for JNLP files but every time it ignores my setting and still asks every time. What can I do to make not ask and open the JNLP files?
    This Happened: Firefox does this all the time.
    I have Firefox 5.0 Installed.

    Hi,
    You mention that "I've downloaded "jcert.jar", "jnet.jar" and "jsse.jar" and put them in "..jre/lib/ext" used by JWS in client". Did you manually move these jar files into ..jre/lib/ext or using jnlp extension. I been trying to use jnlp extension (wanted to make it unnoticable to our client) to do this for a while now without luck. Can you tell me how you going about do this?
    thanks.

  • About java web start and *.jnlp

    very strange. I can start it if I replace http://127.0.0.1/ with
    file:///d:/ I copy the same .jar, .html, .jnlp to the www root, then my
    browser can't start it, just display it as a text file. like the
    following. Who knows what's happening here. Thanks!
    <?xml version="1.0" encoding="UTF-8" ?>
    - <jnlp spec="1.0+" codebase="http://127.0.0.1/test"
    href="Geostatistics.jnlp">
    - <information>
    <title>Geostatistics Demo App</title>
    <vendor>NCGIA UCSB</vendor>
    <homepage href="http://127.0.0.1/test/Geostatistics.html" />
    <description>This is an active learning demo for
    geostatistics</description>
    <icon href="../image/duke.jpg" />
    <offline-allowed />
    </information>
    - <security>
    <all-permissions />
    </security>
    - <resources>
    <j2se version="1.3+" href="http://java.sun.com/products/autodl/j2se" />
    <jar href="classes.jar" />
    </resources>
    <application-desc main-class="sampling.SampleApp" />
    </jnlp>

    Hi,
    -To make IE associate with .jnlp is the same way you set in the explorer.
    -but i'm using Netscape which is my prefer.. I just set it in....
    EDIT -> Preferences -> Navigator -> Helper Application -> [New Types]
    then Set MIME : "application/x-java-jnlp-file" and Application to Use : javaws.exe (Java Web Start)...
    ummm this should make Netscape See JNLP file and launch it with JWS...
    PS. Ummm... I have to say that i'm newbie.. sometime i know how to make it works but i don't know how to make it work properly. So if somethings wrong, DON'T hesitate to give an advice. I really want to know how to make those work properly.
    Hope it works.
    Jeng

  • Can not launch swing application from Java Web Start 1.6.0_37

    I have a dynamic generated jnlp file from a serlvet. When I used Java Web Start to start the swing application, it failed. The exception showed
    com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://xxxx.xx.com:9080/dilpipweb/Test-1.0-SNAPSHOT.jar
         at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
         at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
         at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
         at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
         at java.util.concurrent.FutureTask.run(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I used janela to validate the generated jnlp file. It was valid. I also checked the tomcat access log, it showed that the Test-1.0-SNAPSHOT.jar file was accessed correctly (with a 200 return code).
    Can anyone help me what was the problem?
    Thanks,

    Hi.
    I got a different problem. My Corba application works in JRE 1.6, but doesn't works in JRE 1.5.X. I got an unexpected error and my console shows:
    getSubjectX500Principal NoSuchMethodError: java.lang NoSuchMethodError
    #### Java Web Start Error:
    #### null
    Can you help me?

  • How can I open help file (HTML or .chm) from Java Web Start (new to JAVA)

    Hi All,
    Im trying to open the help file of my application.
    When trying to access the help file from the GUI (pressing F1 for launching the help file), I'm geting the an error, something like:
    "Can't show help URL: jar:file:C:\Documents and Settings\%USER%\Application Data\Sun\Java\Deployment\javaws\cache\http\Dlocalhost\P7001\DMwebstart\RMjar-name!/com/resources/helpFiles/MyHelpFile.html"
    It seems that the file which is packed in a jar, was downloaded to the Java Web Start cache directory:
    C:\Documents and Settings\%USER%\Application Data\Sun\Java\Deployment\javaws\cache\http\Dlocalhost\P7001\DMwebstart
    The code which is activated when launching the help file is:
    try
                ResourceBundle resourceBundle = DoubleResourceBundle.getBundle("Resource", "ResourceImpl");
                RuntimeUtil.launchFile(new File(resourceBundle.getString("help.file")));
            } catch (IOException e)
                // TODO Auto-generated catch block
                e.printStackTrace();
            }where the property "help.file" is in some property file in the resource bundle named "Resource", and looks like this :
    help.file="com/trax/docs/help/global/MyHelpFile.html"
    The function "RuntimeUtil.launchFile" knows how to launch any file in its default application, and indeed it does launches the html, when giving it an absolute path to the file on my PC, as "C:\Helpfiles\MyHelpFile.html" as such:
    RuntimeUtil.launchFile("C:\Helpfiles\MyHelpFile.html");My question is :
    The application is going to be deployed on a Customer PC. How can I access the html file from the code, with a relative path and not its absolute path on the customer pc, which I can't know?
    I found these restrictions regarding web start:
    (copied from "http://rachel.sourceforge.net/"):
    *Rule 1: Java Archives only. No loose files.* All your resources have to be packaged in Java Archives (jar) if you want to have
    them delivered to the user's machine and kept up-to-date automatically by Java Web Start.
    *Rule 2: No file paths.* You can't use absolute or relative file paths to locate your
    jars holding your resources (e.g. <code>jar:file:///c:/java/jws/.cache/resources.jar</code>).
    Absolute file paths won't work because you never know where Java Web Start
    will put your jar on the user's machine. Relative file paths won't work because Java Web Start
    mangles the names of your jars (e.g. <code>venus.jar</code> becomes <code>RMvenus.jar</code>)
    and every JNLP client implementation has the right to mangle your names
    in a different way and you, therefore, can't predict the name with
    which your jar will be rechristend and end up on the user's machine in
    the application cache.Seems complex or impossible, to perform a simple task like opening a file.
    Please advise (I'm new to Java and Web Start).
    BTW, I'm working with IntelliJ IDEA 5.0.
    Thanks,
    Zedik.
    {font:Tahoma}{size:26pt}
    {size}{font}

    the follwing method i have used to open html file ...
    so to access html file i am shipping resources folder with jar file ..
    private void openHtmlPages(String pageName) {
         String cmd[] = new String[2];
         String browser = null;
         File file = null;
         if(System.getProperty("os.name").indexOf("Linux")>-1) {
              file = new File("/usr/bin/mozilla");
              if(!file.exists() ) {
              }else     {
                   browser = "mozilla";
         }else {
              browser = "<path of iexplore>";
         cmd[0] = browser;
         File files = new File("");
         String metaData = "/resources/Help/Files/"+pageName+".html"; // folder inside jar file
         java.net.URL url = this.getClass().getResource(metaData);
         String fileName = url.getFile();
         fileName = fileName.replaceAll("file:/","");
         fileName = fileName.replaceAll("%2520"," ");
         fileName = fileName.replaceAll("%20"," ");
         fileName = fileName.replaceAll("jarfilename.jar!"," ").trim();
         cmd[1] = fileName;     
         try{
              Process p = Runtime.getRuntime().exec(cmd);
         }catch(java.io.IOException io){
                   //Ignore
    can anyone give me the solution..???
    Regards
    Ganesan S

Maybe you are looking for

  • Can you help me with this ( vlan,accesslist,management )

    here's the scenario I have two vlan 10 & 20 I have 2 switch and 1 router the target of this setup is that vlan 10 can ping or reach vlan 20 but vlan 20 cannot be reach or ping vlan 10 it is that possible Here's the setup In SW0 vlan 10 name Managemen

  • Itunes downloaded but won't open on Windows 8

    I just purchased a laptop with Windows 8 and Itunes downloaded fine but it won't open.  It says "Itunes has stopped working".  I have a Sony Vaio and my previous computer was a Sony Vaio so I know it should be working.  Any tips or advice on what to

  • Forwarding links

    when i try to forward an email that has links in it, the links no longer work for the person receiving the message. how can i fix this so that the links work?

  • Insertion of a field along with dropdown box in a view of IC Webclient crm4

    I have  got a error when doing a customization in ic webclient My  intention is to add a field along with a drop down box associated with it i am doing it in crm 4.0 i created a customize bsp application and added profile to the custom icwebclient fr

  • Best query to get the latest version

    Hi, I have a table as below: col1 col2 col3.... col_ver col7 I have a combination od values for col1 to col6. I have values in col7 which is different for each value in col_ver. col_ver is a version column. For a particular combination (col1 to col6)