Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Java .class Files and Security

Posted on 2009-05-07
4
Medium Priority
?
183 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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This video teaches viewers about errors in exception handling.
Suggested Courses

604 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