[英]How to know the commands being passed when compiling with eclipse
I am new to Java
programming, especially with eclipse. 我是
Java
编程的新手,尤其是eclipse。 I would really like to know how the java programs are actually getting compiled, it would help me in knowing the Java
command line interface better. 我真的很想知道Java程序实际上是如何编译的,这将有助于我更好地了解
Java
命令行界面。 So, I want to know if there is a way to know exactly which commands are being sent along with the switches to compile and run the java
program? 因此,我想知道是否有一种方法可以确切地知道正在发送哪些命令以及用于编译和运行
java
程序的开关 ?
I am sure that you are taking up a J2SE edition of Java programming which should be a fundamental to you. 我确定您正在使用Java编程的J2SE版,这对您来说是一个基础。 Let me start with giving you an glimpse of a Java Program:
首先让我简要介绍一下Java程序:
class Greetings
{
public static void main(String args[])
{
System.out.println("The first character of the command line " + args[0]);
}}
So let's go thru what I meant by each line. 因此,让我们仔细研究每行的含义。
And with this, let me advise you to take up a read on this page for more on Java (J2SE). 因此,我建议您阅读本页上的内容,以获取有关Java(J2SE)的更多信息。
http://www.w3resource.com/java-tutorial/java-program-structure.php http://www.w3resource.com/java-tutorial/java-program-structure.php
Happy Coding! 编码愉快!
Unless there are some Eclipse logs that track that (check your installation folder), I doubt Eclipse shows it to you through the IDE. 除非有一些Eclipse日志跟踪该日志(检查您的安装文件夹),否则我怀疑Eclipse将通过IDE向您显示该日志。 Compiling and running java mostly comes down to two commands:
编译和运行Java主要归结为两个命令:
You compile by executing 您通过执行编译
javac -cp <your classpath/libs> <your source folder>
You run your program by executing 您通过执行来运行程序
java -cp <classpath> <Class with main method> <main method arguments>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.