Why will my applet not run in a browser??

Hi,
I have recently converted a swing application to an applet for use on the web. The applet works perfectly when executed with appletviewer in the Command Prompt. However - when i open the html file - the browser tries to load the class but can't - the status bar at the bottom says "sample.class not found".
My browser is capable of running other applets - and the class file does exist in the same folder.
Can someone help with this??
Thanks
R

If you have swing in your Java code then you need a
java plug-in. To test if you have a Java plug-in
installed go to:
http://home.comcast.net/~millennm/amex.html
Without the plug-in the AWT link works. But you need
the plug-in for the Swing link to work.
The plug-in is at:
http://java.sun.com/j2se/1.3/download.html","Java_Runti
e_Environment
hi, excuse me...
How can I write a plug-in needless Applet?
After I browse the sample of the above article, I think that it seems if my Applet didn't use swing , it will not need to download a Java plug-in when it execute in a browser. But my Applet still need to download a plug-in, why?
Here is my sample code:
/* sample code start */
import java.awt.*;
import java.applet.*;
public class test1 extends Applet
public void paint(Graphics g)
g.drawString("I'm Here!",160,80);
/* sample code end */
And here is my html code:
<!-- html code start -->
<applet code=test1.class width=320 height=100>
</applet>
<!-- html code end -->
thank you very much.

