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.
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- RSS Feeds
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Home, My Backup Data Center
- A Topic for Discussion - Open Source Feature-Richness?
- Dart: a New Web Programming Experience
- Developer Poll
- What's the tweeting protocol?
- May 2013 Issue of Linux Journal: Raspberry Pi
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




8 min 40 sec ago
43 min 33 sec ago
1 hour 6 min ago
5 hours 54 min ago
6 hours 41 min ago
8 hours 15 min ago
9 hours 51 min ago
11 hours 49 min ago
12 hours 6 min ago
12 hours 36 min ago