Steps to run a Java application with jdk



Yüklə 19,5 Kb.
tarix07.11.2018
ölçüsü19,5 Kb.
#78529

CS170

Ohlone, YG



Steps to run a Java application with JDK



  1. 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.




  1. In the DOS prompt, enter the following command to compile your Java program:

A:/javac Application.java




  1. 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




  1. 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.




  1. 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.




  1. In DOS prompt, enter the following command to compile your program:

A:/javac JavaApplet.java




  1. 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.
Yüklə 19,5 Kb.

Dostları ilə paylaş:




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə