Exported runnable JAR file from Eclipse doesn't seem to execute

你说的曾经没有我的故事 提交于 2019-12-06 03:48:19

问题


(Disclaimer: I am not a Java programmer, and really have very little idea what I'm doing in Eclipse)

I hacked out an application in Eclipse a while back which I finished off and exported as a JAR which runs nicely. I didn't take any notes or make any comments.

The time comes to make some changes to the project but I have to reload it all again because my PC has since been wiped so some settings etc have probably changed.

Anyway it all works and runs nicely from Eclipse. But when I export as a runnable JAR, and double click to run the application, it doesn't seem to execute.

I can see that there is an instance of javaw running, but no window appears. No errors. Nada.

As I said, it works beautifully in Eclipse. Any ideas?

I have little idea of how I can detect what is going on - as I said, I am NOT a java programmer :-)


回答1:


Ok then, so you can mark the question closed:

If your Java installation is registered for the .jar extension it will try to run the Jar (i guess that's what's happening). But it will do so quietly.

In order to see what's happening (errors and such) you should try to run it from the command line with java -jar myfile.jar.



来源:https://stackoverflow.com/questions/3669455/exported-runnable-jar-file-from-eclipse-doesnt-seem-to-execute

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!