Java - 从命令行构建和运行eclipse项目 [英] Java - Build and run eclipse project from command line

查看:143
本文介绍了Java - 从命令行构建和运行eclipse项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用eclipse ide编写的java项目,我想通过不同机器上的ssh运行它,但是我必须使用命令行执行此操作,我不知道如何。



我是两个shell命令和java的初学者。



你能否给我一个有关这个问题的答案的有用链接,或也许是一个如何做的一个说明?

解决方案

Maven或Ant是最好的选择,但对于一个只有解决方案

您可以选择文件 - >导出,然后选择 Java - > Runnable JAR文件

JAR文件转移到其他机器,然后从命令行运行:

  java -jar YOUR.JAR 


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 exactly how.

I am a beginner at both shell commands and java.

Could you please give me a useful link with answers regarding this question, or perhaps a set instructions of how to do this?

解决方案

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

这篇关于Java - 从命令行构建和运行eclipse项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