|
 Steps to run a Java application with jdk
|
tarix | 07.11.2018 | ölçüsü | 19,5 Kb. | | #78529 |
|
Steps to run a Java application with JDK
-
In any text editor, write your Java application and save it with a file extension as java, for example, Application.java on your A: drive.
-
In the DOS prompt, enter the following command to compile your Java program:
A:/javac Application.java
-
If there is no any syntax error, enter the following command to execute your Java application:
A:/java Application
Steps to run a Java applet with JDK
-
In any text editor, write your Java applet and save it with a file extension as java, for example, JavaApplet.java on your A: drive.
-
Write your HTML to call the Java applet and save it with a file extension as html, for example, JavaApplet.html on your A: drive.
-
In DOS prompt, enter the following command to compile your program:
A:/javac JavaApplet.java
-
If there is no any syntax error, enter the following command to execute your HTML:
A:/appletviewer JavaApplet.html
Or you can use any Web browser to run your HTML file.
Dostları ilə paylaş: |
|
|