I am trying to download some applets for my physics class (my students like applets a lot) and cannot download them because I don't know how to interpret the tag CODEBASE="."
The web page source code looks like this:
<applet code="Lab.class" name="Lab"
archive="Lab.jar" codebase="." width=640 height=440>
<param name="simulation" value="single spring">
You see from it that CODEBASE points to ".", but I can't seem to figure that out. I have done research in several java books and didn't find any reference for that "." address.
Could you please give me a hand with this?

Recommended Answers

All 3 Replies

the codebase tag serves a similar purpose to the classpath environment setting in that it helps determine where the JVM should get classes for the applet.

Thanks for your support.
I understand the functionality of CODEBASE, what I need to know is where that "." points to.
I mean, let's say I'm looking at a web page whose HTML code says
and its address is: www.mywebpage.com/applets/a1.html

I know the JVM will look for the classes for the applets at www.mywebpage.com/applets/myclasses/example1/
Am I correct?
Then, where would the JVM get the classes if instead of codebase="myclasses/example1/" I have codebase="." in the HTML code?

It is a pleasure to tell you I solved the issue. I found out the "." is just a relative URL for the current directory. Downloaded the *.jar file and deleted the codebase tag from the web page saved in my compurer and, go!
Thanks for your support.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.