Friday, May 3, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 111972  / 2 Years ago, sun, june 12, 2022, 3:55:29

I followed the instruction to set up Java on Ubuntu 11.10 from How do I install Java?.


I ran this command to install:


sudo apt-get install openjdk-6-jdk

After it succeeded and I typed java, I got this error:


The program 'java' can be found in the following packages:
* gcj-4.4-jre-headless
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
* gcj-4.5-jre-headless
* openjdk-7-jre-headless

More From » software-installation

 Answers
1

Solved this by manually setting java path with /etc/profile.



Add following lines to there.



JAVA_HOME=/usr/lib/jvm/java-6-openjdk
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

[#40009] Sunday, June 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
poous

Total Points: 81
Total Questions: 101
Total Answers: 119

Location: Cambodia
Member since Sat, Oct 3, 2020
4 Years ago
;