Macterminal Javac

mac2022-06-30  73

Mac  terminal Javac

Open the Terminal's vim , then write them:

public class test{

 public static void main(String[] args){

 System.out.println("test");

}

}

First, to make the .class file, this is java's object file.

➜  Desktop javac test.java 

Then run this java app.

 

➜  Desktop java test test.class

test

 

转载于:https://www.cnblogs.com/zhaocundang/p/7498402.html

最新回复(0)