Page 1 of 2 12 LastLast
Results 1 to 20 of 28

Thread: Secure

  1. #1
    Rabrg is offline Member
    Join Date
    Aug 2010
    Posts
    5
    Rep Power
    0

    Default Secure

    How would one secure a Java class?
    As in; users download a class, used as a "script".
    They can see the source files of the client,
    where this script is added in, but I do not want them to be able to find the source file of this script.
    Could there be a method in the Java API that enables the loading of scripts, from a database for a website, but does not save the class.
    That way the users can't decompile the class file.
    Last edited by Rabrg; 08-31-2010 at 12:20 AM.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default

    You're too paranoid.

  4. #4
    Rabrg is offline Member
    Join Date
    Aug 2010
    Posts
    5
    Rep Power
    0

    Default

    Tolls, I'm selling it. I don't want anyone to get it and give it to their friends, or post it somewhere.

    Eranga, its a small program that is used for a larger one.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default

    Quote Originally Posted by Rabrg View Post
    Tolls, I'm selling it. I don't want anyone to get it and give it to their friends, or post it somewhere.
    And?

    For starters your use of terminology doesn't fill me with confidence...classes as a "script"?

    How are you deploying this?

    Is it an Applet, Web Start, straight download/installer?

    Whichever of the above, there will be class files downloaded onto the users machine, because otherwise it won't work.

    If you knew Java well enough to write something good enough to warrant being paranoid about software theft then you would know that.

    (Not you, Eranga...:))

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    As you have several question to OP, I'm worried that what really means by scripts. No explanation at all.

  8. #8
    Rabrg is offline Member
    Join Date
    Aug 2010
    Posts
    5
    Rep Power
    0

    Default

    Totally ignore the word 'script'. My thing is a small program.

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default

    OK.

    You have a small program...how do you distribute it?
    How does it run?
    That was the second question.

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  11. #11
    Rabrg is offline Member
    Join Date
    Aug 2010
    Posts
    5
    Rep Power
    0

    Default

    Desktop. /Ten chars

  12. #12
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default

    You do realise you are essentially asking if it's possible to download and run a program without downloading the compiled code?

    The only way to avoid having code on the client machine is by having the client simply as a front end that accesses a server that does all the work.

  13. #13
    Rabrg is offline Member
    Join Date
    Aug 2010
    Posts
    5
    Rep Power
    0

    Default

    My friend just did it.

  14. #14
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default

    Then ask him how.
    Because I'll guarantee that to run a desktop program on your system will involve the class files being there somewhere, unless you have created an exe in which case there will be code that is still decompileable to some extent.

  15. #15
    neilcoffey is offline Senior Member
    Join Date
    Nov 2008
    Posts
    286
    Rep Power
    6

    Default

    As @Tolls says, whatever fancy scheme you come up with, the class files will always be there in some shape or form at the end of the day.

    The usual way to protect a Java program (which does it to some limited degree) is to use an obfuscator. This generally provides fairly poor protection on short programs and moderate protection against casual hackers on larger programs. At the end of the day, there's nothing you can do to prevent a determined enough person from reverse-engineering your program-- the idea is to make it difficult enough that for most people it's more viable to buy your program than hack it.

  16. #16
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default

    Or provide something else of value other than the straight code.

  17. #17
    xael is offline Member
    Join Date
    Sep 2010
    Posts
    31
    Rep Power
    0

    Default

    Could you obfuscate it? Just a thought, I don't actually know how to though. =]

  18. #18
    Prajin's Avatar
    Prajin is offline Senior Member
    Join Date
    Jun 2010
    Location
    Ktm, Nepal
    Posts
    120
    Rep Power
    0

    Default

    Here is something very interesting, read it
    obfuscator : Java Glossary

    -Regards

  19. #19
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    18

    Default

    1, 2 and 3 are really quite important in that list...I suspect a lot of people suffer from 1.
    :)

  20. #20
    Emperor is offline Member
    Join Date
    Sep 2010
    Posts
    2
    Rep Power
    0

    Default

    Quote Originally Posted by Tolls View Post
    You do realise you are essentially asking if it's possible to download and run a program without downloading the compiled code?

    The only way to avoid having code on the client machine is by having the client simply as a front end that accesses a server that does all the work.
    Simple; URLClassLoader.

    You host the class files on a simple URL, make it unaccessable by your users, and load the class using the URLClassLoader.

    You call him a beginner, but you haven't heard of the URLClassLoader yet?

Page 1 of 2 12 LastLast

Similar Threads

  1. How Java is so secure than other?
    By makpandian in forum New To Java
    Replies: 4
    Last Post: 06-26-2009, 04:22 AM
  2. Secure FTP Wrapper 3.0.3
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 07-23-2008, 01:56 PM
  3. Secure FTP Wrapper 3.0.2
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 04-29-2008, 06:05 PM
  4. Secure FTP Applet 4.4
    By vglass in forum Java Software
    Replies: 0
    Last Post: 11-13-2007, 06:30 PM
  5. Secure FTP Factory 7.0
    By vglass in forum Java Software
    Replies: 0
    Last Post: 07-20-2007, 01:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •