Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Downloads ok on Mac but not Windows?

 
Bob Somerville
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My site at Geocities.com/appletsforteachers is one page containing 10 applets. It works ok on Mac and Windows.
However it is possible to download the web page and then unstuff it. You can then play it by using a browser to launch the index.html page and then clicking on the links to any of the 10 applets.
On a Mac the applet is then launched but using Windows 95 or 98 the applet window opens but then freezes as a grey window.
Transferring the web page to a Windows PC has the same effect. The transferred program freezes but the same page on the web works ok.
Can anybody help a newbie to both PCs and Java?
 
Tim Holloway
Saloon Keeper
Posts: 18367
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "grey window" is the area of the web page where the applet would display its output. The reason it hangs is almost certainly that it's unable to load the class files - open the Java console and you'll probably see errors.
Evidently on the Mac you're unpacking the classes to a place where the browser's Java classloader can find them.
 
Bob Somerville
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim,
I opened the Java console and there were lots of errors.
The first one is significant:
com.ms.security.SecurityExceptionEx[NumberStories.index]: cannot access file/I:/WINDOWS/Desk top/appletsforteachers/success2.au
Number Stories is the apple that I am trying to run and success2.au is a sound file which is called very near the beginning of the nit method in Number Stories.
Java must have found NumberStories.class which is in a folder called class in appletsforteachers. I, too, had assumed that java was unable to find this class. The sound files are in appletsforteachers, in the same area as the html file like NumberStories.html, which call NumberStories.class. Is this the correct place to put them?
The sound is called by,
sound = getAudioClip(getDocumentBase(), "success2.au" );
if(sound != null)
sound.play();
It puzzles me that this downloads and runs on a Mac and that it runs on a PC on the web. It is only the downloaded version that crashes on Windows.
I get the feeling that I am mucking up where to place the files so that any machine can find them.
Thanks for your help,
Bob
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic