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

    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 online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    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, 08:32 PM
  2. Protect GUI swing application from piracy
    By leotreim in forum AWT / Swing
    Replies: 1
    Last Post: 07-24-2011, 09: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, 12:10 PM
  4. Need protect you MacBook?
    By bababoo in forum Reviews / Advertising
    Replies: 0
    Last Post: 01-12-2011, 04:36 PM
  5. how to protect java codes from being seen?
    By anthrax in forum Eclipse
    Replies: 5
    Last Post: 10-14-2009, 03: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
  •