Java - Build and run eclipse project from command line

后端 未结 4 682
臣服心动
臣服心动 2020-12-07 14:06

I have a java project written using eclipse ide and I want to run it through ssh on a different machine, but I have to do this using the command line and I don\'t know exact

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 14:23

    Maven or Ant are the best option but for an Eclipse-only solution
    you can choose File -> Export and select Java -> Runnable JAR File
    then transfer the JAR file to your other machine and run this from the command line:

    java -jar YOUR.JAR
    

提交回复
热议问题