Step1:myProgram.java source files using Notepad editing
The Step2:compiler compiler uses the JAVAC command
Generate Myprogram.class Bytecode files
Step3. Interpreter interpreter using Java commands
Explain the running program
Example:
Add a text file to a path and rename it to Helloworld.java, for example: E:\android\code\HelloWorld.java
Edit the file with Notepad and enter the following
Public class HelloWorld { publicstaticvoid main (string[] args) { System.out.println ("Welcome to immoc!" ); }}
Then do the following on the command line:
(1) Javac Helloworld.java will generate helloworld.class after the command finishes executing
(2) Java HelloWorld Note Do not enter class
C:\USERS\ADMINISTRATOR>E:E:\>CD ANDROIDE:\ANDROID>CD codee:\android\code>lshelloworld.javae:\ The volume in Android\code>dir drive E is not labeled. The serial number of the volume is the directory of 4485-2636 E:\android\code 2014/09/07 Sunday pm 01:37<DIR>. 2014/09/07 Sunday afternoon 01:37<DIR> .. 2014/09/07 Sunday pm 01:38 helloworld.java 1 files 115 bytes 2 directories 95,979 , 139,072 Available Bytes E:\android\code>javac helloworld.javae:\android\code>dir The volume in drive E is not labeled. The serial number of the volume is the directory of 4485-2636 E:\android\code 2014/09/07 Sunday pm 01:40<DIR>. 2014/09/07 Sunday afternoon 01:40<DIR> .. 2014/09/07 Sunday pm 01:40 431 helloworld.class2014/09/07 Sunday pm 01:38 Helloworld.java 2 files 546 bytes 2 directories 95,979,139,072 Available Bytes E:\android\code>java helloworld.class error: Not found or cannot be added Load main class Helloworld.classe:\android\code>java helloworldwelcome to immoc! E:\android\code>
Web-android Engineer-1-3 writing Java programs using Notepad