Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

For those who wonder why java is secure ??

 
Ammar Salem
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Campbell Ritchie
Sheriff
Pie
Posts: 49789
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic