在谈这个之前,你的代码必须运行正确,并且能在dos环境下,运行java -jar xxx.jar 能够正确运行
在这之前,如果还是不能双击运行jar文件
那么你可以看下面的了:
双击运行会出现如下错误:
根源分析:可能是在打开方式中的javaw版本过低。比如jdk1.5编译的class文件用1.4的javaw打开就会出现这个问题。 解决方案:控制面板->文件夹选项->文件类型->JAR下面的<高级>按纽
sun公司的观点 CAUSE WJView.exe or Javaw.exe cannot find the program it is trying to run.
If this error occurs during startup, it is mostly likely caused by a spyware or adware program which is missing, corrupt, or partially deleted.
Using your favorite search engine, search for "spyware removal utility" as your search phrase. This search will help you locate many free spyware removal utilities. Note: The Spyware Removal Utility can help you get rid of this error message partially. Any new spyware can get itself downloaded to your system later. To get rid of this problem completely, try the second option given below.
Wjview lets you view Windows based Java applications. You might receive an error message if Wjview attempts to start an application on your system that no longer exists. You may need to modify the system configuration settings to completely get rid of the error. To do so, follow these steps: |