Saturday, May 25, 2002 05:23 PM
I'm not sure which distribution you have (i.e. RedHat Linux 7.0), or what exactly you mean by "bad command," so here are a couple of guesses.
If when you execute java or javac you get a response like
bash: java: command not found, try typing in the full pathname to the binary (i.e.
/usr/local/jdk1.2.2/bin/java). If that works, then you'll need to set your
PATH environment variable. Instructions for doing so can be found in the Linux FAQ question "After installing a JDK on Linux, how do you set the PATH and CLASSPATH to run Java programs?"
javac results in a segmentation fault, the problem is most likely due to the glibc libraries on your system. J2SDK 1.2.2 expects a "relatively old" version of the libraries (2.1 - see Linux Installation Notes), and most 7.0 distros contain versions that are new enough (and different enough) that you'll get a segmentation fault every time you try to execute the virtual machine.
J2SDK 1.4 has been updated and works fine with new versions of glibc (I'm using 2.2.4 without any problems). J2SDK 1.3 Linux Installation Notes recommend glibc 2.1.2-11 or later, but specifically say not to run it on RedHat Linux 7.0 (they recommend upgrading to 7.1). That warning was left out of the J2SDK 1.4 Linux Installation Notes, but they say that RedHat Linux 6.2 and 7.1 are the officially supported platforms.
If company policy or something prevents you from using newer versions of the Java 2 platform, you'll either have to downgrade your Linux workstation or look for other implementations (i.e. maybe Blackdown's or Kaffe's will work for you). While you're looking for one that works, maybe you could send Sun an e-mail telling them how much easier things would be if they made Java truly Open Source. :)