开元周游
德国频道
查看: 2263|回复: 1
打印 上一主题 下一主题

linux下的java环境

[复制链接]
1#
发表于 20.3.2003 02:32:56 | 只看该作者
1.jdk的下载和安装:<br><br><br><span style='color:red'>Installation of Self-Extracting Binary<br><br><a href='http://java.sun.com/webapps/download/Redirect/32283496/5847479377282807053505607246086069333228071972022813600060132859339008063305596058473206-3865/j2sdk-1_4_1_02-linux-i586.bin' target='_blank'>http://java.sun.com/webapps/download/Redirect/32283496/5847479377282807053505607246086069333228071972022813600060132859339008063305596058473206-3865/j2sdk-1_4_1_02-linux-i586.bin</a></span><br><br><br>Use these instructions if you want to use the self-extracting binary file to install the Java 2 SDK. If you want to install RPM packages instead, see Installation of RPM File. <br><br>1. Check the download file size. <br><br>Before you download a file, notice that its byte size is provided on the download page on the web site. Once the download has completed, check that you have downloaded the full, uncorrupted software file. <br><br>2. Copy j2sdk-1_4_1_&lt;version number&gt;-linux-i586.bin to the directory into which you want to install the Java 2 SDK. <br><br><br>3. Run j2sdk-1_4_1_&lt;version number&gt;-linux-i586.bin <br><br>Launch the executable file you downloaded, j2sdk-1_4_1_&lt;version number&gt;-linux-i586.bin, by using the following commands from the directory in which it is located: <br><br>chmod a+x j2sdk-1_4_1_&lt;version number&gt;-linux-i586.bin<br><br>./j2sdk-1_4_1_&lt;version number&gt;-linux-i586.bin<br><br>The script displays a binary license agreement, which you are asked to agree to before installation can proceed. Once you have agreed to the license, the install script installs the Java 2 SDK in a directory named j2sdk1.4.1_&lt;version number&gt; in the current directory. <br>Note about System Preferences - By default, the installation script configures the system such that the backing store for system preferences is created inside the Java 2 SDK&#39;s installation directory. If the SDK is installed on a network-mounted drive, it and the system preferences can be exported for sharing with Java runtime environments on other machines. As an alternative, root users can use the -localinstall option when running the installation script, as in this example: <br><br>j2sdk-1_4_1_&lt;version number&gt;-linux-i586.bin -localinstall<br><br>This option causes the system preferences to be stored in the /etc directory from which they can be shared only by VMs running on the local machine. You must be root user for the -localinstall option to work. <br>See the Preferences API documentation for more information about preferences in the Java platform. <br><br>Note about Root Access - Unbundling the software automatically creates a directory called j2sdk1.4.1_&lt;version number&gt;. Note that if you choose to install the Java 2 SDK into system-wide location such as /usr/local, you must first become root to gain the necessary permissions. If you do not have root access, simply install the Java 2 SDK into your home directory, or a subdirectory that you have permission to write to. <br><br>Note about Overwriting Files - If you unpack the software in a directory that contains a subdirectory named j2sdk1.4.1_&lt;version number&gt;, the new software overwrites files of the same name in that j2sdk1.4.1_&lt;version number&gt; directory. Please be careful to rename the old directory if it contains files you would like to keep. <br><br><br>--------------------------------------------------------------------------------<br><br><span style='color:red'>Installation of RPM File<br><br><a href='http://java.sun.com/webapps/download/Redirect/32283354/5847479377282807053505607246086069333228071972022813600060132859339008063305596058473206-3865/j2sdk-1_4_1_02-linux-i586-rpm.bin' target='_blank'>http://java.sun.com/webapps/download/Redirect/32283354/5847479377282807053505607246086069333228071972022813600060132859339008063305596058473206-3865/j2sdk-1_4_1_02-linux-i586-rpm.bin</a></span><br><br><br>Use these instructions if you want to install Java 2 SDK in the form of RPM packages. If you want to use the self-extracting binary file instead, see Self-Extracting Binary. <br>1. Check the download file size. <br><br>Before you download a file, notice that its byte size is provided on the download page on the web site. Once the download has completed, check that you have downloaded the full, uncorrupted software file. <br><br>2. Run j2sdk-1_4_1_&lt;version number&gt;-linux-i586-rpm.bin and agree to the license it displays. <br><br>Launch the executable file you downloaded, j2sdk-1_4_1_&lt;version number&gt;-linux-i586-rpm.bin, by using the following commands from the directory in which it is located: <br><br><br>chmod a+x j2sdk-1_4_1_&lt;version number&gt;-linux-i586-rpm.bin<br><br>./j2sdk-1_4_1_&lt;version number&gt;-linux-i586-rpm.bin<br><br>The script displays a binary license agreement, which you are asked to agree to before installation can proceed. Once you have agreed to the license, the install script creates the file j2sdk-1_4_1_&lt;version number&gt;-linux-i586.rpm in the current directory. <br>3. Become root by running the su command and entering the super-user password. <br><br>4. Run the rpm command to install the packages that comprise the Java 2 SDK: <br><br>rpm -iv j2sdk-1_4_1_&lt;version number&gt;-linux-i586.rpm<br><br>5. Exit the root shell. <br><br><br><br><br>
2#
 楼主| 发表于 20.3.2003 02:36:23 | 只看该作者
安装完成之后,你还不能在任意的目录下面调用javac,java,javadoc以及jdb等等,<br><br>所以必须为他们设置全局link,才能随意调用。<br><br>1. root login<br><br>2. cd /usr/java/j2sdk1.4.1_20/bin<br><br>3. link javac /bin/javac<br><br>4. link java /bin/java<br><br>5. link javadoc /bin/javadoc<br><br>6. link jdb /bin/jdb<br><br>7. logout<br><br>
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

站点信息

站点统计| 举报| Archiver| 手机版| 小黑屋

Powered by Discuz! X3.2 © 2001-2014 Comsenz Inc.

GMT+1, 16.11.2024 04:24

关于我们|Apps

() 开元网

快速回复 返回顶部 返回列表