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.

About this Thread

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

Trending Topics

Online now

Members online
887
Guests online
1,470
Total visitors
2,357

Forum statistics

Threads
2,273,526
Posts
28,950,191
Members
1,235,800
Latest member
Fynn00
Back
Top