*trouble putting applet up on browser*  help!!!

Hi everyone-
i've converted my application to a JApplet and it works fine in applet viewer. however, it will not work when I try to open up my html file with any browser. It won't work on my machine or on teh server. I have in one folder my html file, all of the needed class files, and even a jar file. I took care of any security issues and such too. However, when i open my applet in netscape, a dialog pops up which says that either the class or filename of my html file [or one of its components] is wrong, or i don't have all of the required libraries.
I cilcked on the java console tool in netscape and it wrote:
# Applet exception: error: java.lang.ClassFormatError: Bad major version number
java.lang.ClassFormatError: Bad major version number
at java.lang.ClassLoader.defineClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
at netscape.applet.AppletClassLoader.findClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass1(Compiled Code)
* at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
at netscape.applet.DerivedAppletFrame$LoadAppletEvent.dispatch(Compiled Code)
at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
In internet explorer, it shows a grey screen which has the line: java.lang.ClassNotFoundException: myApplet.class
myApplet.class is my main class file, and that is definitely located in that folder and it was transferred binary.
please please help! I would greatly appreciate it.
Thanks :)

If you want your applet to run on IE & Netscape, make sure you use APIs that are on JDKs 1.1 and not 1.2,1.3 or 1.4. If you require the new classes (for example Swing), your best bet is to install the Java Plugin and use that instead.
Assuming you want to run without the plugin and you are sticking to 1.1, if you are compiling with the JDK 1.4 compiler add this argument to your compile;
javac -target 1.1 YourClass.java
Where -target means the class version you want to run in.

