5 pts.
 What is the command to compile a Java program?
What is the command to compile a Java program? What is the command to run a Java application?

Software/Hardware used:
ASKED: July 19, 2009  5:20 PM
UPDATED: September 2, 2011  8:04 AM

Answer Wiki:
compile: javac YourProgram.java run: java YourProgram Essentials, Part 1, Lesson 1: Compiling & Running a Simple Program ——First set the path of the java at the command prompt. >set path="you directory path containing java(bin folder)" after that use javac. This command is use to compile the java program. >javac program.java to run your java program use java. > java program Answer by Ashish2: You can also place the compiled java class file in a specified directory by javac -d
Last Wiki Answer Submitted:  August 6, 2012  10:40 am  by  Compile   30 pts.
All Answer Wiki Contributors:  Compile   30 pts. , carlosdl   63,580 pts. , Ashish2   105 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Download and play around with Eclipse. That’ll help you tremendously.

 11,040 pts.

 

You may create a launcher (if u run in linux) and from that u may run java program. The advantage is that, every time u won’t write the command rather u put only the java file name !

 22,125 pts.

 

What is the command to compile a Java program? What is the command to run a Java application?

On what platform?

On System i, you would use javac and java commands just as you would anywhere else for common java processing. But you could also use the CRTJVAPGM command if you wanted to run your java program directly from a CL program with the RUNJVA command.

Tom

 110,135 pts.

 

FOR COMPILING

javac program_name.java

FOR EXECUTING

java program_name

 660 pts.

 

#1 You should download the JDK and install you local machine, set the JAVA_HOME and some other variables. Then javac test.java java test

 35 pts.