Re: Can I make a class file self destruct?



What you can always do is make the application "phone home", i.e. open
a connection to a server of yours, and ask for permission to launch.
That should be easy enough to implement, but it has the inherent
disadvantage that the client can always use a firewall to block your
application from opening an outgoing connection, or simply be offline
at the time of the application launching.

I am not sure what you want to do with your applet though ... could you
describe what you wanted to do there?

.... anyway, whatever you do make sure that you don't annoy your paying
customers. If I encounter applications who keep on opening outgoing
connections without outgoing reasons I am /very/ suspicious about that
application, and may eventually stop using it.

/philipp

JuanValdex wrote:
I would like to be able to access a class file remotely, and send it a
command to self-destruct if it is unlicensed. (We have thieves
distributing our class files without license.)

Can I put some code in the class file to do this?

Maybe access it remotely with...

<applet codebase="http://www.remotesite.com/"; code="myfile.class"...>
<param name="destroyClassFile" value="DoIt">
...

In the class file's code, something like...

String s=getParameter(destroyClassFile");
if (s == "DoIt") {
...code to destroy it
or
...overwrite itself on the server with junk
or
...turn on a function inside the class file to always display a
"this appears to be unlicensed" message
or
... ???
}

Any ideas? How can I send commands to the class file to permanently
change itself?

Thank you for your ideas!

.