tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaroslav Fikker <>
Subject Re: Tomcat Unix daemon (jsvc) - problem with compilation
Date Sun, 26 May 2013 14:39:16 GMT

To Chris: Thank you very much for your comments.

Is there anyone who knows why Tomcat 7.0.25 (commons-daemon-1.0.8-native-src) started to use
jni_md.h which is not part of IBM Java? I didn't encounter any problem with compilation of
Tomcat Unix daemon (jsvc) until version Tomcat 7.0.23 (commons-daemon-1.0.7-native-src). Is
it bug or intention? Thank you very much for your help.

Best regards,

J. Fikker.


As for the configure script, it seems like it is a bug to look for
jni_md.h, as it's not an official part of JNI.

configure seems to go through great pains to determine the value of
JAVA_OS (which is the platform-specific subdirectory for header files)
and then completely ignores the value of JAVA_OS. Honestly, I think it
should probably be removed, but I'd like to hear a comment from
someone more well-versed in jsvc.

If you are having a problem with actually running jscv, please start a
new thread with a new subject for a separate question.

- -chris


Hello everybody.

 I encountered a problem with compilation of Unix daemon (jsvc) against IBM Java from Tomcat
7.0.40. I used these commands:

 cd /opt/tomcat/bin
 tar xvfz commons-daemon-native.tar.gz
 cd commons-daemon-1.0.x-native-src/unix

 and I got this output:
 *** Current host ***
 checking build system type... x86_64-unknown-linux-gnu
 checking host system type... x86_64-unknown-linux-gnu
 checking cached host system type... ok
 *** C-Language compilation tools ***
 checking for gcc... gcc
 checking for C compiler default output file name... a.out
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables...
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ANSI C... none needed
 checking for ranlib... ranlib
 checking for strip... strip
 *** Host support ***
 checking C flags dependant on host system type... ok
 *** Java compilation tools ***
 checking for JDK os include directory... Cannot find jni_md.h in /usr/lib/jvm/java-1.6.0-ibm.x86_64/
 configure: error: You should retry --with-os-type=SUBDIR

 I found information that the reason is: IBM java uses $JAVA_HOME/include/jniport.h instead
of $JAVA_HOME/include/jni_md.h in Oracle java. When I created a link jni_md.h to jniport.h
I can successfully compile jsvc but when I try to start Tomcat server I have a problem with
class loading (Java class not found).

 Is there some fix or recommendation for compilation Tomcat Unix daemon with IBM Java? Thank
you very much for your help.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message