Applet from Sun's tutorial - can't get it to work

Hi all - I'm new to Java
Here's what I did so far:
I installed the Sun ONE Studio CE.
I downloaded the example .java files - ClickMe and Spot from the tutorial found at http://java.sun.com/docs/books/tutorial/java/concepts/practical.html
Using Sun ONE Studio I compiled the two java files into class files.
I created a html file called ClickMe.html and inserted the code from the tutorial page.
Now when I open the page (using localhost or the filepath) the applet displays ok and no errors occure. However no red spots apear when I click somewhere in the applet.
By searcing a little around I was led to beleive that it might have to do with setting the classpath so that the ClickMe.class which is called from the html file can find the Spot.class.
In command promt I ran C:>set and found that CLASSPATH="\QTJava.zip"
I then ran the command C:>set CLASSPATH=C:\sun-one-ide\sampledir\spot (which is the folder where the .java, .class and the .html file is on my computer).
This a) did not help and b) when I restarted my computer was back to CLASSPATH="\QTJava.zip"
I am running Windows XP professional.
Am I doing something wrong? Or do I need to install something more like the JRE (I kind of thought that everything needed was installed with the studio)?

Thank you for your reply. I tried everything you suggested. I checked "Show Java Console", and this is the error message that came when I tried to click inside the applet.
java.lang.NoClassDefFoundError: Spot
     at ClickMe.mousePressed(ClickMe.java:28)
     at java.awt.Component.processMouseEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.run(Unknown Source)Seems like even though the spot.class file lies within the same folder, the ClickMe.class (which is the one that runs as an applet in the html file) can't find it. It again makes me wonder if the CLASSPATH have something to do with this (though I'm just guessing).
If anyone got more suggestions I'd be very happy.

