EduArn is your learning hub for AI, Cloud Computing, and DevOps tools and technologies. Explore detailed guides, practical examples, and real-world use cases of artificial intelligence platforms, cloud services, automation tools, CI/CD pipelines, containers, Kubernetes, infrastructure as code, and modern IT solutions. Learn how emerging technologies are transforming software development, deployment, and business operations while building your technical skills for the future.
Following are the simple steps for setting the JAVA (JDK) JAVA_HOME and PATH in Unix
Note: Considering the java have installed in /opt/jdk1.7.0_79 or you can download form http://oracle.com
A. To set the environment variables:
echo ‘export JAVA_HOME=/opt/jdk1.7.0_79′ > /etc/profile.d/jdk.sh
echo ‘export PATH=$JAVA_HOME/bin:$PATH’ >> /etc/profile.d/jdk.sh
B. What we need now to source the file we have created in above command /etc/profile.d/jdk.sh:
source /etc/profile.d/jdk.sh
C. Done for use, type as mention below in any Unix terminal:
java -version
Output:
java version "1.7.0_79"
Java (TM) SE Runtime Environment (Build 1.7.0_79-b15)
Subscribe to:
Post Comments (Atom)
Good it more helpful..for setting java home and path in Linux/Unix.
ReplyDelete