Results 1 to 1 of 1
Thread: Getting the host of the applet
-
Getting the host of the applet
The class below shows hot to get the host name of an applet.
Java Code: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! // } }
Similar Threads
-
Looking Up the Address of a Host
By Java Tip in forum java.netReplies: 0Last Post: 04-07-2008, 08:11 PM -
Getting the host from where the Applet was loaded
By Java Tip in forum Java TipReplies: 0Last Post: 02-15-2008, 08:41 AM -
Getting host name/address
By Java Tip in forum Java TipReplies: 0Last Post: 11-19-2007, 04:34 PM -
Error with Sql 2000:java.net.NoRouteToHostException: No route to host: connect
By bbq in forum JDBCReplies: 0Last Post: 06-27-2007, 07:48 PM -
Applet, To center text and To open I engage in a dialog in an Applet
By Marcus in forum Java AppletsReplies: 4Last Post: 06-08-2007, 06:15 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks