Presentation is loading. Please wait.

Presentation is loading. Please wait.

Run Java file with Window cmd

Similar presentations


Presentation on theme: "Run Java file with Window cmd"— Presentation transcript:

1 Run Java file with Window cmd
Create a source code file (.java) Save & Remind the saved directory Open ‘cmd ‘ and change directory to where java file is located Check java jdk is installed in your computer. ($ java –version) Compile and run java file (javac HelloWorld.java  java HelloWorld)

2 Run Java file with Linux terminal
Create a source code file (using vi editor) ($ vi HelloWorld.java)

3 Run Java file with Linux terminal
<How to use vi editor>

4 In Command mode (escape)
 i : insert mode (can insert letter)  x : erase one letter  :wq! : save file and exit editor

5 Ex) Press ‘Esc’ key  Press ‘i’ to insert letters Press ‘Esc’ key  Press ‘x’ to erase a letter Press ‘Esc’ key  Press ‘h, j, k, l’ to move cursor Press ‘Esc’ key  Press ‘:wq!’ to save and exit editor

6 Run Java file with Linux terminal
2. Write a source code file (using vi editor) 3. Check .java file

7 Run Java file with Linux terminal
4. Check Java version 5. Compile and Run ‘HelloWorld.java’

8 <Window cmd command>
cd: change directory dir: Display a list of files and folders <Linux terminal command> ls: Display a list of files and folders


Download ppt "Run Java file with Window cmd"

Similar presentations


Ads by Google