argument ignored in jnlp file

args.length is always 0.
public static void main(String[] args) {
if (args.length > 0) {
//Do something useful
Here's my jnlp file, with some names changed "to protect the innocent".
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.5+"
codebase="http://mysite.com/JavaWebStart"
href="MyApp.jnlp">
<information>
<title>My Title</title>
<vendor>My Company</vendor>
<homepage href="http://mysite.com/JavaWebStart/MyApp.html"/>
<description>MyApp Description</description>
<description kind="short">MyApp Short Description</description>
<icon href="MyApp.png"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.5+" href="http://java.sun.com/products/autodl/j2se"
java-vm-args="-Xss1M -Xmx256M">
</j2se>
<jar href="MyApp.jar" main="true" download="eager"/>
<jar href="lib/activation.jar"/>
<jar href="lib/beandt.jar"/>
<jar href="lib/dbswing.jar"/>
<jar href="lib/dx.jar"/>
<jar href="lib/mailapi.jar"/>
<jar href="lib/postgresql-8.3-603.jdbc3.jar"/>
<jar href="lib/smtp.jar"/>
</resources>
<application-desc main-class="MyApppkg.MainApp">
<argument>haha</argument>
</application-desc>
</jnlp>

This suddenly started working when I got all-permissions to work. (That was a separate questions I posted on the same day.)

Similar Messages

  • Pass XML in argument tag in JNLP file

    Is there a way to pass an xml string in the <argument> tag. I tried to do it but I get xml parsing error. It seems that the xml becomes the child node when I pass that to the arguments tag. the CDATA also does not work. Has anyone done this successfully. thanks
    I am trying to pass somthing like
    <argument><Settings><URL>http://xxx.com</URL></Settings></argument>
    this is just an example I have also tried
    <argument>"<Settings><URL>http://xxx.com</URL></Settings>"</argument>
    this also errors out.
    <argument><![CDATA[<Settings><URL>http://xxx.com</URL></Settings>]]</argument>
    that does not work too.
    Please let me know if there is anything else I can try

    I've successfully used CDATA to embed HTML in an argument, on JDK 1.5 at least (not tried on others yet).
    Your CDATA closing section should be: ]]> Yours is missing the end bracket - if that's not an error in your post it's probably the cause of the XML parsing error.

  • Jnlp file parameter element problem

    Hello all,
    I have a jar file which contains all the class files and an configuration file of type(.cfg).
    For my application to run properly i need to pass this .cfg file as an argument to the main method in one of the file in the jar...
    i did pass the name of the file as one of the parameter element,but my application is not initialized and not working.but the jar files have been deployed in the local machine.
    so my question is , is there a way so that i can pass my file as a parameter to the main method through jnlp xml file.

    thanks andrew,
    but my problem is that i need to pass the path of my file along with the name of the file to the main method ...and in turn my main method will do all the required processing work..
    the jar file that is to be deployed contains the class files and the .cfg file..
    my jnlp files looks as follows:-
    <jnlp spec="1.0+" codebase="$$codebase" href="voicechat.jnlp">
    <information>
    <title>SIP Based Voice Chat</title>
    <vendor>First Internet Systems Pvt Ltd</vendor>
    <description>Voice Chat</description>
    <description kind="short">Voice Chat </description>
    <icon href="images/demologo.gif"/>
    </information>
    <security>
    <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5" href="http://java.sun.com/products/autodl/j2se"/>
    <jar href="sip.jar"/>
    <jar href="ua.jar"/>
    </resources>
    <application-desc main-class="local.ua.GraphicalUA">
    <argument>-f</argument>
    <argument>a.cfg</argument>
    </application-desc>
    </jnlp>
    the second argument that i had passed is the name of the file in the jar to be passed..
    but as a result when i invoke this file, the jar files are deployed but application is not starting as expected..for it to work the file and its path has to be passed to the main method..
    which is what i tried through argument element...but it does not seem to work..
    so all that i need to know is that, is it possible to pass a file and its path as an argument in the jnlp file..

  • How to change the argument input in a jnlp file?

    A question associated with the following few lines of jnlp codes:
    <application-desc main-class="Main">
    <argument>arg</argument>
    </application-desc>
    My question is: "How can 'arg' be changed dynamically?
    Thanks for help.

    Thank Dietz for help.
    I tried the following jsp code. But it can launch the application only when "test2.jnlp" file exists. "argument to change" can't be passed to the application.
    Thanks.
    <% response.setContentType("application/x-java-jnlp-file");
    out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
    out.println("<jnlp ");
    out.println("spec=\"1.0+\" ");
    out.println("codebase=\"http://tang:8080/examples/rtla/\"");
    out.println("href=\"test2.jnlp\">");
    out.println("<information> ");
    out.println("<title>RTLAFrame viewer</title> ");
    out.println("<vendor>XXX, Inc.</vendor> ");
    out.println("<description>RTLAviewer Application Demo</description>");
    out.println("<description kind=\"short\">A viewer.</description> ");
    out.println("<offline-allowed/> ");
    out.println("</information> ");
    out.println("<security> ");
    out.println("<all-permissions/>");
    out.println("</security> ");
    out.println("<resources> ");
    out.println("<j2se version=\"1.3+\"/>");
    out.println("<jar href=\"test.jar\"/> ");
    out.println("</resources> ");
    out.println("<application-desc main-class=\"RTLAFrame\">");
    out.println("<argument>argument to change</argument>");
    out.println("</application-desc> ");
    out.println("</jnlp> ");
    %>

  • How to pass java.library.path as a VM argument in JNLP file

    I jave a jar file containing reference to sqljdbc4.jar as I am using JDBC to talk with SQL Server. It works fine through eclipse IDE when I give the fillowing VM Argument
    -Djava.library.path=C:\Users\reddys2\Downloads\sqljdbc_4.0\enu\auth\x86. Without this I get the "error message" saying that "failed to load sqljdbc_auth.dll
    Now I would like to bundle working jar file in .jnlp and invoke through browser. I tried to add vm argunment (<property name="java.library.path" value="C:\Users\reddys2\Downloads\sqljdbc_4.0\enu\auth\x86"/> ) in the .jnlp file. But still i am getting "WARNING:Failed to load the sqljdbc_auth.dll cause:no sqljdbc_auth in java.library.path"
    Any help is greatly appreciated. Here are the contents of JNLP file
    =======================================================================================
    ?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://xxx.16.19.56:8080/ifsdTools/" href="PF_UserList.jnlp">
    <information>
    <title>Login into PF</title>
    <vendor>XXX XXXX</vendor>
    <description>Provides ability to mirror PF Data base locally</description>
    </information>
    <resources>
         <j2se version="1.4+"/>
         <jar href="PopulateIFSDProjectForgeData.jar" />
         <jar href="Psqljdbc4.jar" main/>
         <property name="java.library.path" value="."/>
         <property name="javax.net.ssl.keyStore" value="NONE"/>
         <property name="javax.net.ssl.keyStoreType" value="PKCS11"/>
         <property name="http.proxyHost" value="proxy1.lmco.com"/>
         <property name="http.proxyPort" value="80"/>
         <property name="java.library.path" value="C:\Users\xxxx\Downloads\sqljdbc_4.0\enu\auth\x86"/>
         <property name="pfProjectId" value="proj1073" />
    </resources>
    <security>
         <all-permissions/>
    </security>
    <application-desc main-class="ifsdTools.PopulateIFSDProjectForgeData" />
    </jnlp>
    =========================================================================================================
    Edited by: 878645 on Apr 26, 2012 3:43 PM

    Thanks for the pointer. Question that I have is I am referencing sqljdbc4.jar in my application, which in turn using sqljdbc_auth.dll.
    Which one should i refernce through <nativelib>. Is it sqljdbc4.jar or sqljdbc_auth.dll.
    have added the following line to the .jnlp.
    <nativelib href="sqljdbc4.jar"/>
    But still it is complaining on sqljdbc_audth.dll. If it is sqljdbc_auth.dll, can I use <nativelib> to pass it.
    In that case does it need to be signed?. If so,
    Is it possible to sign .dll using 'jarsigner'?.
    Edited by: 878645 on Apr 26, 2012 3:43 PM

  • Argument in JNLP file

    Hi Folks,
    In JNLP file I see we can give Ariguments in <argument> tag in <application-desc>, but how can i specify argument key and argument value?
    like if I give
    <argument>testArg<argument> is testArg is the arg name? then how can I specify the value for the argument?
    am bit confused here can anyone pls clarify me on this?
    Thanks a lot for the support
    Cheers
    Subash

    >
    Thats setting the system properties right? >Not so much (AFAIR you can 'set' java.home, but it has no effect). It is simply properties that are accessible to the app. at run-time.
    >
    I wanted to send command line argument, wher in main(String[] arg) method I wanted to access from the arg[] arrays,
    Is there any way to do that? Then what is the purpose of <argument> tag?>That is doable as well. I have seen two common forms of handing arguments with names..
    java theapp.jar -foo fooValue -bar barValue
    java theapp.jar foo=fooValue bar=barValueThe first presumes all names and values occur in order (1 name, 1 value, 1 name, 1 value..) and arrive at main(String[]) in that order. The second has the '=' sign as delimiter between name and value.
    The way they would be specified as arguments is something like..
    <application-desc ..>
      <argument>-foo</argument>
      <argument>fooValue</argument>
      <argument>-bar</argument>
      <argument>barValue</argument>
    </application-desc>&
    <application-desc ..>
      <argument>foo=fooValue</argument>
      <argument>bar=barValue</argument>
    </application-desc>

  • Passing arguments from jnlp file to application

    Hi,
    I am using a jnlp file to launch an application. This is working perfectly. Now I want my application to get some custom properties for making an rmi connection . The only place where I must specify this is in the jnlp file which is dynamically generated. The dynamically generated JNLP file contains:
    <property name="abc.rmi.adapter.host" value="localhost"/>
    <property name="abc.rmi.adapter.port" value="5050"/>
    <property name="abc.rmi.adapter.servicename" value="abc/RMIClientAdapter/"/>
    This does not work.
    However, according to sun only certain types of properties are supported by jnlp for security reason. Is there any way to get over this and have my custom properties. Any help will be appreciated.
    Thanks,
    dasappan

    If you are trying to use RMI, you probably need all-permissions allready.
    for applications requesting all-permissions, all of the properties set in the jnlp file will be set as system properties before the applications "main" is called.
    If you are not using <security><all-permissions/></security>, then only specific trusted properties, plus any begining with "javaws." or "jnlp." will be allowed.
    For properties you just need to pass to yourself, just append "jnlp." to the front of them.
    /Andy

  • Deploying FX as a Desktop App - jnlp file codebase should be...what?

    Howdy,
    If I try and run my deployed JavaFX app on another PC I get an error pointing back to the codebase that NB created in the <appname>.jnlp file:
    codebase="[http://localhost:8082/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/E%3A/JavaFX/Projects/Concentration/Concentration11/dist/]"My main question is, for a standalone desktop FX app you want to distribute, what should the codebase be?
    I assume you don't point to your developer machine's URL because of course that won't exist on someone else's machine. And unlike most web examples, this won't be running from a server.
    Many other examples refer to running the jar file from the command prompt - not acceptable if you are selling an applet, or even just distributing to the general public.
    So how does this work - how do you set up the jnlp file for desktop deployment? And, do you have to manually do this, or is there something I am missing in NB (6.8) ?
    Many thanks in advance.

    Hi Phil and thank you. I admit have been avoiding learning to compile from the command prompt or with other tools due to the ease that NB affords - but it seems that NB is introducing some issues lately.
    I haven't tried the other tools yet, but I thought maybe I could just edit the NB created jnlp file:
    [http://forums.sun.com/about:blank]<jnlp spec="1.0+" codebase="file:/" href="Concentration11.jnlp"> [http://forums.sun.com/about:blank]<information>  <title>*Concentration11*</title>  <vendor>*Gary*</vendor>  <homepage href="http://localhost:8082/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/E%3A/JavaFX/Projects/Concentration/Concentration11/dist/"/>  <description>*Concentration11*</description>  <offline-allowed/>  </information> [http://forums.sun.com/about:blank]<resources>  <j2se version="1.5+"/>  <extension name="JavaFX Runtime" href="http://dl.javafx.com/1.2/javafx-rt.jnlp"/>  <jar href="Concentration11.jar" main="true"/>  <jar href="lib/derby.jar"/>  <jar href="lib/derbyclient.jar"/>  <jar href="lib/derbytools.jar"/>  <jar href="lib/.netbeans-derby_JapaneseWords.jar"/>  </resources> [http://forums.sun.com/about:blank]<application-desc main-class="com.sun.javafx.runtime.main.Main">  <argument>*MainJavaFXScript=dbPackage.Main*</argument>  </application-desc>  <update check="background"/>  </jnlp>Replacing the code base with your file idea, if I try to run from the jnlp file it complains it can't find the resource:
    com.sun.deploy.net.FailedDownloadException: Unable to load resource: file:/Concentration11.jnlp
    at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
    <...more...>Sorry to be so dense. Any ideas what I am flubbing up this time?
    Thank you Phil.

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

  • JNLP file failed to run using javaws - NumberFormatException

    Hi all,
    I am clueless about this one. A fresh pair of eyes would be helpful.
    I am trying to run two JNLP files on for running remote consoles on
    2 separate Linux blades.
    Here is one of them:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="https://icn1-bmc:443/">
         <information>
            <title>JavaRConsole</title>
            <vendor>Sun Microsystems</vendor>
            <description kind="one-line">JavaRConsole Console Redirection Application</description>
            <description kind="tooltip">JavaRConsole Console Redirection Application</description>
            <description kind="short">
                JavaRConsole enables a user to view the video display of an
                Andromeda computer equipped with a service processor.  It also enables
                the user to redirect his local keyboard, mouse, CD-ROM and floppy drives to
                the remote computer to give him complete control over the remote machine.
            </description>
        </information>
        <security>
            <all-permissions/>
        </security>
        <resources>
            <j2se version="1.5+"/>
            <jar href="Java/JavaRConsole.jar"/>
            <jar href="Java/RedirLib.jar"/>
            <property name="DEBUGLIST" value="ui,general,video,threads,cdrom,floppy,dispatcher,hid,scsi,network"/>
            <property name="SEV_WARN" value="ilomrc.log"/>
            <property name="SEV_CRIT" value="ilomrc.log"/>
        </resources>
        <resources os="Linux" arch="i386">
            <nativelib href="Java/linuxi386.jar"/>
        </resources>
        <resources os="Windows" arch="x86">
            <nativelib href="Java/win32.jar"/>
        </resources>
        <resources os="SunOS" arch="x86">
            <nativelib href="Java/solarisx86.jar"/>
        </resources>
        <resources os="SunOS" arch="sparc">
            <nativelib href="Java/solarissparc.jar"/>
        </resources>
        <application-desc>
            <argument>8</argument>
            <argument>icn1-bmc</argument>
            <argument>root</argument>
        </application-desc>
    </jnlp>The other file is essentially the same with "icn2-bmc" replacing all
    instances of "icn1-bmc". here is the output of the "diff" command:
    3c3
    < <jnlp spec="1.0+" codebase="https://icn1-bmc:443/">
    <jnlp spec="1.0+" codebase="https://icn2-bmc:443/">
    41c41
    <         <argument>icn1-bmc</argument>
    <argument>icn2-bmc</argument>The command I use to run these files is:
    javaws <filename>The first file runs fine, and opens a remote console to the blade.
    However when I try to run javaws with the second file, it fails to start the
    app, with the foll exception:
    java.lang.NumberFormatException: For input string: "icn2-bmc"
         at java.lang.NumberFormatException.forInputString(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at java.lang.Integer.valueOf(Unknown Source)
         at java.lang.Integer.decode(Unknown Source)
         at com.ami.javarconsole.ui.FrameMain.main(FrameMain.java:1326)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)This is unusual, since it was able to parse "icn1-bmc" just fine.
    Similar exception when I replace hostname with the IP address:
    java.lang.NumberFormatException: For input string: "10.0.19.214"
         at java.lang.NumberFormatException.forInputString(Unknown Source)
         at java.lang.Integer.parseInt(Unknown Source)
         at java.lang.Integer.valueOf(Unknown Source)
         at java.lang.Integer.decode(Unknown Source)
         at com.ami.javarconsole.ui.FrameMain.main(FrameMain.java:1326)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.sun.javaws.Launcher.executeApplication(Unknown Source)
         at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
         at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)Any clues? Let me know if you need any more information?
    Message was edited by:
    amateurPro

    I was about to post a question in the forums for this same issue, but I thought I'd reply to this thread instead. I am actually getting a fairly consistent error with this code. Here's my scenario:
    I'm running an OSD TS which performs a "Format and Partition Disk" task immediately before an "Apply Operating System" task (well, almost immediately... there are a few tasks for setting custom variables and whatnot in between). The Format
    and Partition Disk task returns a success code. The Apply Operating System task returns these lines (edited for relevance) with the command line "OSDApplyOS.exe /image:PRI00011,1 /target:C: /runfromnet:False":
    'C:\' not a removable drive
    The volume C:\ exists and is a local hard drive.
    The volume C:\ is using a valid file system.
    Windows target partition is 0-1, drive letter is C:\
    Verifying boot volume is NTFS.
    * Boot volume D:\ is not valid: unsupported file system. Please ensure the boot volume file system on the system you are applying the image to is NTFS. The request is not supported. (Error: 80070032; Source: Windows) *
    I am specifying in the Apply Operating System task to apply the OS to a specific logical drive letter (C:). The odd part is that if I reboot the computer and run the task sequence again, it goes through just fine... every time. Thanks for your help.
    * EDIT: I'm running SCCM 2012 R2.

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

  • Error: JAR-Ressources in JNLP-File are not signed from the same Certificate

    I have two handfull jars, all signed in batch with the same
    Certificate. When i start my App with Webstart it tells me:
    Your JAR-Ressources in JNLP-File are not signed from the same Certificate.
    "JAR-Ressourcen in JNLP-Datei sind nicht von demselben Zertifikat signiert"
    Well im shure that i signed all my jars with the same Certificate.
    What can i do to solve this problem ???

    I get the same error.
    Strangely exactly every second time it works and every second time I execute the JNLP I get the following error:
    network: Cache-Eintrag nicht gefunden [url: http://localhost:8080/fibo/lib/js_15R41.jar, Version: null]
    network: Verbindung von socket://127.0.0.1:3621 mit Proxy=DIRECT wird hergestellt
    #### Java Web Start Error:
    #### JAR-Ressourcen in JNLP-Datei sind nicht von demselben Zertifikat signiertCan this have something to do with browser caching? So that every 2nd time it tries to access the cache, fails. And than ignores the cache and works?
    Any ideas?
    Cheers,
    Rio

  • Jnlp file wont open

    Hello when leopard switches on after the login, a black window Terminal opens with some text in it.
    Also i cant open jnlp files as i get this window instead of opening the jave file that let's me use a chat window. How do i handle this ? everything was working last week, now it is not. Thanks guys and the text file window i get when i click the jnlp file is:
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="0.2 1.0"
    codebase="https://content10.ilinc.com/download"
    href="">
    <information>
    <title>iLinc</title>
    <vendor>iLinc Communications, Inc.</vendor>
    <description>Installer/Launcher</description>
    <description kind="short">Short Description</description>
    <icon href="https://lms-10.ilinc.com/images/vendor/sedona/java_logo.gif"/>
    <offline-allowed/>
    </information>
    <security><all-permissions/></security>
    <resources>
    <j2se version="1.3+" href="http://java.sun.com/products/autodl/j2se"/>
    <j2se version="1.3+"/>
    <jar href="session.jar" main="true" download="eager"/>
    </resources>
    <resources os="Windows">
    <jar href="windows/client.jar"/>
    </resources>
    <resources os="Mac OS X" arch="i386">
    <jar href="mac.i386/client.jar"/>
    </resources>
    <resources os="Mac OS X" arch="ppc">
    <jar href="mac.ppc/client.jar"/>
    </resources>
    <application-desc main-class="Session">
    <argument>https://lm-learnlinc-3.ilinc.com/il/il.dll/@F/Get/join.lrn?t=l&sa=lm-learnlinc-3 .ilinc.com:80&CurrentVersion=10.2.5.2132&uid=4120984&userLogin=4120984&pw=0f0efb 55603a2e17775895d4dd9c0a17&sid=1941833&rec=&ssa=lm-learnlinc-3.ilinc.com:443&OEM Name=iLinc&alt=https%3A%2F%2Fcontent10.ilinc.com%2Fdownload&csa=content10.ilinc. com&dlpage=https%3A%2F%2Fsedona.ilinc.com%2Fdload&serverguid=8eec1dbf-0ab0-4bca- acb0-f1717e928851&lfile=lang_1&cid=55189&did=&flags=NSC</argument>
    <argument>iLinc-session.jnlp</argument>
    </application-desc>
    </jnlp>

    As for your first problem, as I understand, every time you log in, you get a Terminal window with some text.... Does this happen for all users, or just one? My guess is that you have somehow set something to open up when you log in, so that's what it's doing. You can go to the System Prefs, and then to the Accounts page, and finally to the Login Items tab, and if you see if by any chance you have Terminal set as a login item. If so, highlight it, and click the "minus" button at the bottom. If you don't have Terminal set as a login item, I'd look for some document that opens Terminal when you log in.
    Sorry, but I have no ideas about your 2nd problem. There have been some Java updates lately, so perhaps what was working is no broken. You might try making sure you have the latest version of your "jnlp" file... there may be a new one that works the the newer Java engine.

  • How do you set a parameter value in a jnlp file?

    I am trying to figure out how to assign a value to a parameter within a jnlp file and then call that into the main class file. My main class file is below. I want to set firstName inside of the JNLP config file, but am convinced it is impossible. Any thoughts?
    public class Greeting
    private String firstName;
    public Greeting()
    public String getName ()
    if( firstName == null)
    firstName = "Day";
    return firstName;
    }//end method
    public static void main (String args[])
    Greeting greeting1 = new Greeting ();
    greeting1.getName();
    System.out.printf("%s\n", greeting1.getName());
    }

    In the jnlp file, add the Name as a runtime argument for running the Greeting class from its main(). Then add a constructor like
    public Greeting(string name){
    firstName = name;
    }and then change the Greeting greeting1 = new Greeting ();to Greeting greeting1 = new Greeting (args[0]);A side note, most people on here get all bent out of shape if you don't put your code in the Code formatter on here, in case you didn't know about it before. It's just easier to read.

Maybe you are looking for