0

so I have this problem. I have an aplication, which is using Runtime.getRuntime.exec(adobePath) to run Adobe Reader. When I run my aplication using NetBeans or from cmd line by using java -jar "MyApp.jar" it does work fine. But when I run jar file by double-click or from cmd using MaApp.jar it doesn't work. I'm using Windows 7.

What can be wrong?

Thanks

edit: Maybe I said it wrong way. When I run jar file by double-click it does run. And it works, but when Runtime.getRuntime.exec(adobePath) is called nothing happens. And It work fine in NetBeans or when I run App by java -jar "MyApp.jar".

4

1 回答 1

0

右键单击 jar 并在 Open With 下查看?

将 Java Runtime 作为默认程序运行。

于 2013-06-07T10:26:04.667 回答