• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hiding src code

 
Ziggy Kowalski
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

is there a way to stop someone from downloading the jar file that my appelt src code is stored in, unjarring the files and getting access to my src code?

thank you
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The source code shouldn't be in the jar file -- just the compiled .class files.

But even given that, decompiling .class files is easy and the results are generally remarkably like the original. Google for "Java Obfuscator" and you'll find a number of products, both open-source and commercial, which let you make this task a little harder.

But of course, you can't run an applet without downloading the jar file, because the code has to be on the client machine to run. If you really, really need to keep something proprietary, then don't use applets: keep the important Java code on the server, in a servlet, and use HTML as the GUI, or use a very thin applet that dispatches the interesting parts off to be done on the server.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Applet FAQ lays out a number of steps you can take to make it progressively harder to access the source code. Absolute protection is not possible, though.
[ February 21, 2006: Message edited by: Ulf Dittmer ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic