commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jfcl...@apache.org
Subject cvs commit: jakarta-commons/daemon/src/native/unix/native java.c
Date Tue, 04 Jan 2005 15:59:59 GMT
jfclere     2005/01/04 07:59:59

  Modified:    daemon/src/native/unix/native java.c
  Log:
  Fix location of libjvm_compat.dylib (PR 31613).
  
  Revision  Changes    Path
  1.5       +15 -3     jakarta-commons/daemon/src/native/unix/native/java.c
  
  Index: java.c
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/native/java.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- java.c	2 Aug 2004 16:07:55 -0000	1.4
  +++ java.c	4 Jan 2005 15:59:59 -0000	1.5
  @@ -86,6 +86,7 @@
   #ifdef OS_DARWIN
       dso_handle apph=NULL;
       char appf[1024];
  +    struct stat sb;
   #endif /* ifdef OS_DARWIN */
       jint (*symb)(JavaVM **, JNIEnv **, JavaVMInitArgs *);
       JNINativeMethod nativemethod;
  @@ -122,12 +123,23 @@
       log_debug("JVM library %s loaded",libf);
   
   #ifdef OS_DARWIN
  -    /* MacOS/X actually has two libraries, one with the REAL vm, and one for
  -       the VM startup. The first one (libappshell.dyld) contains CreateVM */
  +    /*
  +       MacOS/X actually has two libraries, one with the REAL vm, and one for
  +       the VM startup.
  +       before JVM 1.4.1 The first one (libappshell.dyld) contains CreateVM
  +       after JVM 1.4.1 The library name is libjvm_compat.dylib.
  +    */
       if (replace(appf,1024,"$JAVA_HOME/../Libraries/libappshell.dylib",
                    "$JAVA_HOME",data->path)!=0) {
           log_error("Cannot replace values in loader library");
           return(false);
  +    }
  +    if (stat(appf, &sb)) {
  +        if (replace(appf,1024,"$JAVA_HOME/../Libraries/libjvm_compat.dylib",
  +                    "$JAVA_HOME",data->path)!=0) {
  +            log_error("Cannot replace values in loader library");
  +            return(false);
  +        }
       }
       apph=dso_link(appf);
       if (apph==NULL) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message