Similar Messages

  • Why will Firefox 4 not run on my Mac G4, OS 10.4.11?

    When prompted and encouraged by you yesterday I downloaded Firefox 4. However it was not possible to use it because it came up with the message that It "is not supported by this architecture" I then found that I could not run my earlier version of Firefox 3.6.16. So I had to delete all firefox versions, and redownload version 3.6.16 losing various previous settings in the process. I am now using the old version once more quite successfully but I am concerned that you will not be supporting it for very long

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox

  • Why will iDVD '08 not run?

    I was running the previous version of iDVD ('06) with no problems at all. I installed iLife '08, and expected iDVD to be similar to the previous version - which i discovered it is not. Struggling with '08, I tried a reinstall of iDVD '06, but to no avail. No matter what I did it would not run. So I tried a reinstall of iDVD '08. It opens, but then freezes, with the spinning ball. I tried a full reinstall of the whole iLife program. I ran Techtool Pro, I ran disk utilities (from OS.X disk), repaired permissions, repaired disk. I deleted the plist file. In short i think I have tried everything - but it will not work.
    I am running it on an old G4 and have 22GB on the start-up disk.
    Where do I go from here - any help welcomed. Frankly, I should have stuck with '06, which ran well.

    Well, for the exercise I have logged the number of hours I have spent searching and applying suggestions to rectify this, and I have just hit seven, SEVEN, hours. However, I have partially resolved my problem. For those readers who are still struggling with the vagaries of iDVD 7 - nope I haven't fixed that problem, but I have at last been able to reinstall iDVD from iLife '06 back on board, and glory, glory, Hallelujah!!! it is working brilliantly. In case anyone else tries reinstalling an earlier version and finds even though they delete the later version of iDVD, the downgraded version will not work - here is what I did, and in the end it was straight forward.
    I used an app called Appcleaner, it removes all traces of the application and folders etc etc. Then I emptied the bin. Then I ran permissions and it corrected them. Then I reinstalled iDVD only, and bingo!!!
    This does not however, remove the onus on Apple for fixing these bugs. They indicate it will run on a G4, and it will, but I believe it depends upon the grunt behind the G4. In my case, runs with 1.33Ghz, but not 1Ghz.
    Thanks to everyone who has tried to help, and I won't shut this thread down in case some genius comes up with a solution to the iDVD 7 problem.

  • Applet not running in local browser

    I can run any applet from web.
    I can run any applet in appletviewer.
    But I can not run applets in browser from local html file.
    I can not run even the demos that came with de SDK 1.4.1_01.
    Can anyone give me some hint?
    Maybe is very obvious but I ca not see it.
    Thank you very much.
    Valeriu Sprintu

    the hello.java file is:
    import java.applet.Applet;
    import java.awt.Graphics;
    public class hello extends Applet {
    StringBuffer buffer;
         public void init() {
         public void start() {
         public void stop() {
         public void destroy() {
         public void paint(Graphics g) {
              //Draw a Rectangle around the applet's display area.
              g.drawRect(0, 0, size().width - 1, size().height - 1);
              //Draw the current string inside the rectangle.
              g.drawString("Hello", 5, 15);
    The hello.html file is:
    <html>
    <body>
    Applet should be there
    <br>
    <applet code="hello.class" width=200 height=200>
    No applet
    </applet>
    </body>
    </html>
    hello.html and hello.class are of course in the same folder.
    If I modify the .html file acording to OBJECT tag specifications for Java Plug-In the same applet runs OK in the browser (IE5.0 ).
    I forgot to tell that I have installed the last version of SDK j2sdk1.4.1_01
    <html>
    <body>
    Applet should be there
    <br>
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = 200 HEIGHT = 200 >
    <PARAM NAME = CODE VALUE = "hello.class" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.1">
    No applet
    </OBJECT>
    </body>
    </html>
    I think there is a problem with the JVM from Microsoft
    Thank you,
    Best regards,
    ValeriuS

  • Why will creative cloud not run?

    Adobe support is pretty useless.  I think that it wants something as far as network access goes but adobe will not say what it wants.
    What does it want to see?

    The Adobe support system may be useless, but no offense, so is your post. You have not provided any technical details like operating system, what errors or a comprehensible explanation of your issues and are just mumbling about. Explain the issue correctly and provide the necessary info.
    Mylenium

  • Why will PSE 2 not run nor be uninstalled?

    Suddenly, when launching PSE 2 I get the message "Could not complete your request because of missing or invalid personalization information". Attempts to get help from Adobe have failed. I then tried to uninstall it. I do not have the original CD to attempt a reinstall. The program does not show up in the Add/Remove utility nor in the Installer Cleanup Utility. Anyone know how to get it running or how to get rid of it?
    Thanks,
    Jim B

    Well, there are several file paths in Win XP to a PSE installation. C:/ program files/ Adobe/ Photoshop Elements xxx , and C;/ Documents and Settings / User/ Application Data/ Adobe / PSE xxx. This is not to mention the settings in the system registry.
    Because of Winddows " .dll " files, summarily removing folders can be a risky proposition. Messy business, are .dll files. This is the reason the Mac users are always crowing about how good the Mac OS is. The Mac OS creates a "mount point" and each program is then treated as if it were a CD. So, you can simply trash a program folder, no harm, no foul.
    For example, the other day I uninstalled a copy of PSE 5 from a Win 7 computer. Then I tried to clean up by removing the program folder. Whoops, after that the DVD drive disappeared, and "Device Manager" was of no use trying to restore it. I'm guessing a couple of .dll files were left behind which connected PSE to the burner, since the program grants itself burn rights on the machine.
    So, it is imperative that before you try any of this, that you create a system restore point.
    Clocking the system back to when PSE 2 was working seems to be the least hazardous thing to try first.
    A thorough system scan with reputable security software is always a great idea, even if it has nothing to do with the problem.
    There are a couple of freeware programs available that can assist with system registry repairs and and clean up. They are "CCleaner" and "Advanced System Care". These are available at  http://www.techspot.com/downloads.html  As always I recommend that a novice user do a fair amount of research before launching to tasks such as the topic of this thread.
    Since fools rush in and all that, personally I would acquire a copy of PSE 3 and just install that. It would go into it's own folder and freshen up the system file situation. Almost every piece of hardware you purchase has one version of PSE or another, perhaps a friend might have an unused copy laying about.

  • Signed Applet not running in netscape browser

    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = 695 HEIGHT = 525 codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    <PARAM NAME = CODE VALUE = SignedAppletDemo >
    <PARAM NAME = CODEBASE VALUE = "." >
    <PARAM NAME = ARCHIVE VALUE = "SSignedApplet.jar" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
    <PARAM NAME="scriptable" VALUE="false">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.3" CODE = SignedAppletDemo CODEBASE = "." ARCHIVE = "SSignedApplet.jar" WIDTH = 695 HEIGHT = 525 scriptable=false pluginspage="http://java.sun.com/jpi/plugin-install.html"><NOEMBED></COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>
    what i wann that when i run this code in netscape browser that it won't ask the user to download the plugin for the applet it should automatically download plz do me favour and send me solution thanks

    Hello.
    Due to firewall issues I cannot state for certain if I am having a similar behaviour to yours. It appears that Netscape( 7.1 ) attempts to resolve to plugins.netscape.com irrespective of the pluginspage attribute ( if it resolves further I cannot see it due to firewalls ). IE appears to try and autoupdate ( based on the firewall challenges ).
    You could try and provide a conditionally constructed link ( with information about the JRE failure ) to the JRE of choice between comment/embed/object elements. It is not the solution you asked for, but a potential alternative.
    Regards,
    James.

  • Java Applets not running in Any browser

    Hi,
    I have JRE / JSE (1.6.17) installed on a windows 7, 32 bit Intel Machine.
    I am able to do all the programming and stuff (in Java), but when i try to open a web page with a Java Applet, it just does not show.
    The page gives a message saying that an additional plugin is required.
    I tried, Google Chrome, Firefox, Internet Explorer...all have the same problem.
    The environment variables are correctly set.
    This is something completely new for me, so would appreciate some help

    Actually i think its more related to JRE.
    I was actually referring to general applet loading.
    I cannot open any applet in any browser.

  • Just purchased the latest ipod nano. Running itunes 11.1.3(8). Why will the music not load? Under devices the 'syn' choice can't be selected and instead only have 'transfer purchases from ipod' What to do?

    Just purchased the latest ipod nano. Running itunes 11.1.3(8). Why will the music not load? Under devices the 'sync' choice can't be selected and instead only have 'transfer purchases from ipod' What to do?

    Just purchased the latest ipod nano. Running itunes 11.1.3(8). Why will the music not load? Under devices the 'sync' choice can't be selected and instead only have 'transfer purchases from ipod' What to do?

  • Why will macbook pro not go to sleep with Lion OS?

    Why will macbook pro not go to sleep with Lion OS?

    Test after each of the following steps that you haven’t already tried:
    Step 1
     ▹ System Preferences ▹ Energy Saver ▹ Power Adapter ▹ Wake for network access: uncheck. You may need to unlock the preference pane by clicking the lock icon in the lower left corner and entering your administrator password.
    Step 2
     ▹ System Preferences ▹ Energy Saver ▹ Schedule… ▹ Start up or wake: uncheck
    Step 3
     ▹ System Preferences ▹ Print & Scan ▹ Open Print Queue...
    Check all printers for unfinished jobs. Deal with any you find.
    Step 4
    Disconnect all wired peripherals except keyboard, mouse or trackball, and monitor, if applicable.
    Step 5
    Launch the Activity Monitor application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Activity Monitor in the page that opens.
    Select All Processes from the menu in the toolbar, if not already selected. Enter “powerd” (without the quotes) in the "Filter" text field. Select the powerd process and click the Quit Process button in the toobar (stop-sign icon.) In the sheet that opens, click Force Quit. You’ll be prompted for your administrator password. The process will be relaunched immediately.
    Step 6
    Boot in safe mode and log in. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Note: If FileVault is enabled under Mac OS X 10.7 or later, you can’t boot in safe mode.
    Safe mode is much slower to boot and run than normal. Don’t launch any applications at first. If sleep still doesn’t work properly, back up all data and reinstall the Mac OS. After that, if you still have the issue, make a “Genius” appointment at an Apple Store to have the machine tested.
    If sleep now works as expected, go on to the next step.
    Step 7
    Still in safe mode, launch the usual set of applications that are running when you have the problem, including your login items, one at a time, testing after each one. Some applications may not work; skip them. You might be able to identify the cause of the problem this way.
    Step 8
    If sleep is still working after you’ve launched all the usual applications, reboot as usual (not in safe mode) and test again. If sleep still works, you’re done, at least for the moment.
    If you still have the sleep issue after booting out of safe mode, post again.

  • I can no longer edit the info for my songs, movies and tv shows.  This occurred since I loaded Windows 7 Pro on my C drive, and then fownloaded ITunes 10.  Why will the program not allow me to access the track info to edit it?

    I can no longer edit the info for my songs, movies and tv shows.  This occurred since I loaded Windows 7 Pro on my C drive, and then fownloaded ITunes 10.  Why will the program not allow me to access the track info to edit it?

    Ah yes school boy error there out of frustration and discontent..
    My issue is with music/apps/films etc not downloading from iTunes / App Store.
    They initially fail and message is displayed stating unable to download / purchase at this time, yet if I retry it says I've already purchased (?) or alternatively I go to the purchased section and there they are waiting with the cloud symbol..
    However some items get frozen in the download window and cannot be retried or deleted. Message appears stating to tap to retry, but even if you stole every bath and sink in the uk you'd still not have enough taps.
    I post here as the iTunes guys are useless in there 'help' and have only advised posting here or phoning apple, at my expense, to explain a problem that could be rectified by forwarding my original email to a techie. However the tech team apparently don't have an email address as they're from ye olde Middle Ages..!
    Anyways I digress.
    So I tried sync to pc, but instead of showing the file as ready to listen/use/view, the iCloud symbol shows and I'm back to square one as the item is unable to download..
    At frustration station waiting for a train from pain...
    All my software is up to date, and had all worked fine prior to the last big iOS update that resulted in all the changes in display and dismay.
    Answers in a postcard :-)
    Much love

  • I wanted a solution to the problem I was having on Win 7 Pro Service Pack 1 in that links on an open Adobe Acrobat file will not open in my Firefox Browser 33.0.2. The Error I receive is "Acrobat could not run the web browser.  Unknown Error. (123)"

    I want a solution to the problem I was having on Win 7 Pro Service Pack 1 in that links on an open Adobe Acrobat Pro 10.1.12  file will not open in my Firefox Browser 33.0.2. The Error I receive is "Acrobat could not run the web browser.  Unknown Error. (123)"

    Change browsers. See what happens.
    Be well...

  • Why will Adobe Acrobat not load PDF from my work website, but will load on other computers?

    Why will Adobe Acrobat not load PDF from my work website, but will load on other computers?  I have to log in to a website to get our orders, and we thought it was the website at first, but have since realized it is just my computer with this issue.  I have tried uninstalling and reinstalling the software and still it does not work. 

    You ask "why", but don't provide any information...
    What is your operating system?
    What is your web browser?
    Are you asking about Adobe Reader or Acrobat?
    What is your Reader / Acrobat version?
    What exactly means "will not load"?

  • Why will Bridge CC not recognize a PHP file and ONLY open with notepad instead of Dreamweaver?

    why will Bridge CC not recognize a PHP file and ONLY open with notepad instead of Dreamweaver?

    Did you set the file association in Bridge to open with Dreamweaver?

  • Why will my ipad not sync with the calendars on my computer, why will my ipad not sync with the calendars on my computer

    Why will my ipad not sync with calendars on my imac?

    I did find the info tab while trying to sync my calendars, but my iPhone5, iPhone 4S and iPad still won't sync to my MacBook Pro.
    Are you using Mac OS 10.9  Mavericks?
    There is no Info tab and you need to sync contacts & calendars via iCloud.

Maybe you are looking for