This content has been marked as final. Show 1 reply
gupta532 wrote:My friends take care to [write well|http://catb.org/~esr/faqs/smart-questions.html#writewell].
I am new to java webstart coding.while i am running my code in mymachine i am getting error page as "unable to launch application"Have you ever heard of GI/GO? This file is the GI part of that equation.
in exceptions page it is giving as "MissingFieldException[ The following required field is missing from the launch file: <jnlp>(<application-desc>|<applet-desc>|<installer-desc>|<component-desc>)] "
Most importantly i m using linux machine.
i am pasting the below.
As an aside, when posting code, code snippets, HTML/XML/JNLP or input/output, please use the code tags. The code tags help protect the indentation and formatting of the sample. To use the code tags, select the sample and click the code button.
<?xml version="1.0" encoding="utf-8"?> <!-- JNLP File for My Own Jar file--> <jnlp spec="1.0+" codebase="http://172.20.1.84:8080/as/" href="test_command.jnlp"> <information> <title>Testing application</title> <vendor>The Java(tm) Tutorial: Sun Microsystems, Inc.</vendor> <description>application Demo</description> <homepage href="http://172.20.1.84:8080/"> <description kind="short"> to test my own application</description> <offline-allowed/> </information> <resources> <jar href="Commmand.jar"/> <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/> </resources> <application-desc main-class="CommandExecute"/> <applet-desc main-class="CommandExecute"/> </jnlp>
Now, onto the crux of the problems.
1) That is malformed XML. I offer the [XML Well formedness checker|http://pscode.org/xml/xmltools.html#xmlwfc] for checking for malformed XML.
2) Even after you fix that, the JNLP is invalid. I offer [YAX-V|http://pscode.org/xml/xmltools.html#yaxv] & JaNeLA to check JNLP against an XSD. YAX-V only does validation, while JaNeLA does validation as well as other checks. Always validate your JNLP file. I am not entirely sure the XSD will point out one error I noticed, that the JNLP file includes both an application-desc & an applet-desc, but validate it anyway. There are other problems with the launch file that validation will detect.