Configure Java environment on Linux
来源:互联网 发布:php防止重复加分 编辑:程序博客网 时间:2024/04/27 03:43
Configure Java environment on Linux
After installing Java Development Kit or Java Runtime Environment on Linux/Unix, you may still need to do some configuration to get Java ready for running or compiling Java programs. The following instruction will guide you through the process of setting up JDK for software development. JRE can be configured similarly.
JDK is usually installed into /usr/java directory. Create a symbolic link to the installation directory. That way makes it easier to switch between different Java versions that you may have just by redirecting the link to the appropriate target directory.
# ln -s /usr/java/jdk1.5.0 /usr/java/j2se
Create a java.sh file in /etc/profile.d directory with content as follows:
#!/bin/bash JAVA_HOME=/usr/java/j2seJAVA_FONTS=/usr/share/fonts/truetypeANT_HOME=/usr/share/ant PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH export PATH JAVA_HOME JAVA_FONTS ANT_HOMEexport CLASSPATH=.
The file contains various shell commands which set and export necessary environment variables for Java. It assumes Apache Ant and Unicode TrueType fonts have been installed in appropriate directories. Ant is a tool widely used in building and executing Java applications. Shell settings from configuration files in the /etc/profile.d directory are gathered by /ect/profile during login, setting up user environment information for every user.
Assign execute permissions:
# chmod 755 java.sh
You can verify the availability of Java to users after login by:
# java -version
References & Resources
Install and configure Unicode TrueType fonts in Linux
Configure Java environment on Windows
- Configure Java environment on Linux
- linux java environment variable configure
- Review--Configure the environment on X86
- Review--Configure the environment on Sparc
- Configure Java environment variable in debian 5.0
- configure ssh on solaris/linux
- Configure SSH service on Linux
- Configure eclipse PyDev on Linux
- Configure the environment variable
- NodeJS dev environment configure
- How to configure rsh on redhat Linux
- Install and configure Jboss 7 on Linux
- How to configure NFS on Linux
- Java Environment Building in Linux
- Development tools for C++ on Linux development environment
- Configure L2TP Server on Linux(Support MPPC/MPPE)
- How to Configure, Install and Use libnefilter_queue on Linux
- How to Configure, Install and Use libnefilter_queue on Linux
- 使用 ActionScript 3 创建 Btutton 设置按钮图标
- C++ C字符串与time_c和time_c与C字符串之间的转换
- 什么是weblogic?
- flex 4.0 滤镜效果.
- MySQL对表的复制,修改及删除
- Configure Java environment on Linux
- pdf下载
- VoIP技术(5)--VoIP语音质量MOS-PESQ-PSQM
- Linux Kernel代码分段分析尝试
- linux公社
- C#打印原理
- TJU 3474
- 控件树
- Fedora 13在Virtual PC 2007上桌面的配置