Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Java language is R obust/Secure/Safe
#1
Java is very robust
o Both, vs. unintentional errors and vs. malicious code such as viruses.
o Java has slightly worse performance since it does all this checking. (Or put the other way, C can be faster since it doesn't check anything.)
• The JVM "verifier" checks the code when it is loaded to verify that it has the correct structure -- that it does not use an uninitialized pointer, or mix int and pointer types. This is one-time "static" analysis -- checking that the code has the correct structure without running it.
• The JVM also does "dynamic" checking at runtime for certain operations, such as pointer and array access, to make sure they are touching only the memory they should. You will write code that runs into
• As a result, many common bugs and security problems (e.g. "buffer overflow") are not possible in java. The checks also make it easier to find many common bugs easy, since they are caught by the runtime checker.
• You will generally never write code that fails the verifier, since your compiler is smart enough to only generate correct code. You will write code that runs into the runtime checks all the time as you debug -- array out of bounds, null pointer.
• Java also has a runtime Security Manager can check which operations a particular piece of code is allowed to do. As a result, java can run un-trusted code in a "sandbox" where, for example, it can draw to the screen but cannot access the local file system.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to run a java file that creaded in Ntebeans in console Vuhelper 1 4,980 08-01-2012, 10:23 PM
Last Post: Pari ch
  Send image to client over a socket in java 2011 Vuhelper 1 3,682 04-21-2012, 02:11 AM
Last Post: hoailenpro
  double buffering in java 2011-12 Vuhelper 0 2,209 09-12-2011, 10:30 PM
Last Post: Vuhelper
  Using wait and notify? in java 2011-12 Vuhelper 0 2,135 09-12-2011, 10:29 PM
Last Post: Vuhelper
  text wrap in java 2011-12 Vuhelper 0 2,146 09-12-2011, 10:27 PM
Last Post: Vuhelper
  TableModelListener ERROR in Java 2011 Vuhelper 0 2,039 07-23-2011, 05:47 PM
Last Post: Vuhelper
  Exception Handling in Java 2011 Vuhelper 0 1,990 07-23-2011, 05:46 PM
Last Post: Vuhelper
  Getting the element of a vector in Java 2011 Vuhelper 0 1,894 07-23-2011, 05:45 PM
Last Post: Vuhelper
  program does not enter for loop in Java 2011 Vuhelper 0 2,093 07-23-2011, 05:44 PM
Last Post: Vuhelper
  Editor does NOT contain a main type in Java 2011 Vuhelper 0 4,124 07-23-2011, 05:43 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)