Java
Why Java
Why has Java become so popular among application developers? Primarily because Java makes application developers more productive. It is a modern, robust, object-oriented language. Java’s unprecedented popularity stems from the following three benefits:
- Application Development Is Simpler - Java offers features such as support for networking, multithreading and automatic garbage collection that make application development simpler than most of its predecessors.
- Applications Are Platform Independent - The same Java binaries can run on any platform that supports a Java Virtual Machine, from embedded systems to mainframes. This reduces, if not completely eliminates, the task of porting applications.
- Applications Can Be Developed As Components - Java offers a component model, JavaBeans, that allows application developers to design and package components that can be assembled with components written by other application developers. Enterprise JavaBeans extend the component model for Java to server-side components. Server-side components enable application developers to develop “business logic” and package it as a component that can be assembled into applications. The JavaBeans component model enables the development of a robust market for plug-and-play software modules. This new application development model enables rapid assembly of applications that can be customized and deployed on any platform and adapted as a company’s business needs change.
The Java language is easier to understand (and write) than languages such as C and C++ because Java doesn't use pointers.
web application library folder = WEB-INF
Articles Related
Java for enterprise application — a server language
Much of Java’s initial popularity came from its suitability for adding dynamic content to web pages, in the form of mini applications — “applets” — that run on the client machine. However, Java is moving rapidly toward its primary use in the future: writing enterprise and Internet applications that can be deployed in either client-server or intranet/Internet configurations. There are several reasons for Java’s popularity as a server language.
Java is a safe language
And is therefore ideally suited for database integration. Because the database must be a safe environment and provide the foundation for several mission-critical applications, Oracle does not allow application code that could potentially compromise the integrity of the database to run inside the database. For example, Oracle does not permit application code written in “unsafe” languages like C or C++ to be executed in the same address space as the database. Although languages like C provide tremendous flexibility to application developers, they also have several pitfalls. Even experienced C and C++ programmers make these errors:
- Overwriting Array Boundaries - Because arrays and strings are manipulated as pointers, programmers inadvertently overwrite the boundaries of arrays and strings.
- Memory Leaks And Corruption - Memory allocation and deallocation is left to the programmer and results in a variety of programming problems, including memory corruption and memory leaks.
Any of these errors in an application can compromise the integrity of the database and halt missioncritical applications. In contrast, Java is a strongly-typed language and includes native support for arrays and strings and built-in support for memory management. The garbage collection mechanism built into the Java language frees application developers from allocating and deallocating memory, thereby eliminating problems of memory corruption and memory leaks.
Java is platform-independent
Apart from being a safe language, Java on the server offers many of the same benefits to application developers that it does on the client. Because Java is platform-independent, application logic developed in Java can easily be deployed on any server that supports Java. This enables true application partitioning in a multi-tier environment. Application programs written in Java can easily be migrated to another server without having to rewrite the application. Enterprises can leverage these benefits to improve time-to-market and lower system development and administration costs.
Client or a server environment
Java is a full-featured language whose expressive power is close to C. It can be used to develop any kind of applications in a client or a server environment.
Bat File
set CLASSPATH=..libxdo.zip;..libxdoparser.jar;..libxmlparserv2.jar;..libi18nAPI_v3.jar;..libaolj.jar set JAVA_CLASS=oracle.apps.xdo.template.pdf.book.PDFBookBinder set JAVA_OPTS=-mx150m set JAVA_CMD=%JAVA_HOME% -classpath %CLASSPATH% %JAVA_OPTS% %JAVA_CLASS% echo %JAVA_CMD% -debug true -tmp ..tmp -xml Example1.xml -pdf Example1.pdf %JAVA_CMD% -debug true -tmp ..tmp -xml Example1.xml -pdf Example1.pdf
$CLASSPATH is the environment variable path where java search the archive.
Maven
Apache Maven est un outil logiciel libre pour la gestion et l'automatisation de production des projets logiciel Java. L'objectif recherché est comparable au système Make sous Unix : produire un logiciel à partir de ses sources, en optimisant les tâches réalisées à cette fin et en garantissant le bon ordre de fabrication.
Il est semblable à l'outil Ant, mais fournit des moyens de configuration plus simples, eux aussi basés sur le format XML. Maven est géré par l'organisation Apache Software Foundation. Précédemment Maven était une branche de l'organisation Jakarta Project.
Debug
Jsp
Debugging JSPs becomes easier after knowing that they are converted into Java files. This takes place at runtime, just before they are compiled by javac.
Java Logging APIs
The JavaTM Logging APIs, introduced in package java.util.logging, facilitate software servicing and maintenance at customer sites by producing log reports suitable for analysis by end users, system administrators, field service engineers, and software development teams. The Logging APIs capture information such as security failures, configuration errors, performance bottlenecks, and/or bugs in the application or platform. The core package includes support for delivering plain text or XML-formatted log records to memory, output streams, consoles, files, and sockets. In addition, the logging APIs are capable of interacting with logging services that already exist on the host operating system.
Other logging API :
- Log4J
- Jakarta Common Logging Component