Skip to main content

help with applet tag

3 replies [Last post]
ph0tik
Offline
Joined: 2006-02-17
Points: 0

I don't know why I have been having so much trouble with all of this but it's driving me nuts. The directory with my .class files can be seen here:

http://www.mines.edu/students/s/styler/TestTaker

I need all of those classes. They are part of a package called TestTaker and the main class is called TestTaker. If you take a look at the TestTaker.html file I have there you will see it doesn't load properly. Right now I have it simply saying

code=TestTaker.TestTaker.class
or
code=TestTaker.class

And the html run from within that directory or a level above it will not work. Currently when run from a level above the TestTaker directory it freezes so I cannot check the error messages. Can someone tell me the code I need to get this working? Thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
brinkley
Offline
Joined: 2003-06-06
Points: 0

Topic doesn't belong in JavaHelp. Moved here.

ph0tik
Offline
Joined: 2006-02-17
Points: 0

It appears it may be working except I get some sort of error trying to access files within the TestTaker directory? I intially coded TestTaker to access the files just by name such as "pig.jpg" or "Basics.txt" then I tried "http://www.mines.edu/students/s/styler/TestTaker/pig.jpg" which is the current setup and it still give me an io permission error. Anyone know what's up? Thanks

wew64
Offline
Joined: 2004-06-29
Points: 0

You need to use something like
[code]
URL url = getDocumentBase();
//then when you read image, something like
getImage(url+"/pig.jpeg");

//not http://www.mines.edu/students/s/styler/TestTaker/
[/code]