< prev index next >
src/java.base/unix/native/libjli/java_md_solinux.c
Print this page
rev 53719 : [mq]: 8217216
@@ -301,10 +301,13 @@
int argc = *pargc;
char **argv = *pargv;
#ifdef SETENV_REQUIRED
jboolean mustsetenv = JNI_FALSE;
+#ifdef __solaris__
+ char *llp64 = NULL; /* existing LD_LIBRARY_PATH_64 setting */
+#endif // __solaris__
char *runpath = NULL; /* existing effective LD_LIBRARY_PATH setting */
char* new_runpath = NULL; /* desired new LD_LIBRARY_PATH string */
char* newpath = NULL; /* path on new LD_LIBRARY_PATH */
char* lastslash = NULL;
char** newenvp = NULL; /* current environment */
@@ -365,11 +368,16 @@
*
* followed by the user's previous effective LD_LIBRARY_PATH, if
* any.
*/
+#ifdef __solaris__
+ llp64 = getenv("LD_LIBRARY_PATH_64");
+ runpath = (llp64 == NULL) ? getenv(LD_LIBRARY_PATH) : llp64;
+#else
runpath = getenv(LD_LIBRARY_PATH);
+#endif /* __solaris__ */
/* runpath contains current effective LD_LIBRARY_PATH setting */
{ /* New scope to declare local variable */
char *new_jvmpath = JLI_StringDup(jvmpath);
new_runpath_size = ((runpath != NULL) ? JLI_StrLen(runpath) : 0) +
@@ -438,10 +446,18 @@
/*
* Unix systems document that they look at LD_LIBRARY_PATH only
* once at startup, so we have to re-exec the current executable
* to get the changed environment variable to have an effect.
*/
+#ifdef __solaris__
+ /*
+ * new LD_LIBRARY_PATH took over for LD_LIBRARY_PATH_64
+ */
+ if (llp64 != NULL) {
+ UnsetEnv("LD_LIBRARY_PATH_64");
+ }
+#endif // __solaris__
newenvp = environ;
}
#endif /* SETENV_REQUIRED */
{
< prev index next >