Applet Class Problem

Hi,
I tried to run my applet with appletviewer, but I got the following errors :
java.lang.NoClassDefFoundError: org/jfree/data/CategoryDataset
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
at sun.applet.AppletPanel.run(AppletPanel.java:298)
at java.lang.Thread.run(Thread.java:534)
and my HTML file is :
<title>Chart</title>
</head>
<body>
<APPLET CODEBASE="./classes/" CODE="webChart.MyChart.class"
ARCHIVE="servlet.jar,jcommon-0.9.1.jar,jfreechart-0.9.16.jar,jfreechart-0.9.16- demo.jar,gnujaxp.jar"
WIDTH="600" HEIGHT="350">
</APPLET>
</body>
</html>
I have put all the jfreechart jar files in the same directory as the HTML resides, I've tried to put into the classes directory as well, I still got the same error, anybody knows what's wrong with my html file? Do I something wrong in the ARCHIVE tag??
Thanks,
Tiffany33

Thanks for the quick reply.
I got the following errors after I solved the previous problem :
readAndPrintData() - File input error : java.security.AccessControlException: ac
cess denied (java.io.FilePermission D:\WebTools\index.html r
ead)
getData() - File input error : java.security.AccessControlException: access deni
ed (java.io.FilePermission D:\WebTools\index.txt read)
java.lang.NullPointerException
at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:9
80)
at java.lang.Double.valueOf(Double.java:202)
at webChart.MyChart.createDataset1(MyChart.java:175)
at webCHart.MyChart.<init>(MyChart.java:92)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
at sun.applet.AppletPanel.run(AppletPanel.java:298)
at java.lang.Thread.run(Thread.java:534)
do I have to sign the applet or do I have to use "data" tag in html??? Any idea?
Thanks,
tiffany33

