?
Solved

Java .class Files and Security

Posted on 2009-05-07
4
Medium Priority
?
182 Views
Last Modified: 2013-12-29
Hello,

I was curious how secure Java .class files are created using current versions of Java.

1. Can a Java .class file be uncompiled to be able to see the source code?

2. Is there a way to prevent this and\or encrypt it?


Thanks,

Michael
0
Comment
Question by:michael4606
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 600 total points
ID: 24326420
>>1. Can a Java .class file be uncompiled to be able to see the source code?

Yes, using a decompiler

>> 2. Not ultimately. All you can do is make it more difficult by using an obfuscator.


If you keep classes server-side, they should be safe though.
0
 
LVL 12

Expert Comment

by:basav_com
ID: 24326434
You can use java decompilers to see the source code of the .class files.
http://www.javaworld.com/javaworld/jw-07-1997/jw-07-decompilers.html
0
 
LVL 12

Accepted Solution

by:
basav_com earned 1000 total points
ID: 24326453
You can use 'Code Obfuscation' to prevent reverse engineering :)
http://www.cs.arizona.edu/~collberg/Research/Students/DouglasLow/obfuscation.html
0
 
LVL 92

Assisted Solution

by:objects
objects earned 400 total points
ID: 24332221
1. usually, though the quality of the source depends on what ofuscation was applied

Have a look here http://www.zelix.com/klassmaster/index.html


This is a good read on the subject

http://www.excelsior-usa.com/articles/java-obfuscators.html
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question