Trouble loading java-applet from within browser

hello,
          I'm kinda new to Java-applets and to Weblogic and consequently I've run
          into a problem. I'm having difficulties deploying an applet in a
          war-archive. My archive structure looks like this:
          --root of .war
          --index.jsp
          --WEB-INF
          --classes
          --test
          --testapplet.class
          my code to load the applet in my index.jsp file looks like this:
          <applet
          codebase = "http://localhost:7001/WebModule/WEB-INF/classes"
          code = "test.testapplet.class"
          name = "TestApplet"
          width = "400"
          height = "300"
          hspace = "0"
          vspace = "0"
          align = "middle"
          >
          </applet>
          Unfortunately the class is not found by the browser producing a
          ClassNotFoundException. I use Weblogic 8.1SP2 and Mozilla 1.6, both
          using J2SDK(JRE) 1.4.2-03. My IDE is Borland JBuilder X Weblogic edition
          and my host-OS is Gentoo-Linux.
          Can anyone point out what's my mistake?
          Thx in advance
          Nic
          

Ok, thanks. I didn't know that.
          Nic
          Robert Greig wrote:
          > nkalkhof wrote:
          >
          >> Can anyone point out what's my mistake?
          >
          >
          > Code in WEB-INF/classes is loaded by the container for execution on the
          > server. It is not in the docroot, so is not accessible to the client.
          >
          > Move the classes into the docroot (i.e. the same level you'd put gifs or
          > html pages).
          >
          > See http://java.sun.com/docs/books/tutorial/applet/index.html for some
          > examples.
          >
          > Robert
          

