mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03:00
981cac8e10
HotSpot uses the absolute path of libjvm.so to determine the java.home property (ignoring $JAVA_HOME), which is in turn used by ToolProvider.getSystemJavaCompiler() to load tools.jar. So we need to do some trickery to ensure that if java gets invoked from the jdk output (ratherthan the jre output), it finds libjvm.so in the jdk output.
18 lines
756 B
Diff
18 lines
756 B
Diff
diff -ru -x '*~' openjdk-orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
|
|
--- openjdk-orig/hotspot/src/os/linux/vm/os_linux.cpp 2013-09-06 20:22:03.000000000 +0200
|
|
+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2014-01-24 22:44:08.223857012 +0100
|
|
@@ -2358,12 +2358,10 @@
|
|
CAST_FROM_FN_PTR(address, os::jvm_path),
|
|
dli_fname, sizeof(dli_fname), NULL);
|
|
assert(ret, "cannot locate libjvm");
|
|
char *rp = NULL;
|
|
if (ret && dli_fname[0] != '\0') {
|
|
- rp = realpath(dli_fname, buf);
|
|
+ snprintf(buf, buflen, "%s", dli_fname);
|
|
}
|
|
- if (rp == NULL)
|
|
- return;
|
|
|
|
if (Arguments::created_by_gamma_launcher()) {
|
|
// Support for the gamma launcher. Typical value for buf is
|