Similar Messages

  • Need to have an applet in web browser-- HELP

    I have been trying to have the prefuse Graphview applet in a web browser...
    The following is my HTML file
    <html>
    <head>
    <title>Prefuse Demo</title>
    </head>
    <body>
    <applet code="GraphView.class"
    archive="demos.jar,prefuse.jar,prefuse.src.jar"
    width="400" height="400">
    </applet>
    </body>
    </html>
    I am getting the following error when running on the web browser
    java.lang.NoClassDefFoundError: GraphView (wrong name: demos/applets/GraphView)
    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 on this for 2 days.....really frustrated......
    1)All classfiles (GraphView.class) / jar files (got using the build.bat prefuse and build.bat demos) and
    the htmlfile (GraphView.html) is stored in C:\Documents and Settings\Rudolph\Desktop\prefuse-beta\demos\prefuse\demos\applets
    Can u shed more light on this problem.
    Thanks
    ---! Rudolph

    Try specifying the 'code' attribute for the applet tag in the following manner:
    <applet code="org/apache/maven/plugins/grafo/gui/applets/GraphViewApplet.class"
    archive="maven-grafo-plugin-1.0-SNAPSHOT.jar,prefuse-beta-20060220.jar"
    width="800" height="500">

  • Applet not opening in browser  Help needed

    Hi experts,
    I have Java installed in my machine in the path C:\Program Files\Java
    While trying to open the link http://www.radinks.com/upload/applet.php in browser, I am being asked to install the missing plugin and that plugin is java.
    I do not know why this happens and I am stuck with this problem for sometime.
    Any help in this regard will be well appreciated with dukes.
    Thanks in advance,
    Kind Regards,
    Anees

    faheemhameed wrote:
    I have the same issue. But this is on Internet Explorer 8. Firefox is fine.Given the [web page does not validate|http://validator.w3.org/check?uri=http%3A%2F%2Fwww.radinks.com%2Fupload%2Fapplet.php&charset=(detect+automatically)&doctype=Inline&group=0] *(<- link),* I am not surprised it fails in some browsers while working in others. Checking the source of the page itself, I notice the applet is embedded in the page using an OBJECT element only, and that possibly also explains why it works in some browsers but not others.
    The best bet of the author of the web page is to defer writing the applet element to the [deployJava.js|http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit] *(<- link)* that is provided by Sun.
    Unfortunately there is little that you can do about it, unless you want to attempt creating a page to load off your hard disk, that is valid and workable for IE. I cannot guarantee it will work, but try this variant..
    The altered web page, which can be tested at [http://pscode.org/test/radinks/applet.html].
    <html>
    <body>
    <applet
      code="com.radinks.dnd.DNDAppletPlus"
      archive="dndplus.jar"
      codebase="http://www.radinks.com/upload/"
      width= "290"
      height= "290"
      alt="Java is recognised, but disabled!">
        <param name="url" value = "http://67.131.250.110/upload.php">
        <param name="message" value="http://www.radinks.com/upload/init.html">
        <param name="name" value="Rad Upload Plus">
        <param name="max_upload" value="10000">
        <param name="encode_path" value="yes">
        <param name="translate_path" value="yes">
        <param name="full_path" value="yes">
    This browser does not recognise the Java APPLET element.  Get Java from www.java.com.
    </applet>
    </body>
    </html>

  • HT4623 my niece played my phone earlier and i think she messed up my settings,now i have trouble putting it back to normal.i could hardly scroll the buttons and a voice command is contriolling my settings...how can i undo this? help me please...thanks.

    my niece played my iphone 4s earlier and i think she messed up my settings,now i have trouble putting it back to normal.i could hardly scroll down the buttons and a voice is controlling my settings...how can i reset it? please help...thanks!

    Triple-clicking home button won't turn voice over off on my iphone. i can't slide to unlock or slide to power off, either. (Nor slide to answer a call.) My phone's basically useless...help!

  • Help with uploading site to Internet (was: I'm Having Trouble Putting)

    I just created my first Dreamweaver site and I'm having trouble putting it on the internet.  My index page goes (minus 2 images) but none of the other pages go.  I checked the site's links and there are no broken links.  When I pull up the remote view, all pages and images are listed.  Any idea why they're not online?

    If they are showing up on your remote view, they are online. Chances are you just need to clear your browser's cache to get a fresh download of the pages/images.
    If that doesn't do it, there are a few things to check...
    Servers are CaSe SenSitiVe. INDEX.HTML, Index.html and index.html would all be different files to a server, but not your local OS. Links will work locally, but not on the server. Make sure your links exactly match the case structure of the file names they are pointing to.
    Verify your server root directory (public, www, ht_docs, etc) IS NOT within your local site. You need to be transferring only the content of your local site folder (local root) to your server's root folder. If you have that server root directory in your local site, you may be uploading to a redudnant folder. Posting a screenshot of your expanded Files window (click the two square button) while connected to show the server next to your local files would determine if this happened.

  • How to run a Applet in a browser. No one REPLIED. Plz help

    I had created a applet.
    When I run it in ECLIPSE, the applet program runs well.
    But when I try to open the applet program in browser
    by storing the html file in the director in which I had the class file ,
    my applet is not running.
    In the browser's bottom status bar , it says "notinited".
    I dont know what is the mistake.
    Please tell me what I should do. I am pasting my html file here.
    <HTML><applet code="MortgagecalculationApplet.class" width=421 height=481></applet>
    </HTML>

    Hi..
    Well I tried doing somthing which worked.. would like to share with you...
    actually in the jar file created , if the class file is kept in the root directory of the jar file... it works...
    eg. while crating the jar, if we go to the directory of the class file and then create it , it ould work..
    if u r in som other directory while creating the jar, it wont work..
    for the jar created, open it with winzip and if in the path column of the required class file if it shows a path, then it wont work..
    else it will..
    dats wat I ve found out....

  • How to run swing applets in a browser??

    I understand it is a typical question and there lot of articles on it. I tried but am confused. I installed JRE1.3 which has java plug-in along with it which supports swing applets in a browser.Once i got that plug in i also downloaded html converter but am confused how should i run my swing applet.Can anyone please explain in simple steps as to how to achieve this objective..Thanks much in advance..an example would be of real big help
    Thanks

    The below links will help you.
    http://java.sun.com/products/plugin//1.3/docs/index.docs.html
    http://java.sun.com/products/plugin/1.3/plugin.faq.html

  • Could not load applet in a browser using jre 1.6.0_06

    Hi,
    I am facing problem with loading applets when the browser uses jre 1.6.0_06.
    Not able to understand what actually the problem is, I tried to check with a small applet that would simply print Hello World on the java console. Even this applet also could not be loaded on the browser. I could load this applet in the test environment of eclipse, but not able to load it on the browser when the applet is deployed on Tomcat.
    We have no problems in loading applet if the browser is using an earlier version of the jre.
    One more thing we have found out that, if we change the SSL cipher suite of the ssl.conf file such that it can support weaker protocols, my applet works with jre 1.6.0_06 also.
    But one thing we could not understand is that why changes in SSL cipher suite of the ssl.conf file creates problem in loading the applet, only in case the browser is using jre 1.6.0_06. I mean to say that changes in the SSL cipher suite does not create any problem in loading the applet if my browser is using an earlier version of jre 1.6.0_06.
    Please help me out as I don't have any clue regarding this problem.
    Thanks in advance.

    Hi,
    We have found a wor around for this problem.
    The following option has been unchecked and the applet could be loaded.
    Go to java control panel
    Under the Advanced Tab
    Under the Security section
    Uncheck the last option "Use TLSv1.0".
    This makes the applet work.
    But could not understand as why this is creating a problem.
    We have tried to include TLSv1.0 in the cipher suite of our apache server, while keeping the above option in java plugin control panel checked, but even that did not solve the problem.
    Please help me of how should I proceed for this problem, as I am totally stuck.
    Thank you.

  • Having trouble putting movie on new Zen MX

    *having trouble putting movie on new Zen MX? just recieved it in the mail. i am able to load mp3's without any problems. i want to put Incredible Hulk on to it for a road trip. Creative Centrale has no problem seeing the movie, i can use the rip function to bring up all the info on it. when i press start rip i get "dvd decoder not found". i have the latest media player 0 and also <span class="text">CyberLink PowerDVD.
    this is one of the main reasons i purchased this player as i like to watch movies while i am on planes. if i can not get this player to do movies i will be retuning it ASAP and purchasing one that can do it without having to pull teeth to do it.
    any help would be appreciated as i am leaving for a trip in 3 days and will be watching movies on a mp3 player by then(maybe not a ZEN)
    i uderstand about the legal issues when ripping movies but the one of the reason i bought this player was because it stated you could watch movies on it. now if i can not do that then i have no reason to keep it
    Message Edited by dukeman on 07-6-2009 07:28 [email protected]

    Sounds like you are missing the codecs which is a computer issue not the player. You can download codecs from microsoft http://www.microsoft.com/windows/win...vice/[email protected]

  • Problem viewing applet in a browser

    Hi guys,
    i'm facing a basic problem in viewing an applet in a browser say
    IE or netscape. beside adding the applet tag to the html file that i want to browse ;is there any other operation to perform on browsers or the Applet in order to view it ?
    i would be very grateful if you help me fix this!
    thanks indeed
    othman

    - Is there a plugin installed on the client machine
    - Is the browser java enabled
    - What tags are you using .. show your html code
    - Are you aware of the security restrictions of the applet and its sandbox
    - Are you able to view the console. What exceptions do you see if any.. show your exceptions
    - What version of IE or Netscape are you testing with
    - What OS are you using, what jvm version..
    - Is the plugin set to be used with IE and Netscape in the Plugin control panel
    - Is your applet code in the same directory as your html file. Does your codebase attribute reflect this.

  • I am having trouble with the Canon Image browser ex.l

    i am having trouble with the canon image browser ex.After sevearl downloads i eventually got past the 80% mark.it is now downloaded.however as soon as I click on it it opens up and then a message comnes upm saying that there is a problem and windows is searching for the problem.it then closes the oprogramme down..Any help would be appreciated 

    I am having the same problem and have contacted Canon, they've answered me several times with things to try but nothing they've told me to try helps. It looks like they are going shrug, scratch their heads soon and  pass the buck to Microsoft or HP my comp make .
    I have a Windows 8.1 OS, 64 bit comp.

  • Launching same applet in new browser window

    Hi,
    I launched applet in netscape browser and it worked fine. Then I opened a new window and pointed same url as first browser, applet main window is launched but because of shared static variables the two applets conflict each other.
    we understood that applet from same code base loads in to same name space so the static information is shared between different applet instances.
    one solution might be creating our own ClassLoader- browsers SecurityManager dont allow outside application to create ClassLoader unless user sets security policy to allow.(I cant ask user to do that and I cant afford signed applet solution)
    basically I am looking for a solution like
    1. launching new instance of netscape which dont share its JVM with other netscape windows(I dont know how to make it)
    2. triggering netscape to use different class loaders(its own classloader) every time.(How??)
    3. heard mayscript html flag helps(I have no idea)
    4. any better solution
    Your help is very importent so any suggestion or solution is welcome
    thanks in advance
    rana pratap nama

    the most simple idea is to avoid the usage of static variable when the values of theese variables will be private to each applet instance...
    much more simple than create a new class loader...
    remember: a static variable should be used only when you want the same value shared by all instances of a class... otherwise use the private ones...

  • UNABLE TO RUN APPLETS ON A BROWSER

    I am unable to run applets on a browser which run well on an appletviewer.
    I kept the class file in the same directory as the web page,but it's only showing the applet window, and not showing it's contents.
    console shows...
    java.lang.NoClassDefFoundError: NewApplet (wrong name: applet/NewApplet)
         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)
    java.lang.NoClassDefFoundError: NewApplet (wrong name: applet/NewApplet)
         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)
    as i am a newbee can anybody plz help..........

    what browser r u using? if ever is the java plug-in in your browser is set.

  • Run applet on wireless browser

    A liitle help please :)
    I do lots of java apps but this is my first foray into the wild and woolly wireless world. . .
    I have a web app the runs an applet in the browser. I need some help in figuring out how to enable this applet to run on a browser for a wireless device.
    Thanks!
    Message was edited by:
    megaskins

    Applet needs Java SE runtime Env.
    Most device in wireless world don't support j2se but also java ME.
    In order to run an applet on a browser for a wireless device you must find a device that support java SE.

  • Trouble loading Applets

    hi!
    I am really new in Java, aslo posting, I don't know if I am doing it in the right place.
    I am making a applet which uses a external library ptolemy.plot.Plot, which I had add in Eclipse.It's working properly when I open it wiht the appletviewer, I can see the plot and everything. Problems start when I load my applet in the browser, I can't visualise it and I got the following errors:
    java.lang.NoClassDefFoundError: ptolemy/plot/Plot
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(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)
    Caused by: java.lang.ClassNotFoundException: ptolemy.plot.Plot
    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 java.lang.ClassLoader.loadClassInternal(Unknown Source)
    as far as I know, if it can't find the class is because the CLASSPATH hasn't been set properly. I have tried to set it (I am not really good with that stuff)
    and I have in my PATH C:\jdk6u14\bin, first I have tried to set CLASSPATH as a c:\ptolemy\ptplot5.7\ptolemy\plot because it is where is the jar I am looking for but I got the same errors, so I have tried to set CLASSPATH as a c:\jdk6u14\lib\ptolemy\ptplot5.7\ptolemy\plot, so I have copied the file ptolemy into lib, but I got the same problems.
    I don't know what I am doing wrong, I don't really know how work PATH or CLASSPATH, but it works in the appletviewer and I can't manage to make it work in the browser.
    I don't know if the problem is with ptolemy or that I am doing something else wrong.
    Any help, please?? I am really new in Java, and I am not very use to tecnical speaking, sorry!
    Thank you in advance,
    Sabina

    Note: This thread was originally posted in the [New To Java|http://forums.sun.com/forum.jspa?forumID=54] forum, but moved to this forum for closer topic alignment.

Maybe you are looking for