• 0

In Security: why is C++ preferred over Java?


Question

Greetings!

My question is: Why is security application development for Biometrics/Tracking/Detection applications normally make use of C++ programming language but not Java?

I would appreciate if you can give me details or maybe even give me good sites for me to reference from to learn.

Thanks a lot!

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

One very very simple answer.

C++ allows for out of process memory editing and process hooking. This allows a C++ program to view and edit any data loaded in memory.

Can't do this in Java.

Link to comment
Share on other sites

  • 0

that is a very good answer. Java, as a managed programming language and managed runtime environment, doesn't have access to the full processor features or the full memory space.

another answer is that the memory layout of a managed programming language is defined. if another program, or a programmer, wanted to investigate the memory contents of another program - they have to figure out what goes where in memory. however, this is easier with a managed programming language since a mapping of this information is kept and stored in a possibly predictable manner. so, managed programming languages (like Java, C#, VB.Net) are much easier to hack - which is very bad in security applications.

oh, and C++ can produce much faster code and also work natively on pretty much any system.

Link to comment
Share on other sites

  • 0

Like I said in the post that got deleted, the question is backwards.

It's actually C/C++ that is the default. Virtually all software is written in this. The question then becomes what Java has to offer for the uses you list. What would the advantage of using Java be? The answer is likely very little, apart from marginally simpler cross-platform support.

The disadvantages can be great though. Native C/C++ offers much better system integration (which is important if we're talking about interacting with hardware here) and performance. If you are talking about doing real-time analysis of video, then this is extremely intensive work. The overhead of Java might be undesirable.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.