natRuntime.cc (_Jv_SetDLLSearchPath): New function.
* java/lang/natRuntime.cc (_Jv_SetDLLSearchPath): New function. (_Jv_FindSymbolInExecutable): Removed argument name. (insertSystemProperties): Call _Jv_SetDLLSearchPath if java.library.path is set. * gij.cc (help): Document --showversion. (version): Don't exit. (main): Handle --showversion. Exit if --version given. From-SVN: r58520
This commit is contained in:
parent
3752ac0803
commit
ca7c2b8529
3 changed files with 49 additions and 2 deletions
|
@ -102,14 +102,26 @@ _Jv_FindSymbolInExecutable (const char *symname)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_Jv_SetDLLSearchPath (const char *path)
|
||||
{
|
||||
lt_dlsetsearchpath (path);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void *
|
||||
_Jv_FindSymbolInExecutable (const char *symname)
|
||||
_Jv_FindSymbolInExecutable (const char *)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
_Jv_SetDLLSearchPath (const char *)
|
||||
{
|
||||
// Nothing.
|
||||
}
|
||||
|
||||
#endif /* USE_LTDL */
|
||||
|
||||
|
||||
|
@ -538,6 +550,25 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops)
|
|||
|
||||
// Allow platform specific settings and overrides.
|
||||
_Jv_platform_initProperties (newprops);
|
||||
|
||||
// If java.library.path is set, tell libltdl so we search the new
|
||||
// directories as well. FIXME: does this work properly on Windows?
|
||||
String *path = newprops->getProperty(JvNewStringLatin1("java.library.path"));
|
||||
if (path)
|
||||
{
|
||||
char *val = (char *) _Jv_Malloc (JvGetStringUTFLength (path) + 1);
|
||||
jsize total = JvGetStringUTFRegion (path, 0, path->length(), val);
|
||||
val[total] = '\0';
|
||||
_Jv_SetDLLSearchPath (val);
|
||||
_Jv_Free (val);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set a value for user code to see.
|
||||
// FIXME: JDK sets this to the actual path used, including
|
||||
// LD_LIBRARY_PATH, etc.
|
||||
SET ("java.library.path", "");
|
||||
}
|
||||
}
|
||||
|
||||
java::lang::Process *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue