(back to ProgrammingTips)
Java is a popular programming language written by Sun Microsystems. It's an object-oriented language that runs inside a "virtual machine" which, at least in theory, allows code to run on many different machines. Sun calls this "Write once, run anywhere", and in practice it actually works reasonably well, although it took years for this to happen.
Java is extremely popular in commercial software development - it's dominant in the area that I work in: operations support software for communications companies. It's not at all popular in the Free Software community because it's a proprietary product owned and controlled by Sun.
The Java home page is
http://java.sun.com/; you can download a developer kit or run-time from there. Java per se is a proprietary product, but there are many free projects that aim to provide all (or part) of the Java environment as Free Software.
http://www.dwheeler.com/java-imp.html lists many of those projects.
See also:
JavaProgrammingBookmarks
Books
Bruce Eckels
Thinking in Java
Nutshell
Development Tools
building:
ant - "like make only without make's wrinkles"
modelling:
argouml - a UML modelling tool that can generate Java skeletons.
debugging: jswat
database access: isql, squirrelsql
Infrastructure
tomcat - servlet engine, jboss - j2ee container, openejb - ejb container, avalon - server framework, maverick - presentation framework
Libraries
trace logging: log4j
Misc
Here's a cute hack to enable token substitution in java property files:
http://www.sys-con.com/java/source.cfm?id=1228
Using Java on Debian GNU/Linux
When I tried to run Sun's JDK 1.3.1 on Debian Sid (in March 2002) I got the following error:
/home/tcabot/local/Linux/jdk/bin/i386/native_threads/java: error while loading shared libraries: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory
. This can be solved by linking to the existing libstdc++, i.e.
ln -s /usr/lib/libstdc++-libc6.2-2.so.3 /usr/lib/libstdc++-libc6.1-1.so.2
.
Java is a proprietary language (controlled by Sun) but there are a few Free implementations of the compiler, JVM, and class libraries. If you're running a new version of Debian you can apt-get
gcj
and
kaffe
.
$ gcj -C HelloWorldApp.java
$ kaffe -addclasspath . HelloWorldApp
Java is very resource-intensive: cpu, memory, and processes. So you might bump into the limits that Unix uses to limit individual user resource consumption. An important one is
max user processes
which you can see if you run
ulimit -a
. You probably want to bump this up to 1020 or so:
ulimit -u 1020
. Other limits that you might bump into are
SHMMAX
and
SHMANY
which you can set using files in
/proc/sys/kernel/
or by setting values in
/etc/sysctl.conf
.
--
TobyCabot - 28 Dec 2001-31 May 2002