Similar Messages

  • ClassFormatError when attempting to load an applet from within a JSP

    Greetings everyone.
    I have a problem that i seem unable to solve.
    I've created a web application. I'm using Java 1.4.2_05 and Tomcat. Right now i'm trying to load an applet from a JSP and i'm getting an error that, try as i might, i can't understand why it happens.
    Here is some detailed info:
    The applet's code:
    package smpb.myapp.controllers;
    import java.applet.Applet;
    import java.awt.Graphics;
    public class GUIApplet extends Applet
         public void init()
         public void stop()
         public void paint(Graphics g)
                  g.drawString("Hey hey hey",20,20);
               g.drawString("Hellooo World",20,40);
    The JSP's code:
    <%@ page language="java"
                   import="java.util.*"
                   session="true" %>
    <%
         String name = (String) request.getSession().getAttribute("userName");
    %>
    <html>
         <head>
              <title>Login</title>
         </head>
         <body>
              <h1><p align="center">Application</p></h1>
              <br>
              Welcome <%= name %>! Thank you for logging in!
              <br><br><br>
              <applet align="middle" code="smpb.myapp.controllers.GUIApplet.class" codebase="./" archive="MyApp_applets.jar">
                   Your browser does not support this feature.
              </applet>
              <br><br>
              <a href='<%=request.getContextPath() + "/LogOut"%>'>Log Out</a><br>
         </body>
    </html>-------------------------------------------
    When i reach this JSP the applet fails to load and i get the following error message at the java console:
    Loading applet ...
    Initializing applet ...
    Starting applet ...
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with no proxy
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Last modified time and/or expiration value is not available.  Jar file will not be cached.
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with no proxy
    Connecting http://127.0.0.1/MyApp/MyApp_applets.jar with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with no proxy
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    Last modified time and/or expiration value is not available.  Jar file will not be cached.
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with no proxy
    Connecting http://127.0.0.1/MyApp/smpb/myapp/controllers/GUIApplet.class with cookie "JSESSIONID=A8EECE5E39458739C760D8907762C507"
    java.lang.ClassFormatError: smpb/myapp/controllers/GUIApplet (Bad magic number)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:157)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:123)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:561)
         at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
         at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1856)
         at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
         at sun.applet.AppletPanel.run(AppletPanel.java:298)
         at java.lang.Thread.run(Thread.java:534)
    Exception: java.lang.ClassFormatError: smpb/myapp/controllers/GUIApplet (Bad magic number)-------------------------------------------
    The JSP is in the root directory of the web application's path right along with the jar file. The jar file itself has the following structure:
    Archive:  HelpDesk_applets.jar
      Length     Date   Time    Name
            0  05-17-06 12:17   META-INF/
          106  05-17-06 12:17   META-INF/MANIFEST.MF
            0  05-10-06 17:14   smpb/
            0  05-10-06 17:14   smpb/myapp/
            0  05-12-06 16:50   smpb/myapp/controllers/
          794  05-12-06 17:15   smpb/myapp/controllers/GUIApplet.class
          900                   6 filesNow, i've tried loading the very same jar file that i use in the JSP through a static HTML which is virtually identical to the JSP i presented and everything works just fine. I've checked and rechecked to see if all the permissions to access the jar file were accurate, i checked to see if Tomcat had it's MIME settings correctly configured so that there was no chance that the files were being corrupted during the load (as that is a usual cause for the problem, or so i've gathered) but to no avail. I've searched the web, including these forums, and found similar problems but no conclusive solution. I can't seem to figure out, at all, what could possibly be wrong. Does anyone have any ideas? I've tried to be as thorough as i could from the start, so, any help would be deeply appreciated.

    Hi mshah101,
    This can happen if the applet is compiled using an higher version of java and the browser is pointing to an older version (even if minor version number is higher)

  • Trouble running .java applettes from studio

    I am having trouble running javascript applettes from studio however they do work if run directly in MS explorer 6. The path for explorer exists in tools/options/sever and external tool settings/web browsers. Any suggestions?

    Do you have Java or JavaScript problems?
    Can you provide some code sample/steps to reproduce this?

  • Running a java applet from flash

    Hi,
    How do you run a java applet from within a Flash movie?
    Is it necessary for the user to download a java interpreter, or is there an interpreter somehow built into their browser that can run applets?

    I was wondering , I don't know too much about Flash
    I remember seeing some classes in amongst the Flash
    files when it installed , but couldn't tell you whart they
    do (at the moment , but you've got me interested)
    maybe you should rethink your strategy for building your page (and your movie) maybe build the movie around
    your applet , or preload it then replace a an area of your movie area with your applet (the way you handle rollovers).
    the advantage is you can make calls to applet methods
    from Flash as it supports Javascript.
    jus remember to set the scriptable <PARAM> to true
    Users shouldn't have to download the plug-in or JRE
    you should specify it in the OBJECT or EMBED tag so
    if they don't have it , the browser will tell them.
    of course this is going to change as Microsoft are stopping support for JAVA , users will then have to download the plug-in from Sun in order to view or use JAVA on the internet.

  • JAVA Applets from Adobe Flash/MS Silverlight?

    SAP has recently announced that it will no longer support
    invocation of JAVA applets directly from its "WebDynproABAP" or
    "WebDynproJava" applications. (Until recently, SAP supported an
    "iframe" UI element that could be used to run JAVA applets from
    within WebDynpro applications - soon this will be only doable in
    frames within SAP's portal via "client-side eventing".)
    However, SAP will be supporting invocation of Adobe Flash and
    MS Silverlight from within its WebDynpro Applications.
    So here's my question.
    From an SAP WebDynpro application, I want to pass parameters
    to the JAVA applet "JMol" and have it run in a separate frame.
    Since I will no longer be able to call this applet directly from
    the SAP WebDynpro application, I'm wondering if I could pass
    parameters to Adobe Flash or MS Silverlight and have Flash or
    Silverlight invoke the applet for me with the correct parameters.
    (I would still only want two frames - the one that the SAP app is
    running in and the one that the JAVA applet winds up running in.)
    Relevant links for this question are:
    https://forums.sdn.sap.com/thread.jspa?threadID=939821&tstart=0
    and its follow-up here:
    https://forums.sdn.sap.com/thread.jspa?threadID=972132&tstart=0
    Thanks for any time anyone can afford to spend considering
    this question, and for any answer(s) anyone can provide.
    David Halitsky

    This link:
    http://www.adobe.com/devnet/flash/articles/external_interface.html
    says that javascript can be called from Flash
    So is it as simple as invoking the Java applet from the
    javascript ?

  • Is it possible to run a website built in Java and applet from Safari browser in iPad

    Is it possible to run a website built in Java and applet from Safari browser in iPad?

    Java isn't supported on the iPad

  • BROWSER HANGING WITH LOADING JAVA APPLET

    HI
    WHEN I RUN THE FORM ON THE EXTERNAL
    BROWSER.(USING OPTION RUN A FORM ON THE WEB).
    FILLING IN ALL THE DETAILS.
    BROWSER HANGS WITH MESSAGE LOADING JAVA APPLET.
    TEST.FMX IS IN THE FORMS60 PATH.
    I NEED HELP THANKS
    DEEPAK.
    null

    Try using the java console to get more info on what is hapenning.
    If you have using Jinitator its on the jinitator control panel.

  • Nothing happening after LOADING JAVA applet

    Today since morning I have been facing a problem with my forms....when i complile and run my form... the browser opens with the message loading java applet
    But the forms doesnt seems to open....it gets stuck at this particular point..! dont know why...
    Note:It was working fine till yestarday

    depending on your browser's version, make sure the address you are opening is found in your "safe" list.
    If you're using IE make sure you have the address in your trusted sites. Sometimes Windows DEP (Data Execution Prevention) also stops the browser from opening.
    Also make sure your network is not blocking the site.
    Tony

  • Loading Java Applet Failed : Getting Red "X"

    Hi all
    I have JRE 1.6.0_07 loaded on my machine. When i try to access a particular website from my machine i can see an orange Java Logo and then after some time i get a "Red" "X" on top left with a message in bottom of browser
    "Loading Java Applet Failed".
    I am Using IE 6.0.2900.2180.xpsb_sp2...on a Windows XP SP2 Professional .
    I also get a Error Message as
    "General Exception"
    Name - Batchmanage
    Java.lang.classnotfoundexception.batch.class
    1) However when i disable Options ==> Advance ==> Java(Sun) ==> Use JRE 1.6.0_07 for <applet>
    and enable Options ==> Advance ==> Microsoft VM ==> Jit Compiler for VM enabled
    Application runs fine.
    2) But if i Enable Options ==> Advance ==> Java(Sun) ==> Use JRE 1.6.0_07 for <applet>
    and disable Options ==> Advance ==> Microsoft VM ==> Jit Compiler for VM enabled
    Applications Give error mentioned above and Red X
    3) Similary if i enable Options ==> Advance ==> Java(Sun) ==> Use JRE 1.6.0_07 for <applet>
    As well as enable Options ==> Advance ==> Microsoft VM ==> Jit Compiler for VM enabled
    Still Application Gives error mentioned above and Red X
    For some machines we have observed that it runs fine with Java (Sun) enabled with no Microsoft VM
    Any advise or help would be appreciated
    Thanks

    Hi,
    I am facing the similar problem and following is my applet code which is causing the problem.
    Can you please help me out?
    *<applet name="lic_install" archive="gias/sign_lic_install.jar" codebase="/irj/portalapps/com.test/applet" code="gias/step4calicenses.class" width=200 height=75px>*
    *<param name="sitelicenseurl" value="http://abc.test.com/irj/servlet/prt/portal/prtroot/com.test.DownloadALPLicenses" >*
    *<param name="siteProdcodesURL" value="http://abc.test.com/licenses/applet/gias/prod_codes.txt" >*
    *<param name="siteLic98URL" value="http://abc.test.com/licenses/applet/gias/lic98.cap" >*
    *<param name="siteGetRegistryValDll" value="http://abc.test.com/licenses/applet/gias/step4jnigetpath.dll" >*
    *<param name="siteMergeWinEXE" value="http://abc.test.com/licenses/applet/gias/mergeolf.exe" >*
    *</applet>*

  • Referencing a "locally installed" Java applet from a server-based HTML page

    How does one reference a "locally installed" Java applet from a server-based HTML page (i.e. via the applet, object, or embed tags)? I have seen references in documentation that this is possible, but I have not seen any examples. I have tried a few things, but nothing seems to be working.
    Some background...
    I'm working on a web site that aggregates Internet video. For many users, I would like the site to work "without" requiring Java to be installed (or any prompts, etc.). This version of the site allows users to stream videos directly over the Internet and does not require any sort of access to the local system.
    However, in addition, I have a download manager that can be installed on the local system. Currently, it's a Windows-based "service" that is always running in the background, downloading files, etc. (with plans to later support other OSes).
    My dilemma is trying to communicate between my web site running in the local browser (executing JavaScript code) and the download manager. I call this component the "gateway". I need the gateway to be able to do the following:
    1) Pass user credentials from the web browser UI to the download manager (so it can communicate with my servers).
    2) Check the status of downloaded videos
    3) Launch a local media player (such as Windows Media, QuickTime, etc.) (or perhaps tell the download manager to launch the media player).
    Under Windows XP, I have an ActiveX control that can do these things. It communicates with the download manager via reading/writing to a shared XML configuration file.
    Unfortunately, under Vista and IE7 Protected Mode, ActiveX controls have become very restricted and my gateway no longer works. As such, I am looking at using Java for the gateway (also giving me the additional benefits of supporting additional browsers and OSes).
    From my understanding, I believe I can created a "face-less" Java applet, whose methods can be called from JavaScript. Ideally, I'm thinking I could install the applet onto the local system at the same time the download manager is installed. This would give the applet the security permissions it needs to communicate with the download manager.
    Thanks for any help and suggestions!

    Hi,
    Put the .jar file and the .class file in the path mentioned in one of the aliases in the plsql.conf file like /images or create
    a seperate directory and create an alias like /applets "path" in the plsql.conf file.
    <html>
    <body>
    <applet code=com.chartapplet.chart.BarChartApplet
    codebase=/applets/
    archive=/applets/chart.jar width=300 height=200>
    <param name=background value="white">
    </body>
    </html>
    Hope this helps.
    Thanks,
    Sharmila

  • How to load java class from jsp page?

    hi all!
    Does anyone know how to load java class from jsp page?
    I try to load java class from jsp page.
    Is it possible to load java class fom jsp page?
    thanks and have a good day!

    What I mean is How to load/open java class file from jsp page?
    I think we can open Applet from jsp page by using
    <applet code=helloApplet.class width=100 height=100>
    </applet>
    but, how to open java class which is an application made by Frame?
    thanks and have a good day

  • Cannot load java applets in Safari

    I have several accounts on my machine. In one, the one I use most of the time, Safari will not load java applets. I have checked preferences and compared with those set on the other accounts. They are the same, including enabling javva and javascript. I have removed the Safari plist. I have repaired permissions. I have reset safari, cleared history and caches, used Cocktail to clear caches. I have rebooted.
    I set up a new test account and it works fine.
    What's going on, and how do I cure it?

    I will try the pram reset, though I am not confident of it since this problem affects only one account.
    On the new account business. I note that when I set up a new account, before I launch safari, there are no files in the Library related to Safari. They are created on the first launch. If I delete them all, then they are recreated on another launch. What if, in the affected user directory, I exported the bookmarks and/or dragged the bookmarks file to the desktop. Then deleted all evidence of safari from the account. I should now have, in effect, a virgin install of safari. Launching it would create all of the necessary files and directories. If safari works with java applets, or does not, I can simply move the bookmarks back in and be no worse off than I was in the beginning.
    Any serious fault with that? I am working at home today so cannot do this until I am in the office on Monday.

  • Loading Java Applet....again

    Hi,
    I've done a search on this topic and have not been able to resolve the problem.
    The problem being that after trying to "Run a Form on the Web" using test.fmx, The loading java applet message stays in the browser indefinitely.
    Some have suggested turning on the JInitiator Console to get a better understanding of the problem.
    My problem is that when I click the "Show Java Console" and then "apply" in the JInitiator Control Panal nothing happens. I'm completely new to all of this, is there anything else I have to do to display the Java console?
    Java consoles aside, any suggestions as what else I can do? When I first run the form I get an "applet loading" message in the browser status bar for a split second, followed by "exception:http://<servername.domain>/forms60java/f60web.jar"
    I'm using IE 5.00 and jinitiator 1.1.7.27
    Thanks for any help.
    Darren

    Anyone knows what's the classid of Jinitiator 1.1.7.31?
    Thanks a heap for any replies
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Dhananjay Jawale ([email protected]):
    Hi,
    Please make sure what Shay has suggested about the correct class id . For Jinitiator 1.1.7.27 it is 093501ce-d290-11d3-a3d6-00c04fa32518
    Check your toolbar if you can see a application icon with java cup. If you can get it, maximize it .
    This is a known problem with OS like Windows 95.
    In my application support, i get calls regarding not able to find the login screen and i help them in same way.
    Try it and let us know
    Thanks,
    Dhananjay<HR></BLOCKQUOTE>
    null

  • Loading Java Applet Failed in CRM 2007 Web Client Marketing

    We have recently upgraded our CRM 4.0 sp6 system to CRM 2007.  As part of this upgrade we configured the SAP Best Practice Building Blocks.  Logging on to the webclient using the user MKT_MAN (assigned business role BP_MKT_MAN) we get an error when trying to run the Marketing Calendar.  the error we get is that "Loading Java Applet Failed" the specific applet in question is: Applet com.sap.crm.mkt.calendar.applet.MktCalendar notinited
    We have implemented the following SAP notes to try and rectify the issue but with no success:
    Note 1177590 - Version 2.0 of Marketing Calendar java applet
    Note 1237477 - Marketing Calendar is not displayed, Tensegrity Library
    Any ideas as to what can resolve this issue
    Thanks in advance
    Eddie

    Hi Eddie
    I have exactly the same problem, using IE 6.0 & JRE 1.4.2_07.
    What I have found is that users in my company with the same configuration on their machines, same settings as above can load the Marketing Calendar without issue.
    Have loaded the same notes as yourself already.
    I have managed to get it to working by switching off my proxy settings entirely. This is fine for testing but of no use for go live.
    I have also found that when it does finally load successfully it is incredibly slow in comparison to other functionality within the WEB UI.
    Thus far I have logged an OSS Message regarding this matter, could I recommend you do the same, this should encourage SAP that the issue is not isolated.
    Good Luck
    Arden

  • Accessing java objects from within javascript

    Hello,
    Anyone with an idea of a useful toolkit for accessing java objects from within javascript will be much appreciated.
    Thanks in advance,
    Antana.

    What do you mean by accessing Java objects? Do you mean interacting with an applet via JavaScript? Something else?

