How can I compile a Java program in Eclipse without running it?

后端 未结 7 1738
感情败类
感情败类 2020-12-12 23:40

I would like to compile my Java program in Eclipse but not to run it. I can\'t understand how to do it.

How can I compile a Java program to .class files

7条回答
  •  醉梦人生
    2020-12-13 00:02

    You will need to go to Project->Clean...,then build your project. This will work, even when your source code does not contain any main method to run as an executable program. The .class files will appear in the bin folder of your project, in your workspace.

提交回复
热议问题