Determine the host from where the Applet is loaded (this howto is deprecated)Tag(s): DEPRECATED
About cookies on this site
We use cookies to collect and analyze information on site performance and usage,
to provide social media features and to enhance and customize content and advertisements.
import java.applet.*;
import java.awt.*;
public class FromWhere extends Applet {
public void init() {
Label label = new Label(getCodeBase().toString());
add(label);
//
// you can check the value of getCodeBase()
// to implements a simple copy protection
// scheme. If it's not equals to your
// URL then quit.
// NOTE : This is not a very strong protection!
//
}
}