deleted

Status
Not open for further replies.
This is my HelloWorld.java file code

import java.applet.Applet;
import java.awt.Graphics;

public class HelloWorld extends Applet {
public void paint(Graphics g) {
g.drawString("Hello world!", 50, 25);
}
}
This is my Hello.html file code

<html>
<body>
Here is the output of my program:
<applet code="HelloWorld.class" width="150" height="25"></applet>
</body>
</html>
Both the files are saved to desktop.

This is what I did:

  1. Open CMD
  2. Type cd desktop
  3. Type javac HelloWorld.java
Note: If no.3 is not working. you need to path java jdk first in local disk (C). Find the java folder then choose any jdk. then copy paste the "C:\Program Files\Java\jdk1.8.0_221" to cmd

4. Type appletviewer Hello.html

eto paps pag sa cmd.
 
Status
Not open for further replies.

Similar threads

About this Thread

  • 23
    Replies
  • 723
    Views
  • 3
    Participants
Last reply from:
msstar

Trending Topics

Online now

Members online
1,040
Guests online
7,466
Total visitors
8,506

Forum statistics

Threads
2,354,325
Posts
29,383,266
Members
1,079,413
Latest member
tensh1_9
Back
Top