• 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

Java Decompiler

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have learned about decompilers which give you source code from the .class file. Isn't this something which violates the basic right of a developer ?
Anybody can decompile and get the source code ..
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They sure can. If you do that to copy righted code you might find yourself in jail
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They are useful when you lost source code of some application/library you wrote and need the source code. Other than that usage of it can be illegal.
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can try Obfuscating your code before you hand over to client.
 
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Shiraz Khan:
Isn't this something which violates the basic right of a developer ?



I find this problem interesting, because I have to deal with several issues - on large projects - which can be fun and challenging for some of the advanced workers I see in this Java Ranch discussion group, but what are the basic rights of a developer ? Yes, you most definitely have a right to protect your proper efforts from unjust use - but what of the many workers who give away code for free ? In paticular, the Sun website has thousands of keystrokes of code which is Copyright 1994-1998 by Sun Microsystems, Inc., which you may use.

The sad part about it is that there is no short supply of ( ? ) which will try to take something which is protected, going past better things that are given away free.



But I have a team memeber who is degreed in such matters and have been advised that most businesses do not have time nor patience to deal with such things and will impede the project if I try to code around such work.

Then lines 88-101 of my work go to great lengths to detect unauthorized use:

class files can be de-compiled, but I suggest dealing with reasonable people / do what you can about it / consider it in your work ....

But be moderated in your solutions.
 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any other language where similar thing is possible ?
And it this a limitation of Java that its source can be extracted from binaries ?
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to know why you want to hide your code.
Would it bring your company harm if someone succeeded in reading your code?
If they did, could they than commercialize it and steal a part of your business revenue?

(I am asking this because it does not seem to worry the companies that distribute their code as unobfuscated jars)

Regards, Jan
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Proper licensing , copy righted code is a good solution.
[ May 07, 2007: Message edited by: Rahul Bhattacharjee ]
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Shiraz Khan:
Is there any other language where similar thing is possible ?


There is a language which forces one to document the source code in the distributed executable, or the program will not compile. I do not remember the name of it.

And it this a limitation of Java that its source can be extracted from binaries ?


Well, actually, they are not totally binaries. The format is what is called a Web Archive, and is not dissimilar to a Zip file. The binary information in the file is largely limited to tracking offsets of where bytecodes are - bytecodes are a common form of intermediate description of program functioning that can be readily translated to runnable / executable instructions on a machine.

Here is an example:




No one would object if you use Java for learning, then write in some other language, but by the time you get your question answered ~ you won't be going to another language.'


[ May 13, 2007: Message edited by: Nicholas Jordan ]
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jan Cumps:
(I am asking this because it does not seem to worry the companies that distribute their code as unobfuscated jars)



Yup, me too. I went round and round on this untill I began obfusicating func()'s by naming them from random natural events - to avoid one avenue of enroachment. Then on the other hand, some companies have some things that need to be protected. It may do the poster some good to consider that encryption Algorithm - widely used in computing, linguistics, and related disciplines, does not need to be protected - only the keys.

Additonally, D.E.K. Vol II § 3.1 Algorithm K:

Super Random number generator
Given a ten digit decimal number X, this algorithm may be used to change X to number that shoulld come next in a suposedly random sequence. Although the algorithm might be expected to yield quite a random sequence, reasons given below show that it is not, in fact, very good at all. (The reader need not study this algorithm in great detail, except to observe how complicated it is; note, in paticular, steps K1 and K2)



That's Donald E. Knuth.     
[ May 13, 2007: Message edited by: Nicholas Jordan ]
 
Where does a nanny get ground to air missles? Protect this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic