Classpath of a decompiled Jar file

吃可爱长大的小学妹 提交于 2019-12-31 07:32:46

问题


So I'm not CS major or anything and I've been just poking around stuff to practice some Java skills I watched from a video. I know this isn't the major way to do it but please, let me.

So I extracted a .jar file of this: http://www.zenlunatics.com/quizcards/ (i also have its outright source version). It's open source. I used JD gui to get the source code and got everything in .java. However, once I imported it and tried to run it in Eclipse, it says there is "no main type."

I've searched around and it seems there has to be a public static ... String[] args and I don't see that in any of the generated .java files.

I tried searching about it on youtube and he's getting .class instead of .java files. So, say I renamed .jar to .zip and extracted class files, do I just edit the main .class and build? Any tips, please.

Thanks!


回答1:


Looking in the source code download the main method is in the QuizCards class (QuizCards.java).

Since there is a source code download you should use that.



来源:https://stackoverflow.com/questions/26373234/classpath-of-a-decompiled-jar-file

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