As of this writing Java is not a fully developed commercial product. Versions of Java at varying stages of completion are available from Sun for Windows 95 and Windows NT for X86, Solaris 2.3 to 2.5, and MacOS 7.5. At the present time there are no versions of Java available for MIPS, Alpha or PowerPC based NT, Windows 3.1, or the Amiga.
Borland is also working a Java development environment to be released in the first half of 1996. Various third-party efforts are under way to port Java to other platforms including the Amiga, Windows 3.1, OS/2 and others.
The basic Java environment consists of a web browser that can play Java applets, a Java compiler to turn to Java source code into byte code, and a Java interpreter to run Java programs. These are the three key components of a Java environment. You'll also need a text editor like Brief or BBEdit. Other tools like a debugger, a visual development environment, documentation and a class browser are also nice but aren't absolutely necessary.
Note that it isn't necessary to get all three of these from the same source. For instance Netscape is committed to providing a Java-enabled web browser. However it will only provide a Java compiler with the next version of its server products.
Sun has made the Java Developers Kit available for its supported platforms. It includes an applet viewer that will let you view and test your applets. The JDK also includes the javac compiler, the java interpreter, the javaprof profiler, the javah header file generator (for integrating C into your Java code), the Java debugger and limited documentation. However most of the documentation for the API and the class library is on Sun's web site.
You can ftp the programs from the following sites:
- USA
- Germany: ftp://sunsite.informatik.rwth-aachen.de/pub/mirror/java.sun.com/JDK-beta-win32-x86.exe
- Korea: ftp://ftp.kaist.ac.kr/pub/java/e
- China: ftp://math01.math.ac.cn/pub/sunsite
- Japan: ftp://ftp.glocom.ac.jp/mirror/java.sun.com/
- Sweden: ftp://ftp.luth.se/pub/infosystems/www/hotjava/pub/
- Singapore: ftp://ftp.iss.nus.sg/pub/java/
- United Kingdom: ftp://sunsite.doc.ic.ac.uk/packages/java/
Macintosh Installation Instructions
The file you get will be a self-extracting archive called something like JDK-1_0_2-MacOS.sea.bin. If you use Fetch or Anarchie to download it will be automatically converted into the self-extracting JDK-1_0_2-MacOS.sea. Double-click it to extract it and the double-click the resulting installer JDK-1_0_2-MacOS. It will prompt you for a location to put it on your hard disk. Put it wherever is convenient.It may be helpful to make aliases of the Applet Viewer, the Java Compiler and the Java Runner and put them on your desktop for ease of dragging and dropping later, especially if you have a large monitor.
Windows Installation Instructions
The Windows X86 release is a self extracting archive. You will need about six megabytes of free disk space to install the JDK. Execute the file by double-clicking on it in the File Manager or by selecting Run... from the Program Manager's File menu and typing the path to the file. This will unpack the archive. The full path is unimportant, but for simplicity's sake I am going to assume you installed it from the root of your C: drive. If this is the case the files will live in C:\java. If you unpacked it somewhere else just replace C:\ by the full path to the java directory in what follows.You will need to add C:\java\bin directory to your PATH environment variable
In addition to the java files, the archive includes two common DLL's:
- MSVCRT20.DLL
- MFC30.DLL
Unix Installation Instructions
If you're on a shared system at a university or an Internet service provider, there's a good chance Java is already installed. Ask your local support staff how to access it. Otherwise follow these instructions.The Unix release is a compressed tar file. You will need about nine megabytes of disk space to uncompress and untar the JDK. Double that would be very helpful. You do this with the commands:
% uncompress JDK-1_0_2-solaris2-sparc.tar.Z % tar xvf JDK-1_0_2-solaris2-sparc.tarThe exact file name may be a little different if you�re retrieving the release for a different platform such as Irix or if the version is different. You can untar it in your home directory, or, if you have root privileges, in some convenient place like /usr/local where all users can have access to the files. However root privileges are not necessary to install or run Java. Untarring the file creates all necessary directories and sub-directories. The exact path is unimportant, but for simplicity's sake this book assumes it�s installed it in /usr/local. If a sysop already installed it, this is probably where it lives. (Under Solaris it's also possible the sysop put it into /opt.) If this is the case the files live in /usr/local/java. If you unpacked it somewhere else, just replace /usr/local by the full path to the java directory in what follows. If you installed it in your home directory, you can use ~/java and ~/hotjava instead of a full path.
You now need to add /usr/local/java/bin directory to your PATH environment variable. You use one of the following commands depending on your shell.
csh, tcsh:You should also add these lines to the end of your .profile and .cshrc files so you won't have to do this every time you login. Now you're ready to run some applets.% set path=($PATH /usr/local/java/bin)sh:% PATH=($PATH /usr/local/java/bin); export $PATH
0 comments:
Post a Comment