This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes Security of Java Jar file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Security of Java Jar file" Watch "Security of Java Jar file" New topic
Author

Security of Java Jar file

Gursewak Singh
Ranch Hand

Joined: Jan 09, 2011
Posts: 79

As we know that we can extract a jar file and these class files can be decompiled
then how can we secure a jar file.

i also want to know how make a setup or exe of jar file in JAVA
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3647
    
  16

What would you call secure? Given enough dedication, it's *always* possible for someone to reverse engineer your code.

For installers I can recommend install4j. It can bundle a JVM with your Java program, saving the user the effort of downloading it themselves.
Gursewak Singh
Ranch Hand

Joined: Jan 09, 2011
Posts: 79

Ok sir,
Please tell how to made a setup or .exe
so that it need to be install like other softwares..
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14196
    
  20

Here is a list of Java installer generators. I've used IzPack myself in the past.

If you really want to make it impossible for anyone to reverse engineer your code, then you could make it a web application that runs on a server. People using the web app through their browsers will not be able to get at the code that is running on the server.

If it has to be code running on the client's computer, then there is no way to 100% guarantee that nobody can get at the code. There are some products, called obfuscators, that make the code harder to read, but someone who really wants to could in principle still reverse engineer it.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Joydeep Ghatak
Ranch Hand

Joined: Sep 30, 2009
Posts: 41

Hi Gursewak,

You can use "InstallAnywhere" software which I had used long back.
It was good and easy to use.

you can have some more information on that as follows,
http://en.wikipedia.org/wiki/InstallAnywhere

Also you need to make sure what will be your usage ambit, "commercial" or "personal", before using one free version of any software.

On "secure code", I think other members had provided the valuable information already.

~ Joydeep


“Men are only as good as their technical development allows them to be.”
 
Consider Paul's rocket mass heater.
 
subject: Security of Java Jar file