The Java Developer's Kit
Java has taken the Internet and programming communities by storm during the past year with its promise to enable the creation of software that can run on any platform from a single binary file and be used securely in a distributed network environment.
The Java concept is simple: a single source code file is compiled to a single pseudo-binary file containing Java byte codes. This binary file can be run on any platform for which a Java interpreter or other runtime engine exists.
In order to develop and test these Java applications, it is necessary to have access to several critical development tools, including a compiler, a debugger and a Java interpreter for testing applications. Numerous Java development environments already exist—primarily for MS-Windows systems. These full professional development tools are produced by the likes of Borland and Symantec. For Linux, and Unix in general, this type of commercial development tool hasn't become available.
Nonetheless, this doesn't mean that Linux users are unable to develop Java applets and applications. Sun Microsystems has developed a free Java Developer's Kit (JDK) which includes a compiler, a debugger, a runtime environment and an applet viewer for testing Java applets embedded in web pages.
The Java Developer's Kit was originally developed by Sun for SPARC, Solaris and Windows NT/95. These versions of the kit, along with more recent versions for x86 Solaris and MacOS, are available from the JavaSoft web site at http://www.javasoft.com/
Sun has also allowed other organizations to port the JDK to other platforms. The Blackdown Organization (Randy Chapman) has ported version 1.0.1 of the JDK to Linux and makes binaries available for x86 versions of Linux. The JDK distribution for Linux is available from ftp://ftp.blackdown.org/pub/Java/linux/. Blackdown also has a web page at www.blackdown.org/. On the web site you will find three files:
linux.jdk-1.0.1-try3.common.tar.gz linux.jdk-1.0.1-try3.static-motif-bin.tar.gz linux.jdk-1.0.1-try3.shared-motif-bin.tar.gz
It is necessary to download two of these three files:
linux.jdk-1.0.1-try3.common.tar.gz
plus either:
linux.jdk-1.0.1-try3.static-motif-bin.tar.gz
or:
linux.jdk-1.0.1-try3.shared-motif-bin.tar.gz
The last file requires an ELF binary of version 2.0 of the Motif libraries (libXm.so.2). If you don't have Motif, download linux.jdk-1.0.1-try3.static-motif-bin.tar.gz instead—it is a larger file but will work regardless of whether you have the Motif libraries or not. Throughout this article we will be using linux.jdk-1.0.1-try3.static-motif-bin.tar.gz.
All versions of the Java Developer's Kit also require the following libraries, many of which may already be on your system:
/lib/libc.so.5.2.16
/usr/X11/lib/libX11.so.6.0
/usr/X11/lib/libXt.so.6.0
/usr/X11/lib/libXext.so.6.0
/usr/X11/lib/libXpm.so.4.3
/lib/libdl.so.1.7.9
If you are missing any of these libraries, the JDK will not work. These libraries are all freely available on the Internet.
Once the “common” tar file and one of the Motif tars have been downloaded, they need to be uncompressed. The documentation with the Linux JDK recommends installing the JDK in the /usr/local directory (although it can be installed elsewhere). To do this, copy the two compressed tar files to /usr/local with:
cp linux.jdk-1.0.1-try3.common.tar.gz /usr/local cp linux.jdk-1.0.1-try3.static-motif-bin.taR.GZ /usr/local
Then, the files can be uncompressed and untarred with:
tar xzvf linux.jdk-1.0.1-try3.common.tar.gz linux.jdk-1.0.1-try3.static-motif-bin.tar.gz
This will create a directory java/ under /usr/local which contains four subdirectories: bin, demo, include and lib. /usr/local/java will also contain a zip file with the source and various README and HOWTO files. The bin/ directory contains the scripts used to execute all the components of the JDK. The components are:
appletviewer: A viewer to test applets embedded in HTML documents.
javac: The Java compiler: compiles Java source code to Java byte code binary files (known as class files). The class files produced by javac can be run by a Java interpreter on any platform.
java: The Java interpreter: used to execute Java class files under Linux.
jdb: The Java Debugger: a command-line debugger which is in alpha development.
Each of these scripts in java/bin actually call executable files in java/bin/i586. These scripts expect certain tools to exist in fixed locations in your system. Specifically, the appletviewer script expects mkdir to be in /usr/bin and pwd to be in /bin. On some systems, this may not be true (for instance, in RedHat-derived systems, you may find mkdir in /bin). There are two solutions to this problem. One is to edit java/bin/appletviewer and replace the incorrect occurrences of /usr/bin/mkdir or /bin/pwd with the correct full paths of these programs.
The second solution is to create symbolic links in the directories expected by appletviewer. For instance, on RedHat systems where mkdir is in /bin, a symbolic link could be created in /usr/bin with the command:
ln -s /bin/mkdir /usr/bin/mkdir
If you expect to be using the JDK components frequently, you will probably want to add the java/bin directory to your path. Assuming you installed the JDK under /usr/local and you are running the bash shell (the default shell for many Linux distributions), you could add the following lines to the .bashrc file in your home directory:
PATH=/usr/local/java/bin:$PATH export PATH
If you are running C shell, the following line at the end of your .cshrc file in your home directory will do the job:
setenv PATH /usr/local/java/bin:$PATH
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
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- New Products
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- Validate an E-Mail Address with PHP, the Right Way
- Tech Tip: Really Simple HTTP Server with Python
- Trying to Tame the Tablet
- New Products
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.




4 hours 35 min ago
4 hours 58 min ago
5 hours 8 min ago
5 hours 12 min ago
5 hours 42 min ago
8 hours 34 min ago
9 hours 9 min ago
9 hours 10 min ago
9 hours 11 min ago
9 hours 12 min ago