Application Security

How will you make sure to develop Java/J2EE projects/applications secured from hackers?
Justify how Java projects are more secured than other languages?

Questions by dav4uuuu

Showing Answers 1 - 4 of 4 Answers

The answer contains 2 parts:

Part 1 : General explanation
Part 2 : Security in Java programming.

Java is an object oriented programming language that was developed after observing few cons in the so called "procedure oriented programming" language.

While developing projects, Object oriented programming languages are in great demand these days due to its extra benefits and features.
This greatly distinguishes it from procedure oriented programming.

The key features in object oriented programming are :
1) Secure
2) Robust 
3) Portable
4) Dynamic
5) Distributed
6) Multithreaded
7) Interpreted etc.. and many more to list :)

Java is considered more secure than other languages for several reasons.
Java source code always need a JVM ( Java Virtual Machine ) to execute the code,which is independent of the system n works on any platform.

Some of the interesting things I would like to mention as to why developers feel that Java is secure are:

No pointers
Java hides pointer. Allowing direct access to memory in any form can be dangerus. Hackers can misuse it by changing the content present in the memory. Or someone might even accidently change or overwrite the address in your pointer arithmetic or content in the memory.

Ex: Lets consider a bank.
Using C programming might be dangerous. Since the bank account balance can be easily changed by use if pointers.
But its not the case in JAVA since pointers concept doesn exist.
Java does not allocate direct pointers to memory. This makes it impossible to accidentally reference memory that belongs to other programs or the kernel.

Try-catch-finally has 3 steps :
1) Keep trying till an error is encountered.
2) Catch the error and throw an exceptional msg to the user.
3) Finally executes after try and catch processes. It will execute its content whether or not ant try-catch has occured.

The Java compiler catches more compile-time errors; other languages (like C++) will compile programs that produce unpredictable results.

Applet provides better security
Applet by default does not give the Applet application permission to read or write on your computer. Only after clicking run ActiveX , u can grant access. 
This encapsulates the applet and hence prevent malacious code. 
Developer's can safely write complex codes as Java security is always ON.

Garbage Collection
Developer's need not worry about memory issues and leaks. Since, in case an object is not in use, the JAVA's garbage collector automatically releases the unused or unreferenced object and hence can always have space in memory.

Finally would like to say that , the JVM can control all aspects of how the code is executed, and is able to block any security breaches before they even reach your computer.

Happy coding :)

  Was this answer useful?  Yes

Application security is technically described as the application given to the user provided with a security so as the save the applications and files form unauthorised users

  Was this answer useful?  Yes


  • Apr 22nd, 2012

J2EE application can be made secure by implementing:
1. Authentication
2. Authorization
3. Encrypt the information by making the transport guarantee as Confidential.

Authentication verifies if the user is a valid user by asking for the username and password.

Authorization verifies if the user has privileges of viewing a particular page.

The third is used for making the connection more secure. Making the transport guarantee as CONFIDENTIAL we can invoke https which in turn encrypts the information which is being passed.

Monika Gupta

  • May 7th, 2012

Java projects are more secured than other languages because after compilation of java program byte code is generated. And byte code is unreadable code. Any person cant read the byte code. then the project become more secure.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions