[kaffe] Resin 2.1.12 runs on Kaffe smoothly

jserv at linux2.cc.ntu.edu.tw jserv at linux2.cc.ntu.edu.tw
Mon Mar 8 18:15:02 PST 2004


On Mon, Mar 08, 2004 at 04:38:20PM +0100, Dalibor Topic wrote:
> > Some hints might be useful:
> >   1. configure Resin with 
> >      --enable-jni \
> >      --with-java-home=$(KAFFE_HOME) \
> >      --with-jni-include=$(KAFFE_HOME)/include 
> >   2. while compiling, you would encounter some errors, just ignores.
> 
> I've missed out on IRC on the discussion of the errors. Could you give
> us some more details?
> 
> cheers,
> dalibor topic

The errors I meant is compiling errors on Resin due to lacking the
definition JavaVMOption in <jni.h>. So that I did a fake struct JavaVMOption 
to feed Resin, and put what I changed in the patch attached.

I have not tested all functions in Resin 2.1.12, but it seems to work
very well.

Sincerely,
Jim Huang
-------------- next part --------------
--- resin-2.1.12/src/c/plugin/resin/resin.c	2003-12-10 06:58:35.000000000 +0800
+++ resin-2.1.12-kaffe/src/c/plugin/resin/resin.c	2004-03-09 09:46:32.000000000 +0800
@@ -73,6 +73,11 @@
 
 #define MAX_OPTIONS 256
 
+typedef struct {
+  char*	optionString;
+  void* extraInfo;
+} JavaVMOption;
+
 typedef struct options_t {
   char *resin_home;
   char *server_root;
@@ -1325,7 +1330,7 @@
   JavaVM *vm = 0;
   JNIEnv *env = 0;
   JavaVMInitArgs vm_args;
-  JavaVMAttachArgs vm_attach_args;
+  struct JavaVMAttachArgs vm_attach_args;
   char envpath[8192];
   char jvmpath[8192];
   int res;
@@ -1466,9 +1471,11 @@
 
   memset(&vm_args, 0, sizeof(vm_args));
   vm_args.version = JNI_VERSION_1_2;
+#if 0  
   vm_args.options = g_options.options;
   vm_args.nOptions = g_options.n_options;
   vm_args.ignoreUnrecognized = 0;
+#endif  
 
   res = create_vm(&vm, (void **)&env, &vm_args, jvmpath);
   if (res < 0) {
--- resin-2.1.12/conf/resin.conf	2003-12-10 06:58:29.000000000 +0800
+++ resin-2.1.12-kaffe/conf/resin.conf	2004-03-08 14:32:25.000000000 +0800
@@ -34,7 +34,7 @@
    - The default is "internal" only because it's the most
    - likely to be available.
   -->
-<java compiler="internal" compiler-args=""/>
+<java compiler="jikes" compiler-args=""/>
 
 <!--
    - Sample database pool configuration


More information about the kaffe mailing list