Trouble compiling any java code in Eclipse

前端 未结 2 1951
别那么骄傲
别那么骄傲 2021-01-20 02:37

I\'m new to the world of java and have been following a few online tutorials to get started. Everything was going great and the programs were compiling perfectly and then al

相关标签:
2条回答
  • 2021-01-20 03:32

    That happens because you haven't installed JDK but only JRE. Install JDK to make it work.

    Source

    0 讨论(0)
  • 2021-01-20 03:42

    I too have had this problem. Try restarting Eclipse. If that doesn't work, restart your computer. If even that doesn't work, re-install Java. Its an annoying bug that usually occurs when your computer goes into standby while a program is running on Eclipse.

    EDIT: If the problem persists, you can make a small javac program that would compile any code in a given directory.

    Hope I helped!

    0 讨论(0)
提交回复
热议问题