|
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Product Reviews Java for Linux
Java for Linux
By: Dr Harry Foxwell
Dec. 1, 1999 12:00 AM
Two technologies that have gained widespread interest and support in the past few years are Java and Linux. Until recently, however, the two were separate, although they share similar visions of open, ubiquitous computing. As interest in both Java and Linux solutions increases, developers are naturally looking to combine the two, and want to write applications in Java that run on Linux systems. But they need stable, fast and fully functional JVMs, especially for server solutions that require servlets and support for Java Server Pages. Several independent efforts to port JVMs to Linux are in progress, including those by IBM, Sun Microsystems, the Blackdown Java-Linux Porting Team headed by Steve Byrne and the Kaffe group headed by Tim Wilkinson. The IBM and Blackdown ports are based on code licensed from Sun, while Kaffe is a "cleanroom" implementation. Ports based on Sun code are complicated - and frequently delayed - by licensing issues. While IBM has an industry license for Java technologies, the Blackdown group had to make special licensing arrangements to obtain the Java 2 JVM source code. Sun's Community Source Code License may eventually make it easier to resolve these licensing issues, although the prevailing opinion within the Linux community seems to favor the GNU Public License.
Current JVMs for Linux
The Micro Edition, for example, excludes some libraries - such as the AWT classes - that aren't needed for embedded systems and handheld devices. The Enterprise Edition targets server application development and supports Enterprise JavaBeans classes. The Java for Linux efforts now in progress target the Standard Edition, which includes the Java Foundation Classes. Available Linux JVM ports are all based on the "Classic" JVM reference code and don't include any of Sun's HotSpot or other performance-enhancement code. IBM's port is an early-access release of the 1.1.8 JVM, and includes a JIT compiler and support for native threads. Linux users who have worked with this JVM report good performance and stability. IBM is reportedly working on a Java 2 port, but they correctly observe that there is still much demand for 1.1 applications and that 1.2 isn't widely used yet. The Kaffe JVM, included with some Linux distributions, is a cleanroom implementation of the 1.1 JVM specification. But the most recent release, 1.0b4, doesn't include RMI support and is missing several crucial security features such as bytecode verification and observance of "private" modifiers. Tim Wilkinson, who leads the Kaffe effort, says several improvements are in progress, including a significantly faster JIT compiler and support for the Java 2 Collections API. The Blackdown ports of the 1.1 and 1.2 JDKs are probably the best-known implementations for Linux. Led by Steve Byrne, a former Sun employee, the team has been working on a fully JCK-compliant 1.2 JVM for nearly a year. The current "prerelease" is fairly complete and stable, and includes a JIT compiler. Sun has provided some engineering support to the Blackdown group for JDK ports, and has even worked with several Linux distributors such as RedHat to help port Linux itself to UltraSPARC systems. Linux developers would like to see Sun provide a supported reference implementation of the Java 2 SDK, but Sun has made no announcements about its plans for supporting Java on Linux.
Java Programming on Linux Systems
bzip2 -d jdk1.2pre-v2.tar.bz2 After you install the files in a directory, you need to set your PATH environment variable so your command shell can find the javac compiler, the java runtime program and other Java utility programs. Also, if you plan to use third-party Java libraries, you must set your CLASSPATH environment variable to include the directory location of those libraries. For example, I set my Java environment variables for my command shell, ksh, like this:
export PATH=/usr/local/java/bin:$PATH Test your installation by entering "java - version" from your command line. The JVM should start up and report "java version 1.2" or something similar. If you're testing more than one JDK, be sure to set your PATH and CLASSPATH explicitly for each version that you plan to use (see Figure 1). Linux JVMs typically require a "glibc" C library in order to run. Check the Release Notes for your JVM to determine which version of this library is required. Most current Linux distributions ship with one or more versions of "glibc". The Blackdown 1.2 JDK requires "glibc2", also called "libc6", and is found at "/lib/libc.so.6". All of the current Linux JVM offerings are unsupported beta or early-access releases. As such, they are incomplete, buggy and not fully optimized for performance. The Blackdown 1.2 JVM doesn't have a working native threads module yet, and the IBM port is missing some IO exceptions. Moreover, important extension APIs, such as Java 3D, Advanced Imaging, and Sound, aren't yet ported to Linux. Sun has provided source code for these to IBM, Blackdown and other licensees, but it may be a while before you see these APIs on Linux.
Java Development Tools for Linux
Conclusion
As Linux JVMs from Sun, Blackdown, IBM and others become more stable, complete and competitive, Linux developers will be able to contribute their considerable expertise to the widespread deployment of Java technologies. URL Resources
Reader Feedback: Page 1 of 1
Latest Cloud Developer Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week
Breaking Cloud Computing News
|
|||||||||||||||||||||||||||||||||||||||||||||||||