On Nov 14, 2007, at 2:51 PM, Adrian Bartholomew wrote:
getCodeBase() and getDocumentBase() is not the same thing. ur
applet could be on an entirely different server.
plus, it just doesnt make sense that sun would have 2 doing the
same thing.
The code base, returned by the JApplet getCodeBase method, is a URL
that specifies the directory from which the applet's classes were
loaded.
The document base, returned by the JApplet getDocumentBase method,
specifies the directory of the HTML page that contains the applet.
Unless the <APPLET> tag specifies a code base, both the code base and
document base refer to the same directory on the same server.
Data that the applet might need, or needs to rely on as a backup, is
usually specified relative to the code base. Data that the applet
developer specifies, often by using parameters, is usually specified
relative to the document base.
_______________________
Note that this information is for an applet, running inside of a web
page, in the user's web browser. getDocumentBase is only really
relevant when that is the case. Perhaps you should try a little basic
debugging, and System.out.println the results of these two methods,
like:
Which should give you a sense of where your applet is currently
looking for those resources.
--
Troy
RPSystems, Ltd. http://www.rpsystems.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden