简体   繁体   English

Javac-在不同目录的TTM代码中编译.java文件

[英]Javac - Compile .java files in different directories TTM code

Iam not familiar with JAVA and I found a java code (tool) in github " https://github.com/shuaiwanghk/TTM " that is related to a task I am working on. 我不熟悉JAVA,我在github“ https://github.com/shuaiwanghk/TTM ”中找到了一个与我正在处理的任务相关的Java代码(工具)。

Can anyone help me writing the compilation commands for it. 谁能帮我编写编译命令。

You should carry out the following steps to compile the source code: 您应该执行以下步骤来编译源代码:

  • Download the source code. 下载源代码。 The directory for the downloaded project should be `TTM'. 下载项目的目录应为“ TTM”。
  • Change the current directory to this directory: 将当前目录更改为此目录:

    On Windows: 在Windows上:

     cd C:\\TTM // assuming you downloaded to the root of drive "C" 

    On Linux: 在Linux上:

     cd ~/projects/TTm // assuming you saved the project in "projects" folder in your home directory 
  • Execute the following command on the commandline: 在命令行上执行以下命令:

On Windows: 在Windows上:

javac -d bin -cp "lib\args4j-2.0.21.jar;lib\commons-math3-3.5.jar:lib\lingpipe-4.1.0.jar" src\argument\*.java src\dataunit/*.java src\launcher\*.java src\matrix\*.java src\matrix\*.java src\model\*.java src\multithread\*.java src\task\*.java src\utility\*.java  

On Linux 在Linux上

javac -d bin -cp "lib/args4j-2.0.21.jar:lib/commons-math3-3.5.jar:lib/lingpipe-4.1.0.jar" src/argument/*.java src/dataunit/*.java src/launcher/*.java src/matrix/*.java src/matrix/*.java src/model/*.java src/multithread/*.java src/task/*.java src/utility/*.java

This should compile the sources and put the compiled classes in the folder bin . 这应该编译源代码并将已编译的类放在文件夹bin

Note: The Linux version is tested; 注意: Linux版本已经过测试; but the windows one is not. 但窗户不是。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM