Results 1 to 2 of 2
  1. #1
    patriotsfan is offline Member
    Join Date
    May 2011
    Rep Power

    Default Protect Jar File

    I will soon be releasing a jar file to a lot of people to use a program I am making but I want to know how to protect my files. I know that someone can just change the .jar extension to .zip and extract all the .class files and basically see the code that exists. Is there anyway to easily prevent this? I will be releasing my jar as a JApplet on webpage and possibly a desktop app if I can solve these issues.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: Protect Jar File

    There are some trivial ways to keep people from looking at the logic of your code.
    Obfuscation is one.
    Another way would be to use a custom class loader, store your class files encrpypted and have your classloader decrypt them as they are read. This raises the difficulty level a bit but doesn't stop a programmer from creating a class file and then decompiling it.
    If someone can get your jar file, they can extract and decompile your code.

Similar Threads

  1. Tips to protect your software from piracy?
    By ozzyman in forum Forum Lobby
    Replies: 27
    Last Post: 11-22-2012, 09:32 PM
  2. Protect GUI swing application from piracy
    By leotreim in forum AWT / Swing
    Replies: 1
    Last Post: 07-24-2011, 10:50 PM
  3. How can I protect a Variable to be Garbage Collected
    By msv1022 in forum Advanced Java
    Replies: 7
    Last Post: 05-16-2011, 01:10 PM
  4. Need protect you MacBook?
    By bababoo in forum Reviews / Advertising
    Replies: 0
    Last Post: 01-12-2011, 05:36 PM
  5. how to protect java codes from being seen?
    By anthrax in forum Eclipse
    Replies: 5
    Last Post: 10-14-2009, 04:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts