Jnlp可以从Cygwin启动,但不能使用javaws从MS-DOS启动

时间:2016-02-15 19:46:23

标签: java windows

我可以在同一台机器上从Cygwin但不是MS-DOS启动JNLP文件。我正在使用javaws并获得javaw.exe未找到的错误。我看了http://javatechniques.com/blog/launching-java-webstart-from-the-command-line/。那个人可以使用java编译器来执行启动所以我也试过这个看起来像这样:

 c:\Program Files\Java\jdk1.8.0_60\jre\bin>java -classpath 
"C:\Program     Files\Java\jdk1.8.0_60\jre\lib\javaws.jar; 
C:\Program Files\Java\jdk1.8.0_60\jre\lib\deploy.jar"   
-Djnlpx.home="C:Program Files\Java\jdk1.8.0_60/jre/bin"   
-Djnlpx.jvm="C:\Program Files\Java\jdk1.8.0_60\jre\bin\javaw.exe"   
-Djnlpx.remove=true 
-Djnlpx.splashport=-1  
 com.sun.javaws.Main c:\tmp2\new_3.jnlp

当我这样做时,我收到了这个错误:

Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/deploy/util/DeploySysRun
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
    at java.lang.Class.getMethod0(Class.java:3018)
    at java.lang.Class.getMethod(Class.java:1784)
    at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) 
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

Caused by: java.lang.ClassNotFoundException: com.sun.deploy.util.DeploySysRun
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more

我将不胜感激。

感谢你

0 个答案:

没有答案