清理构建Java命令行 [英] Clean Build Java Command Line

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

问题描述

我使用eclipse编写我的项目使用命令行如下

I am compiling my project written using eclipse using the command line as follows

javac file.java

然后运行:

java文件$ c>

java file (args here)

我如何运行一个干净的构建或编译?每当我重新编译,更改不会受到影响,除非我删除所有 .class 文件并重新编译。请注意,主文件也会调用其他类。

How would I run a clean build, or compilation? Whenever I recompile, the changes are not getting affected unless I delete all the .class files and recompile. Please note that the the main file will call other classes too.

感谢

推荐答案

您应该编译应用程序中的所有Java文件,以确保基本上。

You should compile all the Java files in your application to be sure, basically.

选项包括:


  • 使用完整的构建系统,例如Ant。

  • 在Unix框中,使用以下命令:

  • Use a full build system such as Ant.
  • On a Unix box, use something like:

javac `find . -name '*.java'`

假设你没有太多

如果你不使用包(你真的应该是),你可以只需使用:

If you're not using packages (and you really should be) you can just use:

javac *.java

/ li>

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

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