How do i get an applet to run on my IMac?

I am in a Java Programming class and have to write an applet for my homework using NetBeans.
It only shows a frame with applet not Initialized message.
What am I doing wrong?

https://discussions.apple.com/message/15521278#15521278

Similar Messages

  • Need help getting my applet to run..

    Hi, I am having the utmost trouble getting my applet to run. First I spent a month correcting syntax and other errors generated during compile. Now I find myself spending another month getting the compiled product to run. I don't care if the screen is completely blank and my logic is all messed up, I don't mind logic debugging. My applet just will not run at all, it won't even initialize.
    First when I tried to run my applet in Internet Explorer I got the following error in the statusbar:
    "load: tsorgi5 can't be instantiated"
    So, I researched that error message, and the solution appeared to be that I would need to use the Java Plug-In. So, I use that and now I find this message in the statusbar:
    "exception: null."
    That happens when the text "Loading Java Applet ..." is in the centre of the applet, and Internet Explorer acts like it is still doing something no matter how long I wait.
    I tried researching this, but only found "exception: null" with other things after the text "null."
    In Forte, when I choose "Execute" I get the following in the Output Window, I/O tab:
    java.lang.NoSuchMethodError: main
    Exception in thread "main"
    I would assume it expects me to add a method "main()," but I also get that same message with a different applet (which doesn't have a method "main()") which runs perfectly fine.
    I usually try to solve many of my problems myself, but with this one I have no idea where to start looking for answers. I'm relatively new to Java, been using Java for only half a year, so this particular problem is like looking for a four-leaf clover in the streets of New York City..
    I'm going to be chopping my applet into pieces, having a separate class file for each major engine. (It is a role-playing game, so I'll separate battle engine from cut-scene engine from world exploration engine etc..) Hopefully I will be able to narrow down my search for what is causing me all of these problems. Then once I solve my problems I can piece everything back together.
    In the meantime, I am hoping that some of you could help me out so that I may know what I am looking for.
    Thank You for your time,
    -Tony Slater

    Ah.. Forte is still a bit confusing to me, I have not and probably will not take the time to learn much about Forte, as the only real reason I use it is because unlike wordpad, I can see line numbers. =] Very helpful with my program being the size that it is.
    I do not think that the simple applet idea will be of much use, because one of my earlier applet projects (a main menu for my current project) which I mentioned above as another applet without a main() method which worked perfectly fine is very simple. Although I will try it anyway, as it could help and you are most likely much more experienced than I. =]
    Okay, I typed the following in the Dos Prompt:
    appletviewer TestApplet.class
    ..It printed a blank line, paused a little bit, then brought me back to the prompt, just like running a dos program that does not give any output. I'm not sure, but I would assume it should print a line containing the text "Here?" I have not used appletviewer before, so I do not know what it is supposed to do. =P
    I have already tried using System.out.println, but the problem occours even before the applet is started. I'll try enabling the Java Console first thing tomorrow morning, since a restart is required when enabling it.
    Now, I would be happy to post some code, but I'm not sure it would be best to post the code when my program is 2814 lines.. although 800 lines are probably comments, and most of those comments are probably irrelevant. Also I can sometimes be a messy coder. Although I can post some general information and can probably (with a little work) post an "outline" of the code.
    Since it is getting late I'll just post some portions of code which hopefully will prove important.
    // Import Packages
    import java.awt.Graphics;
    import java.awt.Color;
    import java.awt.*;
    import java.applet.*;
    import java.lang.System;
    import java.lang.reflect.Array;
    import java.lang.Math;
    import java.lang.Double;
    import java.math.*;
    import java.util.Random;
    import java.io.*;
    variable/object types created and/or declared between "public class.." and "public void init()...":
    int
    byte[]
    String
    RandomAccessFile
    int[][]
    double
    int[]
    double[][][]
    Random
    Image
    int[][][]
    arrays are filled in the init() method.
    public String getIniStrValue(String iniFile, String iniGroup, String iniItem) // Used for retrieving information from the game's external file system.
    another method getIniIntValue(int, String, String, String) is used for int values stored in external files.
    Within public void paint(), gameplay modes are detected and dealt with accordingly. With Cut-Scenes, proper charecter images and text is displayed, all cut-scene information is stored externally. Other modes do virtually the same, display graphics and text based on internal game data or un-changing external data files.
    Within public void mouseClick(), in certain modes of the game the mouse click will trigger a change no matter where the user clicked (such as cut-scenes, to advance to the next line of dialog), or different variables are set depending on where the user clicked. (What I like to call.. custom buttons) At the end of the method repaint(); is used, and the paint() method will alter the screen according to any changes that may have happened.
    public void charAttack() is a method called to handle battle equations when a playable and controllable charecter is making a move. It will detect the current charecter, detect the move being made by the charecter (attack, special move, magic, etc) and will change any variables accordingly and will then use repaint(); so that the player may know what has happened. (Whether or not attack was successful, how many HP the enemy lost, etc)
    public void loadBattle() is called when the charecter encounters an enemy. It will load possible enemies of the current part of the world being explored, select one, then load that enemy's "stats" from external game data files, and will then specify the new mode (Battle Menu, where the player chooses the moves to be made for the turn) by setting the int value "Mode." repaint(); is then called and it will paint the battle menu.
    public boolean keyDown() is of course used to detect keyboard events. In world exploration, the charecter will be moved accordingly. In modes such as cut-scenes, a variable will be changed to advance to the next line of speech. In menus, the keyboard events are used to switch between options. repaint(); is used to update the screen accordingly.
    Well, even though I very briefly summarized the code, it appears to have taken half an hour to do. I'll be getting some sleep in a few minutes, and when I wake up tomorrow morning I hope to both see and make some progress on solving this problem.
    Thank You,
    -Tony Slater.

  • How do i get my ipad to run itunes 10.6

    how do i get my ipad to run itunes 10.6

    If you haven't already done so then you need to download and install iTunes on your computer and add your music to it (File > Add To Library) and you should then be able to connect your iPad to your computer and sync your music to it.
    Syncing music : http://support.apple.com/kb/HT1351
    If you have iTunes 11 on your computer then you may find the instructions on that page easier to follow if you enable the left-hand sidebar via option-command-S on a Mac, control-S on a PC)
    If you haven't synced the iPad to that computer before then you may also find this page useful : https://discussions.apple.com/docs/DOC-3141

  • How can I get my games to run smooth with apple tv. I'm getting jerky movement

    How can I get my games to run smooth with apple tv?

    Check your network for interference (www.istumbler.net, check router manual in regards to changing channels) and other activities possibly running in the background.

  • How can I get an mp4 video running on iPad Mini?

    How can I get an mp4 video running on iPad Mini, which is already in the iTunes File?

    Pad2, the new iPad Supported Video Formats & Movie Formats
    H.264 video up to 1080p, 30 frames per second, High Profile level 4.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats;
    MPEG-4 video up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats;
    Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format
    You can use a USB flash drive & the camera connection kit.
    Plug the USB flash drive into your computer & create a new folder titled DCIM. Then put your movie/photo files into the folder. The files must have a filename with exactly 8 characters long (no spaces) plus the file extension (i.e., my-movie.mov; DSCN0164.jpg).
    Now plug the flash drive into the iPad using the camera connection kit. Open the Photos app, the movie/photo files should appear & you can import. (You can not export using the camera connection kit.)
     Cheers, Tom

  • How can you get an applet to obey the CSS z-index attribute?

    How can you get an applet to obey the CSS z-index attribute?
    I have a DHMTL page with a panel that I want to slide back and forth. But another part of the requirement is to have the panel look like it is sliding under another panel.
    The problem is that an applet is on the panel that slides. When the sliding panel move under the stationary panel the applet does not go under the stationary panel, but the reset of the sliding panel does render looking like it is sliding under.
    See below.
    - ~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~           #############***************           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #############^**************           ^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -
    ~ has a z-index of 1
    # and * have a z-index 2
    # shows above ~ and below ^
    ^ has a z-index of 3What I am getting with the applet on the panel with a z-index of 2 is the following
    - ~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~           #############***************           ^ -
    - ~           #            ^             *           ^ -
    - ~           #  @@@@@@@@@@@@@@@@@@@@    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @                  @    *           ^ -
    - ~           #  @@@@@@@@@@@@@@@@@@@@    *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #            ^             *           ^ -
    - ~           #############^**************           ^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~                      ~ ^                         ^ -
    - ~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -
    --------------------------------------------------------Where @ is the applet. Notice how the applet is on top of the ^ but the panel under it, ^, is under like it should be. All the panels are 1x1 tables with a border. So how can I get the applet on the drawing shown with # and * to follow the rendering of the z-index of 2?

    Hi,
    I have the same problem, and don't know how to solve it, So, i had tried to put my applet in a div tag wih z-index=0, but it still hide my other Dhtml divs with bigger Z-index (z-index =1000)
    Have you any idea to solve this.
    Thanks
    Hakim

  • How can I get my macbook pro running Lion to print on my HP photosmart 309a??

    how can I get my macbook pro running Lion to print on my HP photosmart 309a??

    Did you install the drivers? Or have Software Update install them? This printer is supported:
    http://support.apple.com/kb/HT3669

  • How do I get .aspx files to run on my ipad2

    How do I get .aspx files to run on my ipad2

    aspx files are ASP.NET web pages. You just type the url of the file into your browser's address bar. For example http://theSiteAddress/index.aspx.
    If you mean you want to serve ASP.NET web pages you must be running Microsoft's IIS web server or a server with Microsoft extensions, which you can not do with an iPad. If you mean you want to open an aspx file for editing, these are just text files so use your favorite text editor and open the file for editing.

  • How can I get quicktime pro 7 running

    I bought quicktime pro 7 a couple of years ago and have a registration code.  At the time I used the program to make some time lapse movies.  I'd like to make a couple of time lapse movies again but quicktime pro 7 is no where to be found.  This probably ha something to do with updating the os between then and now.  The question is how can I get quicktime pro 7 running again?  The unlocking instructions I have for quicktime pro 7 that I received with the key do not correspond with what the system preferences now show.  Any assistance would be appreciated.  I am currently running OS X version 10.9.5 on an older iMac.

    Open the QuickTime 7 player(if it’s not installed, click here), choose Registration from the QuickTime Player 7 menu, and supply your key there.
    (115130)

  • How do I get Java Applets working on FF4 Mac?

    My website's photo upload applet uses Java to upload, and ever since FF4 beta releases, all the way up to the final, I get a missing plugin error. This error is ONLY on FF, it works on chrome and safari.
    Screenshot:
    http://img23.imageshack.us/i/javad.png/
    Clicking manual install goes to:
    http://www.oracle.com/technetwork/java/javase/download-138376.html
    So in other words, the manual install is pointless.
    How can I get these applets working?

    PS. I'm downgrading till this is fixed. FF4 is useless to me without this ability. I always liked FF for the better upload ability over Safari and Chrome, so I'd love to be able to use it. :-)

  • I have a I-mac that is not able to upgrade the os past 10.7.5, when I go to upgrade Pages it says i have to be running os 10.10, how can I get Pages that will run with os 10.7.5.

    I have a I-mac that is not able to upgrade the os past 10.7.5, when I go to upgrade Pages it says i have to be running os 10.10, how can I get Pages that will run with os 10.7.5.

    Click here and follow the instructions. If they’re not applicable, buy an iWork 09 DVD from a source such as Amazon or eBay.
    (116937)

  • How can I sync my various email accounts into an iCloud account.  Example.  I have an embarqmail.account.  How can I get it to sync with iPhone, iPad, iMac so that I don't have to read or review eMails on all 3 devices.  Thanks

    How can I sync my various email accounts into an iCloud account.  Example.  I have an embarqmail.account.  How can I get it to sync with iPhone, iPad, iMac so that I don't have to read or review eMails on all 3 devices.  Thanks

    You need OSX 10.7.2 or higher in order to access icloud.  The mobile me account is now defunct (it closed down more than a year ago).

  • How do I get my iPod to talk with my iMac using FaceTime?

    I know it's going to be something annoyingly obvious, BUT, how do I get my iPod to talk with my iMac using FaceTime? Both appear to work just fine with other emails, have made calls out to others using email addresses with both the iPod and the iMac. Have recieved calls from others on both iPod and iMac using phone numbers and email addresses. Just can't call my self as it were. Both the iPod and the iMac use the same email address, is this my problem? How do I get it work? (it's for my daughter so she can talk and see her mother when she under goes cancer treatment).

    Yes, having the same FT calling email address is the problem. It like trying to make a phone call to your your phone from your phone.
    On one device add another email address for FT and then uncheck or delete the Apple ID email address the Apple ID call email adddress on the device.
    On the iPod go to SettingsFaceTime>You can be Reached At

  • ?, How do I get Apple tv to show on my imac in the devices list?

    How do I get Apple tv to show on my imac in the devices list on itunes?

    This is only possible with the first generation Apple TV, as you can sync items to it. The second generation Apple TV does not do this.

  • Downloaded an audio book to my macbook. How do I get it on my it on my Imac? Imac?

    Downloaded an audio book to my macbook. How do I get it on my it on my Imac? Imac?

    iTunes for Mac: How to copy purchases between computers, http://support.apple.com/kb/ht1373

Maybe you are looking for