[java] Distributing Java Programs

Started by
17 comments, last by Telamon 20 years, 9 months ago
quote:Original post by Rocket05
quote:Original post by Telamon
Ick. None of that sounds too great. How to serious businesses sell their Java-based products if anyone can just open up their JARs and rifle through all their resources? What is the professional solution to this problem?


easy. its called not using java. i have yet to see a serious and/or professional software product use java.


Java is used in many professional pieces software. You don''t see it much though because it is not used to make commercial software and games. But Java is in high use for enterprise level software, such as web site back ends and multi tier data access apps.


First make it work,
then make it fast.

--Brian Kernighan

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
Advertisement
plus, this IS the Java board, so you didn''t really need to post here. obviously we see some use for java or we wouldn''t be here.
With a standard c/c++ program, sesitive reasources are often stored in a proprietary (well, not always) file that they will only know how to use. Java can do the same thing. For the class files, you have to send them through an obfuscator, or they can be decompiled almost back to the original. packaging into a JAR can give you that whole one exe feels too.
Also, a comment one people being able to open up your JAR file and view the resources, there are resource extractors for exe files which could get all the images you use (unless you encrypt them.. and still, unless it was strong encryption people could easily break it). 2 mins of searching google would come up with an exe resource extractor, so JAR files aren''t that much more insecure than exe files (at least in the resource extracting aspect).
The simplest form of obfuscation for Java is to turn debug compiling off when you distribute.


First make it work,
then make it fast.

--Brian Kernighan

"I’m happy to share what I can, because I’m in it for the love of programming. The Ferraris are just gravy, honest!" --John Carmack: Forward to Graphics Programming Black Book
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
There is one game that's written in Java. http://www.puppygames.net/

It may not be selling in stores, but it's getting great reviews, and is sold off the site. It's an awesome game. At least download the demo. They used a program called JET that will generate native files for Windows, Linux, and OSX. It also generates an installer. This also eliminates any need for a JVM if you don't use AWT or SWING.

The down side is that it costs some $5k, if I remember correctly.

[edited by - nickwinters on July 10, 2003 7:34:55 PM]
Anyone who is serious about code security won't trust hardware (that includes everyone from government agencies to cable-TV providers). All popular commercial programs get cracked (commonly done by running them through a debugger), and the great majority of them are written in C++.

When NSA realized they had to implement their secret Skipjack encryption algorithm in software because of limited manufacturing capacity for hardware crypto devices, they decided to publish full specifications for the algorithm before it got reverse-engineered by someone else.

Count yourself lucky if your competitors waste time trying to reverse-engineer your app instead of just coding their own rip-off from scratch. If you got an algorithm really worth protecting then don't trust code obscurity to keep it safe, get a proper patent.

[edited by - HenryAPe on July 11, 2003 4:58:54 AM]
CaptainJester, that may be the simplest way of obfuscation, but if you want to make it hard for people who decompile your code the get a demo of an obfuscator and use it. It''s much harder to underand code that uses one. And yes, I agree with HenryApe, if you really want to protect your algorithm, just get a patent. And expanding on rickwinter''s post, the program Excepsior JET can create native exe''s from java code. It optimizes it beautifully too. You can get a demo, I don''t remember off the top of my head what the limitations are though. For the professional edition demo it''s a 60 day trial, for the non professional edition it never expires, I can''t remember the draw back. Anyway, for any of you interested, the site is http://www.excelsior-usa.com/jet.html.
And also, in case any of you are wondering the rough size of the exe it creates, I made a hello world program with a few other functions in it and it came to 10kb or so. Anyway, enough of my talking.
I agree. If you're really paranoid about people stealing your ideas, run your source through a freeware obfusicator. But I'd think that anyone tenacious enough to tackle optomized-decompiled source won't be stopped by cheap or free obfusication. In a world with Intigrated Reverse-Engineering Enviroments, any code you write can be read by others in one form or another. If you want to protect it, write it on a napkin and hide it under your tower.

I guess the real question to you Telamon is what is the major platform you want to distribute to? (and what's so secret about your algorithms?)

[edited by - Infinity_ on July 11, 2003 6:15:09 AM]

This topic is closed to new replies.

Advertisement