Similar Messages

  • Removal does not work from task bar, how can I get it to work?

    I have the latest version of firefox. clicking on the star and then remove does nothing.

    '''Try the Firefox Safe Mode''' to see how it works there. The Safe Mode is a troubleshooting mode, which disables most add-ons.''
    ''(If you're not using it, switch to the Default theme.)''
    * You can open the Firefox 4.0+ Safe Mode by holding the '''Shift''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Don't select anything right now, just use "'Start in Safe Mode"''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shift key) to open it again.''
    '''''If it is good in the Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one.
    Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''

  • All the CD's I have imported will not play. The only music that will play is cd's I have purchased from itunes. How can I get all my albums to play, please??

    All the CD's I have imported will not play. The only music that will play is cd's I have purchased from itunes. How can I get all my albums to play, please??

    iTunes Store- Transferring purchases from iOS device or iPod to a computer
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    How to dowload purchased music

  • I have a pioneer 50 inch plasma   I purchased new from the company back in 2005.   I tried to hook up an Apple Tv to the pioneer receiver that came with the TV.   I can not get it to work.   The receiver has two HDMI  inputs in the back.

    I have a pioneer 50 inch plasma + I purchased new from the company back in 2005.   I tried to hook up an Apple Tv to the pioneer receiver that came with the TV.   I can not get it to work.
    The receiver has two HDMI  inputs in the back.  However they say they are not for PC's.  Furthermore they must be set up by going to the home menu.    I tried everything, but I can not get the receiver to talk to the Apple TV. I even tried a connector that uses an HDMI to the Apple TV that has the other side of the cable as 5 RCA cables.  I could not get the receiver to see the Apple TV.   I have a newer TV in the house, it has no problem talking with the Apple TV.  But this older system seems to be handicapped in its ability to talk with the newer Apple TV system.
    My Email is [email protected] 
    Do you have any suggestions
    Thanks
    Bob

    I could not access the Apple TV on the television.   If I put the Apple TV directly into by TV, I have an external sound system (entertainment system), therefore I worry that I would by pass the audio.
    Thanks for taking your time to attempt to help!   Any more suggestions would be greatly appreciated.
    Bob

  • Hello! I was on my Mac and then I clicked on iTunes. Then I clicked on iTunes, and accidentally removed my device from my Mac, how can I get it back? Also when I plug my iPod into the computer, it downloads everything, how can I stop this. please help!thx

    Hello! I was on my Mac and then I clicked on iTunes. Then I clicked on Account, and accidentally removed my device from my Mac, how can I get it back? Also when I plug my iPod into the computer, it downloads everything that is on my computer, how can I stop this. please help! please help!!!!!!thank you

    Is the iPod still singed into the account isn Settings>iTunes and App Stores and SettingsZ>iCloudl? If it is then I would not be concerned.
    Also see:
    iTunes Store: Associating a device or computer to your Apple ID
    since you may have started the 90 day window.
    For the other "problem", go to iTunes>Preferences>Devices and check the box that says Prevent iPod....automatically syncing.

  • Just got a new mac computer and none of the music from my old computer's itunes transfered when I transfered the contents of the hard drive.  Now I'm trying to transfer music from my ipod and can't get all the files....help?

    Just got a new  computer and none of the music from my old computer's itunes transfered when I transfered the contents of the old hard drive.  Now I'm trying to transfer music from my ipod and can't get all the files....help please?

    The iphone is not a storage/backup device.
    It has always been very basic to always maintain a backup copy of your computer for this very occasion.
    Have you failed to do this?
    If so, not good, then you can transfer itunes purchases:  File>Devices>Transfer Purchases
    You may be able to purchase a third partyn program to get the rest ( not supported by Apple)

  • I updated my OS from 10.6.4., to 10.8.2 I want to buy iDVD and I Movie, but bought iPhoto and can't get it to work yet.  Hesistant to buy the others without now having the original applications on my laptop. Do I need to buy the older versions first?

    I updated my OS from 10.6.4., to 10.8.2.  I want to buy iDVD and iMovie, but I bought iPhoto and can't get it to work yet.  I'm hesitant to buy the others without now having the original applications on my laptop. Do I need to buy the older versions first?  They are probably on my Snow Leopard install disc, but I am now running Mt Lion that I bought, and downloaded a few days ago...so I don't want to insert the old OS disc, thinking it might want to reinstall the old OS...  Thanks,
    KathyH-P

    Download iPhoto Library Manager and use its rebuild function. (In Library Manager it's the FIle -> Rebuild command)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  

  • Excellent tutorial but can't get it to work

    Hello
    Hope someone can help. I've ben looking for a good calendar
    nugget since the demise of mxKalendar
    The adobe tutorial on blogs has an excellent example of a
    nugget
    http://www.adobe.com/devnet/dreamweaver/articles/php_blog3_03.html
    but I can't get it to work
    It gives a parameter error on the page month forward function
    $calendar .="<td><a
    href=day.php?m=$mn2&y=$yn2&d=$day>></a></td></tr>";
    Has anyone been able to get it to work?
    Any help/guidance appreciated
    ThanksClive

    Have you compared your code to the code in the example files?
    http://www.adobe.com/devnet/dreamweaver/articles/php_blog3.html
    http://download.macromedia.com/pub/developer/blog3_sample.zip
    Ken Ford
    Adobe Community Expert - Dreamweaver
    Fordwebs, LLC
    http://www.fordwebs.com
    "Clive" <[email protected]> wrote in message
    news:fruiu3$7u4$[email protected]..
    > Hello
    > Hope someone can help. I've ben looking for a good
    calendar nugget since
    > the
    > demise of mxKalendar
    > The adobe tutorial on blogs has an excellent example of
    a nugget
    >
    http://www.adobe.com/devnet/dreamweaver/articles/php_blog3_03.html
    > but I can't get it to work
    >
    > It gives a parameter error on the page month forward
    function
    >
    > $calendar .="<td><a
    href=day.php?m=$mn2&y=$yn2&d=$day>></a></td></tr>";
    >
    > Has anyone been able to get it to work?
    > Any help/guidance appreciated
    > ThanksClive
    >
    >

  • I just burned photos from different albums to CD-R. When I checked on the photos I burned on the CD-R afterwards,  I noticed that the titles of each folder that these photos are extracted from appear. How can I get rid of these titles???

    I just burned photos from different albums to CD-R. When I checked on the photos I burned on the CD-R afterwards,  I noticed that the titles of each folder that these photos are extracted from appear. How can I get rid of these titles???

    iPhoto 9.6 cannot open iPhoto Libraries on CD/DVD. The iPhoto Library needs to be on a writable storage.  Copy the iPhoto library from the disk to a folder in your Pictures folder. And then run the iPhoto Library Upgrader on that copy, see this link:  iPhoto '11: About the Library Upgrader

  • Songs wiped from ipod and itunes, can i get them back?

    songs wiped from ipod and itunes, can i get them back?

    If they were imported from CDs, and you had no other backup of them on your system or another drive, you'll need to reimport them from CDs again.
    For music purchased from the iTunes, you can redownload each track at no cost via iCloud.  See this article for more details.
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    B-rock

  • I downloaded songs from CD but I can't get them onto iTouch?  using iTunes 11, I downloaded songs from CD but I can't get them onto iTouch?  using iTunes 11

    I have downloaded songs from CD but I can't get them onto iTouch.  I have synced -- nothing.  I am using iTunes 11.

    Do others songs sync?
    Do apps sync?
    Do the songs play in iTunes?
    How are you syncing? See:
    iTunes: Syncing media content to iOS devices and iPod

  • I accidentally deleted the song in iTunes from my macbook, how can I get it back?

    I accidentally deleted the song in iTunes from my macbook, how can I get it back?
    Can I get it back from purchased order in iTunes store??

    It is not about using the cloud you access this as I said from inside the itunes store
    When you click on purchased you should see something like this. Click on the cloud icon by the side of the item to download it

  • I accidentally removed/deleted the Printer icon from my dock - how can I get it back?

    I accidentally removed/deleted the Printer icon from my dock - how can I get it back?  I've tried dragging and dropping from the Print window - no luck.  I tried to drag from the Systems folder - no luck.   IOS 10.9.4

    Well I have always had a printer icon in the Dock, launched or not launched (as in the screen shot below,) right next to the scan icon. Neither of which are launched at the present time.
    What happens if you run a print job, control click the printer icon>Options>Keep in Dock
    MacBook Pro (15-inch Mid 2012), OS X Mavericks (10.9.4), i7 500GB 16GB RAM iPhone5 iOS7.1.2

  • I had 21 songs i my album and after syncronising i only had 15 songs left! All of them from Itunes! How can i get them back without paying for them again???

    I had 21 songs i my album and after syncronising i only had 15 songs left! All of them from Itunes! How can i get them back without paying for them again???
    Hello!!!
    I had 21 songs i my album and after syncronising i only had 15 songs left! All of them from Itunes! How can i get them back without paying for them again???
    Hello!!!
    This realy works??

    Where is the backup of the media and other important files from the computer?  Ultimately, it is the users responsibility to ensure that backups exists. Waiting until there is a problem to decide to do a backup is not smart.  Would you wait until a fire started in your home to call the insurance company and inquire about homeowners/renters insurance????
    In the event that no backup exists (stop being lazy.... keep backups of YOUR data and other important files):
    If you are in the US and running iTunes 10.3 or later, it is possible to redownload music via iCloud from purchased history.
    If you are not in the US or for some reason cannot run iTunes 10.3 or later, contact iTunes customer support and ask very nicely for the opportunity to redownload the content.  They are not required to provide this opportunity.
    It is also possible to transfer content from an iDevice that was purchased via iTunes.  On the new computer, sign into the iTunes account, authorize the computer, connect the device then select File > Transfer Purchases.
    The simplest method of all is to transfer or copy the media (and other important files) from the old computer or the backup of the old computer.  Typing "move itunes library" into the search bar here or into google will reveal step by step instructions on how to do this.

  • I have an iPhone 4s. Today I went on to my calendar app to find everything deleted from it. Then I went to make a phone call and every single one of my contacts has gone from my phone. Can I get them back and how?

    I have an iPhone 4s. Today I went on to my calendar app to find everything deleted from it. Then I went to make a phone call and every single one of my contacts has gone from my phone. Can I get them back and how?

    Whoa whoa no need to go restoring stuff yet, once you've done that check to verify you have done what Overlook2011  IF that doesn't work for calendars ensure your default account for calendars is set to iCloud and in calendars that it is told to "Show all calendars"

Maybe you are looking for

  • New to iCal:  Audible alarms in iCal are not loud enough...

    I'm getting a Verizon iPhone and will then use MobileMe to keep everything synced. Until now, I've only used the calendar features in regular phones (I've never had a smartphone). I've fumbled around with iCal some on my Mac, and it clearly will be e

  • GetByProducId API call doesn't work

    Hi all, I have a question about a DPS api call. In the previous API versions (v24 and lower) of when I did the following call: var    productId = $(this).data('productId'),                                    folio = adobeDPS.libraryService.folioMap.g

  • InDesign 4 -- printing booklet

    I am building a publication, i set it in individual, facing pages 1-12...okay, i print as a booklet to get the pages 12,1 printed on one spread, 2,11 printed on one spread....and so on. I can print ALL the pages on the correct spreads at once, but ca

  • How to read and create TDM Files in a Java Applicatio​n?

    Hi, I want to read and write TDM-Files in a Java-Application. I found the TDMHeaderWriter for Java, that can write TDM-Files, but the reading part is still missing. Perhaps anyone knows an equivalent in Java to the TDM C DLL and the TDM C Header DLL?

  • Sip dialer is not active and mr pim

    i installed   call server--> router,ctoserver,ctios,pg,in pg1 agent pim, vru pim, in pg2 mr pim and dialer                  data server -----. logger, aw this is pcce setup details agent pim,vru pim, cti server all servers are active issue is mr pim