Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Nigel Wade Newsgroups: comp.lang.java.programmer Subject: Re: Java 1.8 and CentOS Date: Wed, 13 Apr 2016 15:42:04 +0100 Lines: 36 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net kQF03McbNfwuhx+kReUSlgSKwlDTcIX8TkZqXvFcfeOK5VIWMQ Cancel-Lock: sha1:TSuM4U81Dpkcp/ImkSHvwYd6fog= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:34124 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 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. /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.