How to Run Java Program in Linux Terminal
Java : "javac filename.java" will compile filename.java. An
object file called filename
(without any extension) will be created and it can be run by typing
"java filename".
Eg: To Create a java program in Vim Text Editor
Vi myfirstpgm.java
A text editor will open type your java code and press Esc and wq finally
Terminal Page will open type the following to compile , run and execute.
javac myfirstpgm.java
java myfirstpgm
Out will display after the above command.
No comments:
Post a Comment