Beginner's Guide to JDK
Although several ongoing projects have the goal of porting Sun's Java Development Kit (JDK) to Linux, for the purpose of this article I will look at the largest and most stable effort. It is hosted by the Blackdown Organization, with much of the effort coming from Randall Chapman (for JDK 1.0) and Steve Byrne (for JDK 1.1). At the time of this writing (August 1998), JDK 1.1.6 version 3 was in beta testing. This version will be publicly released by the time this magazine is printed. See the Blackdown's web page at http://www.blackdown.org/java-linux.html for up-to-date information on the JDK port for Linux.
Note that I use the Caldera Open Linux 1.2 Standard distribution of Linux, so I will discuss the JDK installation with respect to that distribution. The JDK 1.1.6 port to Linux is quite stable on Caldera Open Linux 1.1 and 1.2 out-of-the-box installations. It will also work with many other distributions of Linux.
The Blackdown Java Linux porting effort still needs volunteers. Please feel free to contact them. In fact, I received an e-mail message from Steve Byrne stating that the source code is not hard to understand and many areas besides debugging need volunteers. He also said many areas of specialization exist in the source code, so if you are good at one thing but not another, please don't let that stop you from volunteering.
I will review the high points of three different JDK files, drawing on personal experience. The main source of information is the Java Linux FAQ at the Blackdown site. The first file is http://www.blackdown.org/java-linux/docs/faq/FAQ-java-linux.html. The two other files are the README that comes with Sun's JDK and the README.linux that comes with the Linux port of the JDK. These two files are found in the jdk1.1.6 directory after installing the JDK. There is also a link to README.linux from the Java-Linux FAQ.
Two types of Java programs exist: applications and applets. Applets are simply small Java programs that run within the context of a web browser. Applications are stand-alone programs.
Both applications and applets start as Java source code files. When a Java program is compiled, the source code is turned into Java byte code. In general, a byte-code file is generated for each “class” declared in your source-code file. These byte-code files have the extension “.class”.
The byte code is then interpreted by the Java Virtual Machine (JVM). Unless you have a machine that implements Java byte code in hardware, the JVM is a program run by the operating system you are using. This is the case under Linux.
As I stated before, the difference between applications and applets is revealed by the way each is started. An application is started from the command line. It is a stand-alone program. In contrast, an applet is started by a web browser.
When an application is written, a method called main is defined. Execution of the application starts in main. To start an application at the command line, type java SomeApplication. Please note that you do not type in the .class extension.
An applet has a method called init. In addition to the applet byte code, an HTML file exists which contains an <APPLET ...> </APPLET> tag pair defining the location of the byte code and other useful information. When the applet is started from within a web browser, init is called to start the applet. An applet can be started from the command line with a program called appletviewer. This program, distributed with the JDK, takes the name of an HTML file, finds all applet tags and runs those applets.
Both main and init can be implemented in a single Java program. The resulting program can therefore be started by either java SomeApplication or with a web browser.
As I mentioned above, the Blackdown Organization is the repository for the largest Java Linux effort. This site contains distribution locations, e-mail lists and known problems with the current JDK for Linux. Currently, the latest release of the Java Development Kit for Linux is JDK 1.1.6 version 3.
JDK comes in two flavors: one for libc and one for glibc. For an explanation of the differences, see the Java-Linux FAQ. According to the README.linux file that comes with the JDK, a good way to determine which version you need is by looking at the libraries installed on your system. This can be done with the following command:
ls -l /lib/libc.so.*
If the files are libc5, you should download the libc version. If they are libc6, then you should download the glibc version.
To download the JDK distribution, point your web browser to http://www.blackdown.org/java-linux/mirrors.cgi. This page lists sites that distribute the JDK. You can obtain the Linux JDK port only from a mirror of Blackdown.
Take a look at the mirrors, and choose a download site near you. Since Caldera uses libc5, I followed the links to JDK-1.1.6/i386/libc/v3/. Download the file jdk1.1.6-v3-libc.tar.gz. You can also download other files from this directory.
Choose a directory to unpack the distribution using the tar command. I chose /usr/local/. If you choose a different directory, use that directory in place of /usr/local/ wherever it appears in the rest of this article. Once you've picked a directory, go to it using cd, then type:
tar xzf jdk.1.1.6-v3-libc.tar.gz
The installation of JDK is complete. You should now visit JavaSoft to download documentation. Please see http://www.javasoft.com/docs/index.html for download and installation instructions.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Speed Up Your Web Site with Varnish | Jun 19, 2013 |
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
- Speed Up Your Web Site with Varnish
- Containers—Not Virtual Machines—Are the Future Cloud
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- RSS Feeds
- Senior Perl Developer
- Technical Support Rep
- Non-Linux FOSS: libnotify, OS X Style
- UX Designer
- Web & UI Developer (JavaScript & j Query)
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




25 min 38 sec ago
47 min 49 sec ago
1 hour 10 min ago
1 hour 14 min ago
4 hours 25 sec ago
4 hours 17 min ago
5 hours 33 min ago
6 hours 22 min ago
6 hours 25 min ago
6 hours 34 min ago