Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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 The Software Craftsman this week in the Agile 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: 41601
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.
Have you tried LearnNowOnline?
subject: For those who wonder why java is secure ??