Java: Protecting applet source files, how?

Status
Not open for further replies.
1. There's no good way to protect the files. You can do some code obfuscation, but they're still have to have the code to execute it.

2. No, no way at all. You can't hide that from a determined user. If you could, then anyone could sneak running applets onto to webpages all the time, no?

3. Sure. Have a thread that sits idle until X seconds have passed, then it stops the execution.

4. Try htaccess in Apache or something.

I get the impression that you might want to use this Java Applet for some security task. Not a good idea, if that's what you're thinking. ;)
 
There are quite a few professonal Java obfuscator programs out there. They go throught the class files and do things like rename all of your variable and method and class names to one letter like "a" so it quickly becomes difficult to figure out what's going on. Because they shorten names the class files also get smaller. I think some of the might also put "bombs" into the bytecode. Like putting a pop instruction after a return in a method. A Java interpreter will just return but some decompilers will go past the return and read in the pop and get confused and crash.

Here's a link to the only program name I can remember for obfuscating DashO and you might want to check out Mocha for a decompiler.

~Kevin
:)
 

JimG

Wise, Aged Ars Veteran
170
Thanks for the input, i have run my applet through a obfuscator called JShrink, which is shareware and have seen good reults. It renames all the variables and such, i really would like a program which will do the same with the classes, except the main one. Most of the obfuscators out there are difficult to understand how to operate or commercial without a demo.
 
Status
Not open for further replies.