|
|
Frequently Asked Questions and Answers about Java on the UM Research Server
- What is willow's IP address?
130.74.110.16
- How can I apply for an
account on willow?
Visit the UM IT Helpdesk in Weir Hall.
- What versions of Java
are installed, and where are they located on willow?
- The Java 2 Software Development Kit (1.5.0)
and runtime environment (in /usr/jdk/jdk1.5.0_01)
- The Java 1 Software Development Kit
(1.1.6) and runtime environment (in /usr/java1.1/).
This is the default installation--the one
pointed/linked to by /usr/java.
- The Java 2 Software Development Kit,
Standard Edition (1.3.0) and runtime environment (in
/usr/java2se/)
- The Java 2 Software Development Kit,
Enterprise Edition (1.2.1) (in
/usr/local/j2sdkee1.2.1)
-
What environment
variable settings are necessary for me to compile and run
java programs?
The short answer is: probably none, but possibly,
CLASSPATH and PATH might need to be modified. Try running
the Hello World Program in Java tutoral (see the next
question below). If you have trouble, you may need to
revisit this question.
The long answer is: You should ensure that
/usr/java/
is
in your PATH variable. (If you want to the Java 1, rather
than the Java2, environment to be your default, then you
should have
/usr/java1.1
in your path, before
/usr/java
or
/usr/j2se.)
You shouldn't have to set CLASSPATH, but if you do, it
should probably contain
./, so that classes in your
current directory can be found when you invoke the java
runtime environment. If you are compiling any code which
references any of the Enterprise Edition classes, and/or
which requires MySQL JDBC drivers, you will need to
either:
Ensure that CLASSPATH includes:
/usr/local/j2sdkee1.2.1/lib/j2ee.jar:/usr/local/j2sdkee1.2.1/lib/mm.mysql-2.0.4-bin.jar, or
Use the -classpath
argument to javac as
/usr/local/j2sdkee1.2.1/lib/j2ee.jar:/usr/local/j2sdkee1.2.1/lib/mm.mysql-2.0.4-bin.jar,
where you have previously set J2EE to /usr/local/j2sdkee1.2.1/,
so that the compiler will know where to find, not only your own source class files, but
also the J2EE class files and the JDBC/MySQL driver class files.
command-line argument, with a script to
Compile
an Enterprise Java Bean's Source Code.
- How can I get
started writing, compiling, and running java programs on
willow?>
To use the Java 2 SDK, Standard Edition: See Sun's Java
Tutorial: Your
First Cup of Java (for UNIX)
To use the Java 2 Enterprise Edition: See Sun's Java 2 Enterprise Edition
Developer's Guide
- I want to connect to a MySQL database on willow. What MySQL driver is installed on willow?
The mm.mysql type4 driver is installed. The absolute path is: /usr/local/j2sdkee1.2.1/mm.mysql-2.0.4-bin.jar. The driver was downloaded from here.
- What process was used to install
and configure Java 2 SDK on willow?
The
following describes the steps that were used to install
and configure Java 1.2 on willow, per Sun's instructions
at: Java Installation Notes
- Downloaded the
j2sdk-1_3_0_02-solsparc[1].tar.Z bundle of the
binary distribution of the Java 2 SDKStandard
Edition (1.3.0) for Solaris SPARC/x86 from
http://java.sun.com/j2se/1.3/download-solaris.html,
and saved it in the /tmp directory.
- Used zcat to extract the
contents of the bundle, as follows:
zcat "j2sdk-1_3_0_02-solsparc[1].tar.Z" | tar -xf
This resulted in the creation of four packages: SUNWj3dem,
SUNWj3dev, SUNWj3man, and SUNWj3rt, in /tmp.
- As root, installed the packages
as follows:
pkgadd -d . SUNWj3rt SUNWj3dev SUNWj3man
SUNWj3dem
This installed Java in /usr/js2e
- As root, made this distribution
the default Java for the machine, by
creating/changing /usr/java to be a symbolic link
to /usr/js2e, as follows
ln -s /usr/java /usr/js2e
per the directions in
Installation Notes
-
Downloaded the
Java Beans Activation Framework 1.0.1,
and unzipped the activation.jar file and accompanying contents into /usr/local/j2sdkee1.2.1/lib/jaf-101/
-
Downloaded the
JavaMail 1.2 API
and unzipped the imap.jar, mail.jar, mailapi.jar, pop3.jar, and smtp.jar files, as well as accompanying documentation, into the /usr/local/j2sdkee1.2.1/lib/javamail-1.2
|