I have a simple JNLP file that launches a Hello World command line application. When I download the JNLP file from Tomcat (7), Java Web Start starts up and then goes away without launching the command prompt and printing the output from the application. Is this because it cannot be used to launch the command prompt window ? I turned on logging and saw no exceptions, but at the end of the trace log I saw the output.
Using Windows 7, tested in Chrome and FireFox
JNLP
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SimpleExample Application -->
<jnlp
codebase="http://localhost:8080/foo"
href="foo.jnlp">
<information>
<title>Foo</title>
<vendor>Paul C</vendor>
<description>Command Line App</description>
<offline-allowed/>
</information>
<resources>
<j2se version="1.6"/>
<jar href="foo.jar"/>
</resources>
<application-desc/>
</jnlp>
Is this because it cannot be used to launch the command prompt window?
That is exactly the reason. If the Java Console is configured to show on launch of an applet or JWS app. you will be able to see the System.out.println()
of a CLI based app., but further (command line based) input is not practical.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.