리눅스 자바 Hello World

1 확인[편집]

root@ubuntu:~# java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
root@ubuntu:~# javac -version
javac 1.8.0_191

2 실습[편집]

root@ubuntu:~# mkdir hello
root@ubuntu:~# cd hello/
root@ubuntu:~/hello# vi Main.java
public class Main {
        public static void main(String[] args) {
                System.out.println("My First Java");
        }
}
root@ubuntu:~/hello# ls
Main.java
root@ubuntu:~/hello# javac Main.java 
root@ubuntu:~/hello# ls
Main.class  Main.java
root@ubuntu:~/hello# java Main
My First Java

3 같이 보기[편집]

편집자 Jmnote
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}