• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Internet Explorer 5.0 and Applets

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using IE5.0 and just getting started with applets. I am also using Oracle JDeveloper 3.0 to develop applets and other Java programs.
I understand I am not alone when I say that I can not get a simple applet to load in IE. I have played around with my classpath variable and the codebase and code parameters inside the applet tags. Nothing I have done will let me run applets and the same error occurs everytime, "xxx class not found".
If anybody has any insight into getting applets to run under IE5.0 please let me know.
Thanks
 
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Andrew,
Could you post your code (*.java and *.html files) so that it is easier to determine what is causing the error?
Thanks.
Stephanie
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using SWING components? If so, you'll need to install the Java Plug-In in order to get IE to display them. If you don't have it, you can get the error that you've described.
-B
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Andrew Brodie:
I am using IE5.0 and just getting started with applets. I am also using Oracle JDeveloper 3.0 to develop applets and other Java programs.
I understand I am not alone when I say that I can not get a simple applet to load in IE. I have played around with my classpath variable and the codebase and code parameters inside the applet tags. Nothing I have done will let me run applets and the same error occurs everytime, "xxx class not found".
If anybody has any insight into getting applets to run under IE5.0 please let me know.
Thanks


 
Ram Ashish
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry about the previous one!
You would have to use the Java Plug-in and also the html converter to get it to show up.
The html converter would put in the additional tags necessary for the applet to show up on the browser.
Both are avaiable for free download from the javaosft website, under products.
Hope that helps,
Ashish
 
Andrew Brodie
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stephanie Grasson:
Andrew,
Could you post your code (*.java and *.html files) so that it is easier to determine what is causing the error?
Thanks.
Stephanie


HERE IS HOW MY CLASSPATH IS SET (I know a little messed!)
set CLASSPATH=.;C:\Program Files\JavaSoft\JRE\1.3;c:\java\myclasses;C:\Program Files\Oracle\JDeveloper 3.0\myclasses;
HERE IS THE HTML GENERATED BY JDEVELOPER
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<TITLE>
HTML Test Page
</TITLE>
</HEAD>
<BODY>
HandsOn.MyApplet1 will appear below in a Java enabled browser.<BR>
<APPLET
CODEBASE = "."
CODE = "HandsOn/MyApplet1.class"
NAME = "TestApplet"
WIDTH = 400
HEIGHT = 300
HSPACE = 0
VSPACE = 0
ALIGN = middle
>
</APPLET>
</BODY>
</HTML>


HERE IS THE APPLET CODE - I USED ORACLE JDEVELOPER AND ALL THIS DOES IS BRING UP AN EMPTY APPLET WINDOW, AND IT WORKS IN JDEVELOPERS APPLET VIEWER. (I don't see the point of going further until my environment is working)

package HandsOn;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
public class MyApplet1 extends JApplet {
boolean isStandalone = false;
//Get a parameter value

public String getParameter(String key, String def) {
return isStandalone ? System.getProperty(key, def) :
(getParameter(key) != null ? getParameter(key) : def);
}
//Construct the applet

public MyApplet1() {
}
//Initialize the applet

public void init() {
try {
jbInit();
}
catch (Exception e) {
e.printStackTrace();
}
}
//Component initialization

private void jbInit() throws Exception {
this.setSize(400,300);
}
//Get Applet information

public String getAppletInfo() {
return "Applet Information";
}
//Get parameter info

public String[][] getParameterInfo() {
return null;
}
}
-----
Any help is very much appreciated. When I get this working I will share the solution. I know a lot of people with the same problem.

 
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,
Others have said this but perhaps it wasn't clear. IE doesn't support Swing on its own. You have to install a plugin. You're using a JApplet. If you use an Applet instead (and remove any other swing components[not sure about jbinit]), then you won't have any troubles.
 
Stephanie Grasson
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Andrew,
The other posters have given some good advice. Make sure your browser is Swing-enabled and be sure to use the HTML-converter. More information about it can be found here:
http://java.sun.com/products/jfc/tsc/articles/converter/converter.html
I ran your html file through the converter. The result is below:

Then it ran fine for me in IE 5.0.
Give it a try. If it still doesn't work, let us know.
Good luck.
Stephanie
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi, Ram,
Could you tell me where to download java plug-in or
html converter ? Thanks !
Brian

Originally posted by Ram Ashish:
Sorry about the previous one!
You would have to use the Java Plug-in and also the html converter to get it to show up.
The html converter would put in the additional tags necessary for the applet to show up on the browser.
Both are avaiable for free download from the javaosft website, under products.
Hope that helps,
Ashish


 
Brian Chiu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,
I met the same problem. Your original code may be like this:
<APPLET CODE="HelloWorldApplet.class" Width=200 Height=150 >
</APPLET>
modify like below:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="200" height="200" >
<PARAM NAME="code" VALUE="HelloWorldApplet.class">
</OBJECT>
Holp it can work. Detail information you can consult this web site:
http://java.sun.com/products/plugin/1.2/docs/tags.html#IENN
Brian

Originally posted by Andrew Brodie:
I am using IE5.0 and just getting started with applets. I am also using Oracle JDeveloper 3.0 to develop applets and other Java programs.
I understand I am not alone when I say that I can not get a simple applet to load in IE. I have played around with my classpath variable and the codebase and code parameters inside the applet tags. Nothing I have done will let me run applets and the same error occurs everytime, "xxx class not found".
If anybody has any insight into getting applets to run under IE5.0 please let me know.
Thanks


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic