LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-06-2017, 01:45 PM   #1
jazzo
Member
 
Registered: Jul 2012
Posts: 277

Rep: Reputation: Disabled
can't install STS 3.8.4 on Ubuntu 12.04


I run into an interesting problem. I have a machine with Ubuntu 12.04 STS and I wanted to install STS 3.8.4. I have the jdk 8 installed but when I try to run STS I get this message "Version 1.6.0_41 of the JVM is not suitable for this product. Version: 1.8 or greater is required." SO, I've had a look on SO and a few forums, I discovered this command sudo update-alternatives --config java but I only get these results:
Code:
linux-Dell-System-XPS-L702X:~/opt$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      auto mode
* 1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1051      manual mode

Press enter to keep the current choice[*], or type selection number: 2
still no jdk 8, which, as I said, is installed on my machine because I use it with eclipse. Now, is there a way to manually set it in some kind of STS configuration file as far as you know or any other way that I seem to fail to identify?
 
Old 04-06-2017, 02:14 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
You will have to make a java8 entry to /etc/alternatives/ , like this example

Code:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/1.8.0_121-b13/bin/java 4
Please replace with actual path, and actual version.

When done, you can run the config command again :
sudo update-alternatives --config java


-

Last edited by knudfl; 04-06-2017 at 02:17 PM.
 
Old 04-06-2017, 03:11 PM   #3
jazzo
Member
 
Registered: Jul 2012
Posts: 277

Original Poster
Rep: Reputation: Disabled
ah OK, I see, thanks. This is what I got as output:
Code:
antobbo@antobbo-linux-Dell-System-XPS-L702X:~/opt/eclipse$ sudo update-alternatives --install /home/antobbo/java java /home/antobbo/java/jdk1.8.0_101/bin/java 4
[sudo] password for antobbo: 
update-alternatives: renaming java link from /usr/bin/java to /home/antobbo/java.
update-alternatives: warning: forcing reinstallation of alternative /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java because link group java is broken.
update-alternatives: warning: not replacing /home/antobbo/java with a link.
antobbo@antobbo-linux-Dell-System-XPS-L702X:~/opt/eclipse$ sudo update-alternatives --config java
There are 3 choices for the alternative java (providing /home/antobbo/java).
  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      auto mode
  1            /home/antobbo/java/jdk1.8.0_101/bin/java         4         manual mode
  2            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
* 3            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1051      manual mode

Press enter to keep the current choice[*], or type selection number: 1 
update-alternatives: using /home/antobbo/java/jdk1.8.0_101/bin/java to provide /home/antobbo/java (java) in manual mode.
update-alternatives: warning: not replacing /home/antobbo/java with a link.
antobbo@antobbo-linux-Dell-System-XPS-L702X:~/opt/eclipse$
Is that OK that my jdk sits inside the home directory?
Code:
Now if I try to run STS I get another error:
A Java Runtime Environment (JRE) or Java Development Kit (JDK)
must be available in order to run STS. No Java virtual machine
was found after searching the following locations:
/home/antobbo/Documents/sts-bundle/sts-3.8.4.RELEASE/jre/bin/java
java in your current PATH
Do I have to set the java version even inside the PATH variable? I thought that was a windows thing...and I've definitely downloaded STS for linux
 
Old 04-06-2017, 04:39 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Suggest : Install the latest java8 (runtime) to /usr/lib/jvm/.

Download jre-8u121-linux-x64.tar.gz ( If Ubuntu 12.04 - amd64 ) from
http://www.oracle.com/technetwork/ja...s-2133155.html

Code:
cd /usr/lib/jvm/
sudo tar xvf /home/antobbo/Downloads/jre-8u121-linux-x64.tar.gz

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.8.0_121/bin/java 5
After sudo update-alternatives --config java :
java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)


-

Last edited by knudfl; 04-06-2017 at 04:50 PM.
 
Old 04-07-2017, 05:02 PM   #5
jazzo
Member
 
Registered: Jul 2012
Posts: 277

Original Poster
Rep: Reputation: Disabled
cool, thanks it seems to work now
 
  


Reply

Tags
java



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Install Ubuntu 12.10 or Upgrade to Ubuntu 12.10 (Quantal Quetzal) from Ubuntu allu john sudhakar Linux - Newbie 1 10-25-2012 11:59 PM
Trisquel 5.0 STS Dagda theme in VirtualBox goes odd about 10 seconds after login... linustalman Linux - Virtualization and Cloud 0 03-20-2012 08:41 AM
mistake when install ubuntu (accidentally install ubuntu on the same partitions as VS ThomasC Ubuntu 7 08-11-2009 03:26 PM
Ubuntu as frugal install, iso install, img install? impossible? nooby Ubuntu 15 08-22-2008 05:49 AM
Driver for STS graphic card? akihandyman Mandriva 0 09-24-2004 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration