src/solaris/bin/java_md_solinux.c

Print this page
rev 6147 : 7099119: Remove unused dlinfo local variable in launcher code


 794             return JNI_TRUE;
 795         }
 796 
 797         /* Does the app ship a private JRE in <apphome>/jre directory? */
 798         JLI_Snprintf(libjava, sizeof(libjava), "%s/jre/lib/%s/" JAVA_DLL, path, arch);
 799         if (access(libjava, F_OK) == 0) {
 800             JLI_StrCat(path, "/jre");
 801             JLI_TraceLauncher("JRE path is %s\n", path);
 802             return JNI_TRUE;
 803         }
 804     }
 805 
 806     if (!speculative)
 807       JLI_ReportErrorMessage(JRE_ERROR8 JAVA_DLL);
 808     return JNI_FALSE;
 809 }
 810 
 811 jboolean
 812 LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn)
 813 {
 814     Dl_info dlinfo;
 815     void *libjvm;
 816 
 817     JLI_TraceLauncher("JVM path is %s\n", jvmpath);
 818 
 819     libjvm = dlopen(jvmpath, RTLD_NOW + RTLD_GLOBAL);
 820     if (libjvm == NULL) {
 821 #if defined(__solaris__) && defined(__sparc) && !defined(_LP64) /* i.e. 32-bit sparc */
 822       FILE * fp;
 823       Elf32_Ehdr elf_head;
 824       int count;
 825       int location;
 826 
 827       fp = fopen(jvmpath, "r");
 828       if (fp == NULL) {
 829         JLI_ReportErrorMessage(DLL_ERROR2, jvmpath, dlerror());
 830         return JNI_FALSE;
 831       }
 832 
 833       /* read in elf header */
 834       count = fread((void*)(&elf_head), sizeof(Elf32_Ehdr), 1, fp);




 794             return JNI_TRUE;
 795         }
 796 
 797         /* Does the app ship a private JRE in <apphome>/jre directory? */
 798         JLI_Snprintf(libjava, sizeof(libjava), "%s/jre/lib/%s/" JAVA_DLL, path, arch);
 799         if (access(libjava, F_OK) == 0) {
 800             JLI_StrCat(path, "/jre");
 801             JLI_TraceLauncher("JRE path is %s\n", path);
 802             return JNI_TRUE;
 803         }
 804     }
 805 
 806     if (!speculative)
 807       JLI_ReportErrorMessage(JRE_ERROR8 JAVA_DLL);
 808     return JNI_FALSE;
 809 }
 810 
 811 jboolean
 812 LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn)
 813 {

 814     void *libjvm;
 815 
 816     JLI_TraceLauncher("JVM path is %s\n", jvmpath);
 817 
 818     libjvm = dlopen(jvmpath, RTLD_NOW + RTLD_GLOBAL);
 819     if (libjvm == NULL) {
 820 #if defined(__solaris__) && defined(__sparc) && !defined(_LP64) /* i.e. 32-bit sparc */
 821       FILE * fp;
 822       Elf32_Ehdr elf_head;
 823       int count;
 824       int location;
 825 
 826       fp = fopen(jvmpath, "r");
 827       if (fp == NULL) {
 828         JLI_ReportErrorMessage(DLL_ERROR2, jvmpath, dlerror());
 829         return JNI_FALSE;
 830       }
 831 
 832       /* read in elf header */
 833       count = fread((void*)(&elf_head), sizeof(Elf32_Ehdr), 1, fp);