How To Compile And Run Java Program In Ubuntu Linux

Publicado em: 04 Abril 2017
no canal de: DevTech Solutions
42,678
408

How to compile and run a java program using openjdk on ubuntu GNU linux.

1) Open the terminal using Ctrl-Alt-t

2) Install open JDK by typing
sudo apt-get install openjdk-8-jdk

3) Enter the name of the text editor followed by the name of the file:
gedit filename.java

4) Type in the program and save

5) Enter javac filename.java to compile the program

6) Finally enter java followed by the class which contain the main function to run the program
java ClassName


How to Compile Java Program in .class file or byte code and run it through terminal or cmd in linux or windows.

To Compile the Java Program :

javac filename.java


To Run the program :

java ClassFilename


Nesta página do site você pode assistir ao vídeo on-line How To Compile And Run Java Program In Ubuntu Linux duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário DevTech Solutions 04 Abril 2017, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 42,678 vezes e gostou 408 espectadores. Boa visualização!