• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Secure Java source code

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a java standalone application that will be run from our client pc. An executable jar file is created and jar file is obfuscated. There is a startup script file which will run the application. Eventhough jar file is obfuscated, I am still able open the java file with the de compiler�s .Can you suggest me a better way to prevent from the client accessing my source code?
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you care?
Obfuscation is not security. In fact, SBO (security by obscurity) is not security at all.

What are you trying to prevent? If you are hoping for a DRM, you're not likely to (1) find one for Java code or (2) find one that works at all (see DVD cracks, game cracks, DES cracks, etc.).

You could, if you want to make it harder, encrypt the jar file, turning it to garbage, read it in at runtime, decrypt it, write it out, or point a class loader to it in memory.

Of course, that requires you keep the key in the executable, which defeats the whole purpose.

Implementing a real DRM is very hard, not an "intermediate" topic, in any language.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While it's ultimately impossible to keep Java bytecode secret from a determined attacker, it can be made much harder. See this for a discussion of applet code, much of is relevant just as much to applications.
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic