Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Ability to decode Java JAR files

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ability to decode Java JAR files

    I know (or think) that Java JAR archives are able to be decoded for the most part. If I were to get into Java game development, and make a game that gets popular, how could I prevent people from decoding the JAR archive? I think there is a way to make an exe file of the JAR archive, but this would not be a very efficient solution.


  2. #2
    Junior Member
    Join Date
    Apr 2012
    Posts
    13
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Ability to decode Java JAR files

    There are lots of ways to open up a jar file -- unix/linux tar comes to mind -- but the actual code is compiled in a .class format. I'm not aware of any software that will convert it back to readable code.

  3. #3
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Ability to decode Java JAR files

    Quote Originally Posted by J697 View Post
    I know (or think) that Java JAR archives are able to be decoded for the most part. If I were to get into Java game development, and make a game that gets popular, how could I prevent people from decoding the JAR archive?
    In short, you can't.



    Quote Originally Posted by J697 View Post
    I think there is a way to make an exe file of the JAR archive, but this would not be a very efficient solution.
    Correct, not a solution.



    You can encrypt the program for storage and get some security that way, but at the end of the day you have the same problem. The encrypted program has to be decrypted to be run. As soon as someone has code that can be executed, they have code that can be reverse engineered.
    Luckily most people with the skills to do this, have little to no interest in doing it. I say most because I like to put faith in humanity... so please don't tell me how wrong i may be.

  4. #4
    Member
    Join Date
    Jun 2012
    Posts
    41
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: Ability to decode Java JAR files

    Even executables can be decoded in some long, roundabout, and time consuming way. But put it this way. If your game gets pirated, and a potential customer sees the pirated version, if they REALLY care about your game, they WILL buy it. Pirates don't truly feel good about what they do, and the customers that you want to have WILL buy your game. If you aren't selling your game, replace buy with "not steal" and customer with "user".

Similar Threads

  1. [SOLVED] Help reading a file to decode or encode
    By mickey2012 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: February 29th, 2012, 09:46 PM
  2. Encode and decode - Caesar cipher
    By siabanie in forum Java Theory & Questions
    Replies: 1
    Last Post: October 7th, 2011, 06:25 PM
  3. SQL Max Decode Problem
    By Jack_Maloney in forum Java Theory & Questions
    Replies: 1
    Last Post: July 21st, 2011, 07:13 PM
  4. Replies: 0
    Last Post: June 19th, 2011, 02:16 AM
  5. Decode Binary Packet via TCP Socket
    By maxice in forum Java Networking
    Replies: 0
    Last Post: November 8th, 2010, 02:38 PM