Similar Messages

  • Applet Object Class Problem

    I am just eperimenting with applets. I have made a very simple applet which works fine without any non-Java-Native object types. The applet only inserts a blank tabbed pane. As soon as I try to import another package, JFree Graphing in this case, the applet cannot find these JFree object data type classes.
    Everything works fine from the command prompt locally or via the appletViewer. I am using Resin as a standalone webserver, and the html and applet class are all in the same /doc directory. I have copied the two JFree JAR's (jfreechart-0.9.8.jar & jcommon-0.8.3.jar) everywhere I could think of. They're in my classpath, and they're in resin/lib, resin/doc/web-inf/lib, resin/doc/web-inf/work, and the local directory.
    There's obviously a problem with the applet finding the JAR, does anyone know how I can fix this?
    Thanks.
    -- APPLET TAG --
    <applet class="applet" code="applet.class" codebase="." width="600" height="300"></applet>
    -- EXCEPTION --
    java.lang.NoClassDefFoundError: org/jfree/data/DefaultMeterDataset
         at applet.<clinit>(applet.java:56)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    Hello.
    Try this...
    <applet class="applet" code="applet.class" codebase="." archive="jfreechart-0.9.8.jar,jcommon-0.8.3.jar" width="600" height="300"></applet>

  • Browser doesn't display applets (classes)

    hi all,
    i am sure every beginner faced the same problem
    though i am not a beginner, i am facing this strange problem, and i can't figure out where the proble is .
    i just started developing simple swing applications. first i want to try the examples given in a tutorial.
    most of them are japplets (applets created by swing components)
    Strange thing is that none of htem works on my browser WHICH DRIVES ME CRAZY !!
    let me make my situation clearer:
    i put the Japplet class file and the html file whick invokes the applet under the same directory
    as far as i know , since they are in the same directory i don't need t to set the classpath , am i right?
    well, if i open the html file directly from that directory, it can find the Japplet and it works
    but when i put them in another directory under the root of tomcat 4 and try to access them through :
    http://<hostaddress>:8080/applet.html
    applet.html opens but can't find my applet class saying that app.class not found
    the relevant html code is as follows:
    <html>
    <body>
    <applet code=app.class width=100 height=50>
    </applet>
    </body>
    </html>
    what am i supposed to do?where am i wrong?
    by the way to make sure i also added .; to my classpath
    my OS is win 2000,
    i am using jdk1.3.1
    do i need something else to make them work
    thanks for helping in advance :)
    cheers :)

    Is it a typing error or not.
    Your html code is
    <applet code=app.class width=100 height=50>Is this really the code you use?
    I am missing the " "
    <applet code="app.class" width=100 height=50>If you don't use the "", app.class can not be found.

  • Where should i put html with applet class embedded?thanks

    Tomcat4.0 server
    i put html and applet class in the root of my project(/webapps/test/)
    when i hit the html file locally, it displays well. but it doesn't work when it comes to service.
    plus:the applet class is developed with jdk1.1.8
    any help is apprieciated!

    The first thing I would do is recompile the applet with a newer JDK. Second, you need to post more info on the problem. What do you mean by "service"?

  • How to include applet in jsp if applet.class file in another folder

    hi,
    i'm getting problem when my applet.class file is not with its appropriate jsp file. i'm using jsp :plugin tag.it work when jsp file n apllet.class file at same location.
    in short my jsp file is at location /webapps/jsp-examples/myproject/includeDemo.jsp
    n applet i want in a WEB-INF folder.
    Plz help me to solve this..
    or give me other way that an applet can be loaded in jsp page n applet should be in WEB-INF file..
    Help me for this

    http://forum.java.sun.com/thread.jspa?threadID=5148764&messageID=9556205

  • Netscape 's inconsistency in the loading of applets/classes

    Please I will appreciate any help.
    I am using Netscape version 4.75 on a Windows NT platform to launch my application.
    My application is a collection of java classes and applet classes and a gif file all zipped
    into an archive ( zip -o ). These classes are written in the old java version 1.0.2
    (unfortunately).The problem is that when it is launched from a netscape browser,
    sometimes all the classes get loaded but other times the loading fails. The zip file is not compressed since we realized that it was failing more often with a compressed zip file.
    SO we removed the zip file... This is how we are launching the application now but this,
    too, creates a problem because there are incidents of partial or incomplete loading of
    the classes. This application has been in use for over 3 years now, what can I do?
    Please help!
    Ike Eke

    Thanks for you quick response.
    I have not tried a jar. Can I jar these classes that were written in java 1.0.2?
    I have recommended that the application be upgraded to 1.1.x but they say there is
    no money to do that, The customer would not fund it.
    This problem does not occur on IE but we do not support IE any way. We run on HP,SUN,
    and Windows NT platforms but this problem occurs only on NT. This is a production problem
    so it occurs very where there is an NT machine ( over 200 NT users out there).
    This is the version of Netscape that was chosen by the customer and yes it occurs on other netscape versions as well. I thought that jar files came with the emergence of java 1.1.x.
    If it is possible to jar this outdated version of java classes, then I am willing to try it but
    what is required to do this?
    Thanks again
    Ike

  • Servlet cannot find applet class.. HELP..DONT REPLY..SOLUTION FOUND

    Hi.. can anybody help me.. with this age old problem?
    I have an applet.. which generates a pie chart .. Pie.class. If i embed it in a normal HTML page.. it runs smoothly.
    Now the problem is.. in my servlet i tried to do this
    out.println("<applet code=Pie.class codebase=/mywebapp/  height=300 width=300">);etc..
    but when the servlet runs.. the applet is not initalised .. so instead of having the applet i have a 'x' sign.. .. To diagnose the problem better.. i right click on the area that is supposed to be the applet and select 'Open Java Console' . ..there i see.. a ClassNotFound Exception.
    I have kept the Pie.class in the WEB-INF -> classes Folder ( where all the other class files of the servlets are kept ).
    Can anybody help me??
    Thanks in advance
    Hi guys sorry to bother u.. i have found the soln. myslef... my mistake was to place the applet class in web-inf-> class folder.. as soon as i placed it outside the folder.. it worked superbly. Thanks anyway
    Message was edited by:
    arijit_datta

    me also same problem...
    this class path is included in server itself..
    or we can set during compiling time...
    then this is my compile.bat file please check
    set classpath=%CLASSPATH%; ./WEB-INF/classes;
    @echo off
    javac -d ./WEB-INF/classes/ ./dev/beans/*.java
    javac -d ./WEB-INF/classes/ ./dev/ContentManagement/beans/*.java
    javac -d ./WEB-INF/classes/ ./dev/servlets/*.java
    and my servlet file like this below..
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import com.deploy.servlet.*;
    public class ControlServlet extends HttpServlet
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException,IOException
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("Testing");
    /*          if (request.getParameter("pageName")=="CEOSpeak")
                   CEOBean CB = new CEOBean();
                   if (request.getParameter("actionType")=="add")
                   else if (request.getParameter("actionType")=="edit")
                   else if (request.getParameter("actionType")=="delete")
                        if(CB.deleteCEO(request.getParameter("CEOId")))
                             response.sendRedirect("CEO_Speaks.jsp");

  • Applet socket problem in client-server, urgent!

    Dear All:
    I have implemented a client server teamwork environment. I have managered to get the server running fine. The server is responsible for passing messages between clients and accessing Oracle database using JDBC. The client is a Java Applet. The code is like the following. The problem is when I try to register the client, the socket connection get java.security.AccessControlException: access denied(java.net.SocketPermission mugca.its.monash.edu.
    au resolve)
    However, I have written a Java application with the same socket connection method to connect to the same server, it connects to the server without any problem. Is it because of the applet security problem? How should I solve it? Very appreciate for any ideas.
    public class User extends java.applet.Applet implements ActionListener, ItemListener
    public void init()
    Authentication auth = new Authentication((Frame)anchorpoint);
    if(auth.getConnectionStreams() != null) {
    ConnectionStreams server_conn = auth.getConnectionStreams();
    // Authenticates the user and establishes a connection to the server
    class Authentication extends Dialog implements ActionListener, KeyListener {
    // Object holding information relevant to the server connection
    ConnectionStreams server_conn;
    final static int port = 6012;
    // Authenticates the user and establishes connection to the server
    public Authentication(Frame parent) {
    // call the class Dialog's constructor
    super(parent, "User Authentication", true);
    setLocation(parent.getSize().width/3, parent.getSize().height/2);
    setupDialog();
    // sets up the components of the dialog box
    private void setupDialog() {
    // create and set the layout manager
    //Create a username text field here
    //Create a password text field here
    //Create a OK button here
    public void actionPerformed(ActionEvent e) {
    authenticateUser();
    dispose();
    // returns the ConnectionStreams object
    public ConnectionStreams getConnectionStreams() {
    return(server_conn);
    // authenticates the user
    private void authenticateUser() {
    Socket socket;
    InetAddress address;
    try {
    // open socket to server
    System.out.println("Ready to connect to server on: " + port);
    socket = new Socket("mugca.its.monash.edu.au", port);
    address = socket.getInetAddress();
    System.out.println("The hostname,address,hostaddress,localhost is:" + address.getHostName() + ";\n" +
    address.getAddress() + ";\n" +
    address.getHostAddress() + ";\n" +
    address.getLocalHost());
    catch(Exception e) {
    displayMessage("Error occured. See console");
    System.err.println(e);
                                  e.printStackTrace();
    }

    Hi, there:
    Thanks for the help. But I don't have to configure the security policy. Instead, inspired by a message in this forum, I simply upload the applet to the HTTP server (mugca.its.monash.edu.au) where my won server is running. Then the applet is download from the server and running fine in my local machine.
    Dengsheng

  • Why IE5 could not find applet class but Netscape can ?

    Hi,
    I have an applet which is running fine on Netscripts6,
    But not on IE5.
    <APPLET codebase="http://10.1.1.1/demo/" code="ClientApplet.class" HEIGHT=300 WIDTH=300>
    <PARAM NAME="relay" VALUE="1">
    I have all class files under demo directory(the same directory as html file).
    IE5.0 still could not find applet class but Netscript can.

    are you sure its failing to load your classes or is it failing to load a class you are using?
    Remember IE only uses things from 1.1 so simple things like component.getHeight() does not work you have to use size().height
    Its woth enabling the java console and viewing the exact problem.

  • Applet classes trouble

    okay feeling stupid but here i go again
    i've been working on this program for a long time. it compiles it runs but it soesn't do anything. the applet comes up starts and then doesn't present a single thing. the Engine class seems to be placed on the applet but none of the others. Can someone please tell me what I've done wrong? I enclose an approximation of the source code in question. I think the problem is that the other classes information is not being passed to the applet. I don't know if the problem is in where the applet is declared at the top or in the add statement in each class. Should I structure the add statement differently? I don't know how -add(state2)- can tell it where to add the information.
    <applet code = "Engine" width=200 height=200>
    </applet>
    class state2{
    public void listq(){
    (list state2 defined)
    add(state2);
    class profession2{
    public void listp(){
    class major2{
    public void listm(){
    list major2 defined
    add(major2)
    class color2{
    public void listc(){
    list color2 defined
    add color2;
    class gender2(
    public void listg(){
    list gender2 defined
    add(gender2);
    public class Engine{
    public void init(){
    gender2 a = new gender2()
    a.listg();
    profession2 b = new profession2
    b.listp();
    major2 c = new major2();
    c.listm();
    color2 d = new color2();
    d.listc();
    race2 e = new race2();
    e.listr();

    First of all,
    public class Engine{should be
    public class Engine extends Applet{
    and secondly - where do you actually send output to the applet (paint method?) If you try to do this within each object's list() method, then that object would need to be passed a reference to the applet so it could access the graphics context.
    If this makes no sense, I'd recommend posting all the code.

  • Applets & ClassCastException problem

    here is the problem...
    I got test.java, an applet, which I can compile without any problem...(I'm using Sun ONE Studio 4)
    but when I try to execute it, it says "Applet not initialized" and the following message appears in the outpout window :
    java.lang.ClassCastException
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:567)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:496)
    at sun.applet.AppletPanel.run(AppletPanel.java:293)
    at java.lang.Thread.run(Thread.java:536)
    the applet doesn't even go in the init() method
    however, if I open test.html, which has the applet on the page, it loads without any problem...
    I'd only like to know what this ClassCastException can be related to...

    Is this as simple as not using the right base class for your applet? I don't know how much experience you have with applets... you may already have this correct, but if not...
    These two lines (or something pretty close, and maybe not adjacent to each other) should appear in the source file of the applet that you are referencing in your web page:
    import java.applet.Applet;
    public class Test extends Applet {Your applet entrypoints are methods you should override in the Applet class.
    -John

  • Swing Applet Class Names. Help!!

    I`ve written an applet to put on my web page. I use Kawa to compile my Java files. The problem I have is that when I try and upload my .class files to the server, it says the filenames I`m using are illegal.
    The main applet class contains an inner class that contains the event listeners. The main class is called Frame and the inner class called Listener. This means that when I compile I end up with the .class files, Frame.class and Frame$Listener.class. I believe the server wont allow the dollar symbol, $. Is there any way I can get around this without rewriting my applet???
    Thanks

    First, applet doesn't run out of the server...it's run out of the user's system. Second, to some servers, a $ in the name of the file is considered an illegal character -- in cases like this, the only way to get around it is to put all of your class files in a jar like so:
    jar -cf myJar.jar *.class
    and in your HTML, your applet tag would look like this:
    <APPLET CODE="myApplet" CODEBASE="." ARCHIVE="myJar.jar" WIDTH=100 HEIGHT=100>
    </APPLET>
    where myApplet is the name of your main class and myJar.jar is the jar file created with the jar command shown above.
    ;o)
    V.V.

  • 1st Applet, 1st Problem with getCodeBase

    I am getting a runtime error to do with not being able to find getCodeBase(source). Looking at the sun site, when they use this method, they do
    getCodeBase(), "Images/cat,gif" etcMine is slightly different though. My images are passed to a constructor like this
          public ImagePanel(String img)
              this(new ImageIcon(img).getImage());
          }And in my Applet class, I do this
    ImagePanel back = new ImagePanel(getCodeBase() + "Images/back.JPG");So i am using a + instead of a ,. I dont know if this would make a difference. From looking at the way I do this, is there any reason as to why it would not be able to find the image?
    cheers

    I think a problem i have is the way i am dealing with JPanels here for my Applet. So this is the beginning of a panel class
    public class ImagePanel extends JPanel {
           private Image background; //The background image
           private ArrayList<Rec> top;    //An array list of foreground images
           private ArrayList<Rec> bottom;
           private ArrayList<Rec> middle;
             private MovingImage copter;
           private ArrayList<MovingImage> smoke;
        //Constructs a new ImagePanel with the background image specified by the file path given
          public ImagePanel(URL img, String w)
              this(new ImageIcon( new URL( img, w ) ));
        //Constructs a new ImagePanel with the background image given
          public ImagePanel(Image img)
            background = img;
            Dimension size = new Dimension(img.getWidth(null), img.getHeight(null));
            setPreferredSize(size);
            setMinimumSize(size);
            setMaximumSize(size);
            setSize(size);
            top = new ArrayList<Rec>();
            middle = new ArrayList<Rec>();
            bottom = new ArrayList<Rec>();
            smoke = new ArrayList<MovingImage>();
          }The problem i get when i added in your suggestion is cannot find symbol constructor ImagePanel(javax.swing.ImageIcon) So i dont know if i should be adding a default constructor in or somthing or change the current one?

  • Applet failed problem

    Hi!
    Im new to working with Java applets. I am going to describe my problem with the applet I have written and all the circumstances of it because maybe I have missed out some little detail that somebody can point out.
    So, I was given the assignment of modifying my Professor's applet a little bit. The structure of the code was class example1 extends class table extends class BufferedApplet. I made the changes to the applet using Netbeans IDE 4.1. So the applet runs perfectly in the applet viewer, and the HTML page created by the netbeans on running the example1.java code also works fine if I open it from the build folder using firefox, or explorer.
    So I thought, great, I got my assignment done. We must post the applet on our website for it to get graded. So I uploaded the example1.class file and the example1.html file to the same directory on the webpage. I added table.class and BufferedApplet.class as well, just to be safe. All three source files are also in the same directory, coz we have to provide links to them for the assignment.
    Now, when I open the webpage, it wont display the applet. It shows me a white box with a red cross in the top left corner and gives me the message "loading java applet failed". sometimes, there are variations like "example not inited" or "java.lang.NullPointerException"... Here is what the Sun Java console had to say:
    Java Plug-in 1.5.0_04
    Using JRE version 1.5.0_04 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\Vidya at work
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    java.lang.NoClassDefFoundError: example1 (wrong name: multimedia/example1)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception in thread "Thread-4" java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletException(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception in thread "thread applet-example1.class" java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletException(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.NoClassDefFoundError: example1 (wrong name: multimedia/example1)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I have been trying to find solutions to this problem for weeks now.... Please help!!!!
    Here is my html page....
    <HTML>
    <HEAD>
    <TITLE>Modified Test Environment</TITLE>
    </HEAD>
    <BODY bgcolor=black text=white link=white alink=white vlink=white>
    <!--
    *** GENERATED applet HTML launcher - DO NOT EDIT IN 'BUILD' FOLDER ***
    If you need to modify this HTML launcher file (e.g., to add applet parameters),
    copy it to where your applet class is found in the SRC folder. If you do this,
    the IDE will use it when you run or debug the applet.
    Tip: To exclude an HTML launcher from the JAR file, use exclusion filters in
    the Packaging page in the Project Properties dialog.
    For more information see the online help.
    -->
    <H3>Modified Test Environment</H3>
    <center>
    <APPLET codebase="." code="example1.class" width=500 height=500></APPLET>
    </center>
    <P>
    Source: example1 extends table extends BufferedApplet
    </P>
    </BODY>
    </HTML>
    ???????????????????????????????????????????????????

    Hi!
    Im new to working with Java applets. I am going to describe my problem with the applet I have written and all the circumstances of it because maybe I have missed out some little detail that somebody can point out.
    So, I was given the assignment of modifying my Professor's applet a little bit. The structure of the code was class example1 extends class table extends class BufferedApplet. I made the changes to the applet using Netbeans IDE 4.1. So the applet runs perfectly in the applet viewer, and the HTML page created by the netbeans on running the example1.java code also works fine if I open it from the build folder using firefox, or explorer.
    So I thought, great, I got my assignment done. We must post the applet on our website for it to get graded. So I uploaded the example1.class file and the example1.html file to the same directory on the webpage. I added table.class and BufferedApplet.class as well, just to be safe. All three source files are also in the same directory, coz we have to provide links to them for the assignment.
    Now, when I open the webpage, it wont display the applet. It shows me a white box with a red cross in the top left corner and gives me the message "loading java applet failed". sometimes, there are variations like "example not inited" or "java.lang.NullPointerException"... Here is what the Sun Java console had to say:
    Java Plug-in 1.5.0_04
    Using JRE version 1.5.0_04 Java HotSpot(TM) Client VM
    User home directory = C:\Documents and Settings\Vidya at work
    c: clear console window
    f: finalize objects on finalization queue
    g: garbage collect
    h: display this help message
    l: dump classloader list
    m: print memory usage
    o: trigger logging
    p: reload proxy configuration
    q: hide console
    r: reload policy configuration
    s: dump system and deployment properties
    t: dump thread list
    v: dump thread stack
    x: clear classloader cache
    0-5: set trace level to <n>
    java.lang.NoClassDefFoundError: example1 (wrong name: multimedia/example1)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception in thread "Thread-4" java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletException(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletStatus(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Exception in thread "thread applet-example1.class" java.lang.NullPointerException
         at sun.plugin.util.GrayBoxPainter.showLoadingError(Unknown Source)
         at sun.plugin.AppletViewer.showAppletException(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    java.lang.NoClassDefFoundError: example1 (wrong name: multimedia/example1)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at java.security.SecureClassLoader.defineClass(Unknown Source)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    I have been trying to find solutions to this problem for weeks now.... Please help!!!!
    Here is my html page....
    <HTML>
    <HEAD>
    <TITLE>Modified Test Environment</TITLE>
    </HEAD>
    <BODY bgcolor=black text=white link=white alink=white vlink=white>
    <!--
    *** GENERATED applet HTML launcher - DO NOT EDIT IN 'BUILD' FOLDER ***
    If you need to modify this HTML launcher file (e.g., to add applet parameters),
    copy it to where your applet class is found in the SRC folder. If you do this,
    the IDE will use it when you run or debug the applet.
    Tip: To exclude an HTML launcher from the JAR file, use exclusion filters in
    the Packaging page in the Project Properties dialog.
    For more information see the online help.
    -->
    <H3>Modified Test Environment</H3>
    <center>
    <APPLET codebase="." code="example1.class" width=500 height=500></APPLET>
    </center>
    <P>
    Source: example1 extends table extends BufferedApplet
    </P>
    </BODY>
    </HTML>
    ???????????????????????????????????????????????????

  • "Bad Applet class name" error while recording on Oracle Forms 11g through OpenScript (JRE 1.7.0_17)

    Hi,
    I am trying to record automation functional test script on Oracle Forms 11g using OpenScript.
    Able to open the browser, but after accessing application URL, getting application error as "Bad Applet class name"
    Java Plug-in 10.17.2.02
    Using JRE version 1.7.0_17-b02 Java HotSpot(TM) Client VM
    c:   clear console window
    f:   finalize objects on finalization queue
    g:   garbage collect
    h:   display this help message
    l:   dump classloader list
    m:   print memory usage
    o:   trigger logging
    q:   hide console
    r:   reload policy configuration
    s:   dump system and deployment properties
    t:   dump thread list
    v:   dump thread stack
    x:   clear classloader cache
    0-5: set trace level to <n>
    SSV dialog is suppressed........
    cracked oracle.forms.engine.Main
    Loading cached Forms Jars ...
    Is this version (Oracle forms 11g, JRE 1.7.0_17) supported by OATS-OpenScript ?
    Please advise if there is any work around here.
    Thanks.

    From the last OATS release notes available in the C:\OracleATS\docs directory:
    4.1 Oracle Functional Testing/OpenScript
    Oracle Functional Testing’s OpenScript scripting platform has the following system
    requirements:
    ■ Operating System (32-bit and 64-bit versions): Windows XP, Windows Vista,
    Windows 2003, Windows 7, Windows 2008, Windows 2008 R2.
    ■ Memory: Minimum 1 GB
    ■ System: x86, 32-bit or 64-bit processor, 2.6 GHz or faster
    ■ Disk Space: 4 GB minimum
    ■ Browser: Internet Explorer 7.x, 8.x., 9.x; Firefox 3.5/3.6, 6.x, 10; Chrome 27+
    (playback only).
    ■ Java Runtime Environment: JRE 1.6 minimum (up to build 38), JRE 1.7 (up to build
    11) .
    So basically, it's not supported... Can you try with another JRE version?
    As always don't forget to run OpenScript as administrator on W7/8 or equivalent
    JB

Maybe you are looking for