Maybe you are looking for

  • Oracle 11g: stack trace misses first line

    Hi, I am working with an Oracle 11g database and trying to make a Java file work. I get an error when I try to run it (using SQL developer), and when I output the stack trace it is not complete. My stack trace is: java.lang.NoSuchMethodError   at ora

  • File sharing issue with Leopard and Windows XP

    I had no problem with file sharing (see the Windows machine on Leopard) before I reinstall the XP and update to SP3. Now I cannot get the XP shared disk displayed on Leopard Finder. I looked through some guides and check these: Both the two laptops a

  • How to forward support messages to SAP in non-working time automatically?

    Hi colleagues and Happy New Year! I have a question: how to forward support messages to SAP at non-working time automatically? Details: when a support message is created at working time it shouldn't leave my system, but when a support message is crea

  • 404 error for personal site

    hello, i'm just trying to access the files i have stored in ~/Sites but when i go to http://example.com/~myShortUserName i am getting a 404 error

  • Problem with opening discoverer plus by URL

    Hi Gurus, I am opening the discoverer plus worksheet using a URL from another web page to skip the connections page. Here’s the hyperlink, I am using for the same ‘http://burs52:7779/discoverer/plus?&_plus=true&nlsl=en-us&cn=cf_a122&lookandfeelname=s