This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes For those who wonder why java is secure ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "For those who wonder why java is secure ??" Watch "For those who wonder why java is secure ??" New topic

For those who wonder why java is secure ??

Ammar Salem
Ranch Hand

Joined: Dec 29, 2007
Posts: 60
The security of java is two-fold.Firstly,the java interpreter verifies the bytecode before executing it.If the bytecode turns out to be invalid, it well not be executed at all.Secondly, java does not allow programmers to interact with the memory of the system.that is, one cannot write a java code that access the memory of the system.
with respect,

****************************<br />For Some Dreams.....<br />One Lifetime Is Not Enough.<br />****************************
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46437
I think you are a bit overoptimistic there. Yes, the JVM does check the bytecode for integrity, but there are ways of fooling it. I know where to find out how, but I am keeping quiet about that.
The bit about not accessing memory probably applies only to unsigned applets, which come with dire warnings about not being secure! You are right that direct access to addresses in RAM is not possible, but you can get at files and change them. You could also access C code, which might permit direct RAM access. I only have a vague idea how to do that. But it is much more difficult to damage a computer with Java code than with C or C++; very few viruses are written in Java.
I agree. Here's the link:
subject: For those who wonder why java is secure ??
It's not a secret anymore!