Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34126

Re: Java 1.8 and CentOS

From Duncan Idaho <duncan@dunenoemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Java 1.8 and CentOS
Date 2016-04-13 17:33 +0100
Organization A noiseless patient Spider
Message-ID <nels68$7up$1@dont-email.me> (permalink)
References <neljen$psq$1@dont-email.me> <dn745sFpbh0U1@mid.individual.net>

Show all headers | View raw


On 13/04/16 15:42, Nigel Wade wrote:
> On 13/04/16 15:04, Duncan Idaho wrote:
>
>>
>> JAVA_HOME=/opt/jdk1.8.0_77
>>
>> invoking the script on Ubuntu starts the server
>>
>> invoking the script on CentOS results in the following error message
>>
>> Cannot find any VM in Java Home /opt/jdk1.8.0_77
>> Cannot locate JVM library file
>
> What is actually in /opt/jdk1.8.0_77 on the CentOS system?

[root@vps lyallex]# ls -l /opt/jdk1.8.0_77/
total 25916
drwxr-xr-x. 2 tomcat tomcat     4096 Mar 21 05:09 bin
-r--r--r--. 1 tomcat tomcat     3244 Mar 21 05:09 COPYRIGHT
drwxr-xr-x. 4 tomcat tomcat     4096 Mar 21 05:09 db
drwxr-xr-x. 3 tomcat tomcat     4096 Mar 21 05:09 include
-rwxr-xr-x. 1 tomcat tomcat  5103536 Dec 22 20:48 javafx-src.zip
drwxr-xr-x. 5 tomcat tomcat     4096 Mar 21 05:09 jre
drwxr-xr-x. 5 tomcat tomcat     4096 Mar 21 05:09 lib
-r--r--r--. 1 tomcat tomcat       40 Mar 21 05:09 LICENSE
drwxr-xr-x. 4 tomcat tomcat       44 Mar 21 05:09 man
-r--r--r--. 1 tomcat tomcat      159 Mar 21 05:09 README.html
-rw-r--r--. 1 tomcat tomcat      525 Mar 21 05:09 release
-rw-r--r--. 1 tomcat tomcat 21102856 Mar 21 05:09 src.zip
-rwxr-xr-x. 1 tomcat tomcat   110114 Dec 22 20:48 
THIRDPARTYLICENSEREADME-JAVAFX.txt
-r--r--r--. 1 tomcat tomcat   177094 Mar 21 05:09 
THIRDPARTYLICENSEREADME.txt

>>
>> [root@vps logs]# java -version
>> java version "1.8.0_77"
>> Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
>> Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
>>
>> [root@vps logs]# echo $PATH
>> /usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/lyallex/.local/bin:/home/lyallex/bin:/opt/jdk1.8.0_77/bin
>>
>>
>> So the vm is there on the path.
>>
>
> But not necessarily in /opt/jdk1.8.0_77/bin.

Er ... where is it then?

[root@vps lyallex]# ls -l /opt/jdk1.8.0_77/bin
total 772
...
-rwxr-xr-x. 1 tomcat tomcat   7734 Mar 21 05:09 java
-rwxr-xr-x. 1 tomcat tomcat   7941 Mar 21 05:09 javac
...

[root@vps lyallex]# ls -l /opt/jdk1.8.0_77/jre/bin
total 440
...
-rwxr-xr-x. 1 tomcat tomcat   7734 Mar 21 05:09 java
...

/opt/jdk1.8.0_77/bin is on
> the PATH, but not necessarily being used to locate java.
>
> Try:
> $ which java
> and follow the links to the actual executable.

[root@vps lyallex]# which java
/usr/bin/java

/usr/bin/java -> /etc/alternatives/java -> /opt/jdk1.8.0_77/bin/java

Obviously something is not configured correctly, I have set JAVA_HOME in 
my login account (root login is disabled)

JAVA_HOME=/opt/jdk1.8.0_77 which propagates to root when I su

[root@vps lyallex]# echo $JAVA_HOME
/opt/jdk1.8.0_77

Something isn't configured correctly but I have no idea what.
It's driving me nuts :-(

lyallex


-- 
Duncan Idaho

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Java 1.8 and CentOS Duncan Idaho <duncan@dunenoemail.com> - 2016-04-13 15:04 +0100
  Re: Java 1.8 and CentOS Nigel Wade <nmw@ion.le.ac.uk> - 2016-04-13 15:42 +0100
    Re: Java 1.8 and CentOS Duncan Idaho <duncan@dunenoemail.com> - 2016-04-13 17:33 +0100
  Re: Java 1.8 and CentOS Andreas Leitgeb <avl@logic.at> - 2016-04-13 17:29 +0000
    Re: Java 1.8 and CentOS Andreas Leitgeb <avl@logic.at> - 2016-04-13 18:14 +0000
      Re: Java 1.8 and CentOS Duncan Idaho <duncan@dunenoemail.com> - 2016-04-14 05:18 +0100
        Re: Java 1.8 and CentOS Andreas Leitgeb <avl@logic.at> - 2016-04-14 10:44 +0000
  Re: Java 1.8 and CentOS Roedy Green <inquiry@mindprod.com> - 2016-07-17 11:56 -0700

csiph-web