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

后端 未结 7 1757
感情败类
感情败类 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-12 23:43

    Try this in your console:

    javac {$PathToYourProyect}/*
    

    If you also need any external library, try:

    javac -cp {$PathToYourLibrary}.jar {$PathToYourProyect}/*
    

提交回复
热议问题