所以我一直在使用 JGrasp,因为我一生都无法弄清楚如何将预制的 java 文件实现到 Eclipse 或 IntelliJ。但现在我试图弄清楚,但我真的很困惑。
所以对于 IntelliJ 来说它只是
File > Open - then your existing java application
但是所有东西都有红色图标,所以我发现修复是
File > Project Structure > Modules > Sources
但是然后..需要设置输出路径..所以发现修复是
File > Project Structure > Modules > Paths > Inherit.
但默认情况下它已经打开,所以我必须使用模块
Then you set JDK to the one you have on your computer
但是后来我收到错误 Main
not found..我假设它来自设置的输出部分,但我真的不明白:/
我知道事实不是代码,因为它在 JGrasp 中正常工作,所以我真的不确定。
附带问题:
Do I have to do this every single time even if I'm just trying to drag and drop one pre-made Java Application?
Does this also allow the use of Applets? Or do I have to include something else to the library?[Found Answer]
最佳答案
右键单击主方法,您会看到主类的 2 个运行目标(运行和调试)。如果您在顶部找到运行配置后执行此操作。 (请参阅第二张图片顶部“Testmain”旁边的小箭头。您可以在其中切换运行配置并编辑它们。
关于java - IntelliJ..如何导入现有的 Java 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36350339/