?
Solved

problem on Applets

Posted on 2003-03-06
2
Medium Priority
?
453 Views
Last Modified: 2010-03-31
I have tried to code applets but i cant see the output though i provided an HTML file for it. I was able to use the appletviewer directive but i still can't be able to see the result. How do i deal with this? give me pls the complete tip. (Are there possibilities of incompatibilities? Im using Windows 98 and JDK 1.3.....)
0
Comment
Question by:malignant
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 30

Accepted Solution

by:
Mayank S earned 200 total points
ID: 8087224
No, there are no incompatibilities between Windows 98 and JDK 1.3. Java has been made to be platform-independent, right? You might try these:

1. Remove the HTML file and put the following comment in your source-code:

// I'm assuming that the source-file is AppletDemo.java

/*
<applet code = "AppletDemo" width = 800 height = 600>
</applet>
*/

Notice that there need not be a file-extension mentioned in the code parameter "AppletDemo".

After compiling the source code, type the following command:

appletviewer AppletDemo.java

Notice that its invoking the source-file (.java) and not the class-file. Many people make the mistake of typing .class with appletviewer or not giving the extension at all - you must specify the source-file (.java) because that is the one containing the applet-tag which I have written before. Also, make sure that the case of the class-name matches that of the filename and that you specify the name of the file in the correct case while executing the appletviewer command.


2. If you want to keep the HTML file:

Write the same applet tag that I've written above in the HTML file and let's say that the name of the HTML file is AppletDemo.html (make sure that it is .html, and not .htm - even that has created a problem for me before!). Then, type the following command:

appletviewer AppletDemo.html

Otherwise, just open AppletDemo.html from Internet Explorer and your Java Applet will load.

If you still experience problems, then please post a message.

Mayank.

0
 

Author Comment

by:malignant
ID: 8109011
i have tried it and it worked well

ty mayank....


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses
Course of the Month9 days, 9 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question