Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

How to run applet

  Asked By: Meenachi    Date: Jan 02    Category: Java    Views: 691
  

I have a very basic question aobut the applet. I have two java
files. One files is a object file ( Test1.java all the methods ) and
second file has main function ( Testdata1.java ). In the
Testdata1.java file i am using extands JApplet. In the main function,
I am calling JOptionPane.showMessageDialog method. Now in my Third
file which is html file and it has <applet> tag. Now my question is,
which .class file do i have to use in <applet code=" ">.

Please let me know, Thanks in Advance.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Frank Butler     Answered On: Jan 02

The main file  should be included. Firstly you try to
run the programme on the Dos Prompt.
use
<applet codebase = Testdata1.class>
</applet>

Try to run  from the jdk\bin directory firstly
html file should reside in the same directory

 
Didn't find what you were looking for? Find more on How to run applet Or get search suggestion and latest updates.




Tagged: