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


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

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-14 05:18 +0100
Organization A noiseless patient Spider
Message-ID <nen5gp$jas$1@dont-email.me> (permalink)
References <neljen$psq$1@dont-email.me> <slrnngt0mk.456.avl@login.logic.tuwien.ac.at> <slrnngt39g.456.avl@login.logic.tuwien.ac.at>

Show all headers | View raw


On 13/04/16 19:14, Andreas Leitgeb wrote:
> Andreas Leitgeb <avl@logic.at> wrote:
>> Duncan Idaho <duncan@dunenoemail.com> wrote:
>>> Each system has the following identical setup
>>> /opt/apache-tomcat-7.0.42
>>> /opt/jdk1.7.0_45
>>> /opt/jdk1.8.0_77
>>> /etc/rc.d/init.d/tomcat7
>>> This script starts tomcat as a unix daemon using jsvc
>> My somewhat older tomcat here doesn't yet have a "jsvc" in its bin,
> I just installed jsvc directly (sudo apt-get install jsvc # ubuntu here)
>
> and idly called:
> $ jsvc -home $JAVA_HOME java.lang.Object
> -> Nothing. Probably somewhere an error got logged about
>        java.lang.Object.main not existing, but I don't care.
> $ jsvc -home /some/existing/but/empty/dir java.lang.Object
> -> Cannot find any VM in Java Home /some/existing/but/empty/dir
>
> Running the last one with "strace" showed, that it would try
> a few locations inside the given java home to find libjvm.so .
>
> Running the exact  jsvc invocation as determined with bash -x
> (in my previous posting) with "strace" might reveal what's
> wrong on CentOS

Well this is interesting

[root@vps opt]# cd jdk1.7.0_45/
[root@vps jdk1.7.0_45]# find . -name libjvm.so
./jre/lib/i386/server/libjvm.so
./jre/lib/i386/client/libjvm.so

[root@vps opt]# cd jdk1.8.0_77/
[root@vps jdk1.8.0_77]# find . -name libjvm.so
./jre/lib/amd64/server/libjvm.so

furthermore

[root@vps bin]# ./jsvc -home /opt/jdk1.7.0_45 java.lang.Object
returns no error to stdout

[root@vps bin]# ./jsvc -home /opt/jdk1.8.0_77 java.lang.Object
Cannot find any VM in Java Home /opt/jdk1.8.0_77

hmm, err, so then
cd /opt/apache-tomcat-7.0.42/bin/commons-daemon-1.0.15-native-src/unix

# ./configure

Oh FFS, no gcc

# yum group install ..

# ./configure
# make

...
/usr/bin/ld: i386 architecture of input file `jsvc-unix.o' is 
incompatible with i386:x86-64 output
...

oh **** wrong processor architecture

go and get jdk-8u77-linux-i586.tar

unpack, change JAVA_HOME

/etc/rc.d/init.d/tomcat7 start

Oh joy, Tomcat now runs under Java 1.8

I knew someone here would have the answer.

It was a rookie mistake, wrong processor architecture, my excuse is that 
I'm tired after weeks of doing battle with a new server that uses 
systemd init as opposed to sysV init.d which is what I'm used to

Thanks Andreas

















-- 
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