Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
432 views
in Technique[技术] by (71.8m points)

cmd - How to compile java code on command prompt after installing java and setting environment variables?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  1. Open command prompt
  2. Go to your java programs folder i.e. type cd java programs
  3. Compile your code i.e. type javac YOUR_JAVA_PROGRAM_NAME.java
  4. Above command generates a java class file which is your executable file, to run it type java YOUR_PROGRAM_NAME

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...