You will need to perform some final configuration steps by hand. This consists primarily of making certain various environment variable are properly set. There are also various configuration problems you may have to solve to get full use out of your JDK software.
For a summary of JDK software files, see the Overview of the Java Development Kit.
bin
directory in your JDK
software installation. This makes it easier to run the
development tools.
You do want CLASSPATH to point to any "user classes"
you're using. These include any classes you've compiled with
the javac tool, so you will probably want
".
" (the current directory) in your
CLASSPATH. Some applications, such as Netscape
Navigator, rely on CLASSPATH to find their own class
libraries.
If CLASSPATH isn't set, JDK software assumes the user classes are all in the current directory.
symcjit
". On Solaris, the JIT is named
"sunwjit
".
The JDK development tools are designed to be run from the command line.
Double-clicking a tool's file icon, such as java.exe
, will
not do anything useful. On the other hand, the JDK development tools
are all 32-bit applications, and cannot run if the full Win32
environment is not active. The right way to run the JDK development
tools is from the a Command Line window running under the Windows GUI.
You can always run a tool by giving its full path name. For example,
if you've installed the JDK software in c:\jdk1.2beta4
,
the following commands will run the first Animator demo:
cd c:\jdk1.2beta4\demo\applets\animator c:\jdk1.2beta4\bin\appletviewer example1.htmlHowever, it makes more sense to add
c:\jdk1.2beta4\bin\
to PATH so you only need to enter the tool names.
There are three ways to set Windows environment variables:
set
command from the command line.
(Remember not to put a space before or after the =
.)
These settings only affect commands run from the same command line
window, and are lost when the command line window is closed.
set
command to
c:\autoexec.bat
. These settings are automatically
applied when you reboot -- but only when you reboot.
JDK software no longer includes Microsoft Winsock 2.0. It is extremely likely that your system already has Winsock 2.0. Windows NT 4.0 and Windows 98 come with Winsock 2.0. Windows 95 comes with Winsock 1.2, but most Windows 95 systems have been upgraded to Winsock 2.0 by now.
Microsoft provides a free software bundle, the Microsoft Windows Sockets 2.0 Software Development Kit, that includes Winsock 2.0. Even if you don't need to upgrade your own system, you may want to obtain this kit so you can deploy network applications on Windows 95 systems. For more information, see Deploying Java Applications.
JDK software is designed to work with the TCP/IP drivers included with Windows. Third-party drivers, such as Trumpet Winsock, are not supported. If you're using a third-party driver, and Appletviewer produces errors such as "net.socketException: errno = 10047" or "Unsupported version of Windows Socket API", you'll need to restore the native TCP/IP drivers.
After installing the JDK software, you start a tool by typing its
name into a shell window with a filename as an argument. You can
specify the path to a tool either by typing the path in front of
the tool each time, or by adding the path to the startup file.
For example, if the JDK software is installed at
/usr/local/jdk1.2beta4
to run the complier on a file myfile.java, go to a shell and execute:
/usr/local/jdk1.beta4/bin/javac myfile.javaor add
/usr/local/jdk1.2beta4/bin
to your PATH and
type:
javac myfile.java
The Java platform is a multithreading environment. Solaris native
methods that are not multithread safe (MT-safe) may not work
correctly. Native methods usually need to be compiled with the option
-D_REENTRANT
and use reentrant versions of certain Solaris
APIs. For more information, see the Multithreaded Programming
Guide, part of the Solaris Software Developer AnswerBook in
the Solaris 2.6 Software Developer Collection, Volume 1. A web
version is available on docs.sun.com.
By default, JDK software uses a platform-independent multithreading model known as "green threads." On Solaris, you can use the multithreading model build into the Solaris kernel, known as "native threads." Native threads have the following advantages:
There are two ways to specify a threading model:
native
" or "green
".
-native
or -green
option with
any JDK development tool. The option must be the first argument in
the command.
To use Solaris Native Threads, you need Solaris 2.5.1 or Solaris 2.6. Earlier versions of Solaris, including Solaris 2.5, are not supported.
To support Native Threads, Solaris 2.5.1 needs two patches which resolve thread synchronization problems. See "Solaris Patches," below
Solaris-SPARC Patch # | Solaris-x86 Patch # | Nature of Patch | Problems Without Patch
103566-08
| 104241-01
| Xserver bug fixes
| Native Threads will not work correctly
| 103640-08
| 103641-08
| Kernel bug fixes
| Native Threads will not work correctly
| 103641-13
| 104195-04
| Motif bug fixes
| AWT text peers may crash
| |
The last two digits of the patch numbers indicate the patch version; you can use the indicated patch versions or later versions of the same patches. All of the above patches are included in the Solaris 2.5.1 Recommended Patch Cluster or the Solaris 2.5.1 x86_Recommended Patch Cluster.
To determine which patches are installed, use the shell command "showrev":
% showrev -pYou can obtain patches from your warranty provider, from SunService (if you have a SunSpectrum contract) or from the SunSolve web site. To obtain the Patch Clusters from the SunSolve web site: