] 1 2 3 4 Next Page
Amateur development wonderful topic (Java class)
· JBuilder 2005 Code Review Function · JSP program design primary entry tutorial · Java database interface JDBC entry base lecture · "Tiger" coming J2SE1.5 new features List · Java Applet programming skill instance album · JBuilder 9.0 fashion programming icon · hibernate Principle and Configuration Quick Starts · Transforming Recommended Vegetables Java Getting Started Java Language has three major characteristics: platform independence, network mobility, and security, and Java architecture provides strong support and guarantee for these three characteristics, this article focuses on This section describes the principle and method of supporting information security in the JAVA architecture. The Java Architecture Java architecture is shown below. First, Java's source code Java file is compiled into a Java's binary code Class file by the compiler, and then the class file is loaded by the type load in the Java virtual machine, at the same time The loader also loads Java's original API Class file, and the class loader is primarily loaded, connected, and initialized these Class files, and the execution engine is handed over to the execution engine in the virtual machine, interpretation of the Java instruction in the class file into specific The local operating system method is executed, and the security manager will access the external resource in the execution process according to the setup security policy control instruction.
Java's execution method is not compilation execution but is interpreted. The same source code above the different platforms is compiled into the same binary-by-reference code code that meets the Java specification, and then handed over to the virtual machine to support the respective platforms to explain, "compile, After explaining, "three-step way to make Java" once a write, run everywhere ", if the Java app is used by 100% standard Java API and does not directly call the local method, then it can be applied without modification On a variety of platforms, such platforms are unrelated to make it more convenient and reality in the use of heterogeneous network environments or embedded aspects. Java's network mobility brings a new software mode. On the basis of distributed processing mode, you can transfer software and data to the client through the network, so that the client has a must-have software to view. And manipulating data transmitted over the network, the Java architecture supports cutting a single execution file into a small binary-based code file Class file, and these files can be dynamically connected, dynamically expanded in accordance with the needs of the application. The Java architecture supports security support primarily through Java language itself, virtual machine loader and security manager, and Java provide several aspects of the security API provided: preventing malicious programs from attacking, programs cannot destroy user computers Environment; prevent intrusion, the program cannot obtain confidential information of the host or the intranet; authentication, verification program provider and user identity; encryption, encrypt the data of the transferred exchange, or encrypt the persistent data; verification, Operation setting rules and verify. The need for Java information security With the more and more extensive Internet applications, and the Internet has its own unique resource sharing, it is important to pay attention to the user in a timely and accurate information of information and processing information, this is also Java. The reasons for rapid development and widely accepted. But the network also provides a potential way to attack the access computer, especially when the user downloads the network software locally, which requires Java to prevent the problem of virus / Trojans, and protect information and local environment. For example, when we browse a web page, Applets on the web may be downloaded and run, and this applet is all possible from unreliable places, or we use unreliable service objects on the network found through JINI. Services, if there is no security mechanism provided by the Java architecture, this is likely to introduce a hostile program that causes information loss, information disclosure, believes for fake data and modifying local computer security settings, and brings unknown serious as a result of. The Java language itself is designed to design Java on the basis of C , so it is more simple and clear compared to C , the structure, unit, operator overload, virtual basics, etc. are not in Java. Adoption, and canceling multiple inheritance and uses the way to implement multiple interfaces. This reduces the chance of developers to make mistakes to help them write more secure code. In Java, the "pointer" in the C language is easily error-free, using the structure of a list, a pile, hash table, etc., avoiding any unsafe structure. Java has no indexed array access, as this often leads to an unprofitable, unpredictable program operation, all of which must first check if the offline is checked. Java requires all variables that cannot be used before initialization. For basic data type variables, they automatically assign a initial value to avoid unin-initialized variables to obtain memory information. All of this makes the program unable to access any memory address. For entity information in memory, it can only be accessed by the permissions, and the type pointer is enforced into a memory pointer like C , and then look up by memory. Methods Find private variables.
Java allocation memory is transparent to developers. Developers use new methods to create new objects. At this time, virtual machines will find suitable memory spaces from the stack memory, and developers do not need to intervene. For memory recycling, Java avoids developers to clarify the recycling of objects, such as the C's Free or C delete commands, avoiding the developer's unintentional damage to memory. Java uses virtual machine "garbage collection" mechanisms to be implemented automatic management, release the memory resources that are no longer used, the memory recovery is like a garbage collection car, but the collection car seen in the street, only The garbage is collected in the trash can, it is also to go to your home to help you find the rubbish, then take these things away, and finally organize the space in the home, and make the biggest The space makes you new things. The purpose of Java's memory recovery is to find an object that is no longer referenced, releases memory space, and needs to organize the memory space, try to avoid "insufficient memory". For the serialization object exchanged in the network, it is easy to access the object's private information when rebuilding the object. At this time, Java provides two ways to protect information, one is to use the TRANSIENT keyword method, so When the object serialization, the variable is not read, the other is to implement the Externalizable interface instead of the serizlizable interface, such an object can only be saved and rebuilt through the WriteExternal and Readexternal methods, and other methods cannot be performed. These are the foundations of the Java language itself provides information security. 1 2 3 4 Next Page