summaryrefslogtreecommitdiff
path: root/debian/patches/jexec.diff.in
blob: 5f343a1acc80fd116cdd95a329a0f11ec99adf84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- a/jdk/src/solaris/bin/jexec.c
+++ b/jdk/src/solaris/bin/jexec.c
@@ -168,9 +168,10 @@

     /* Get the path to the java binary, which is in a known position relative
      * to our current position, which is in argv[0]. */
-    if (getJavaPath(argv[argi++], java, RELATIVE_DEPTH) != 0) {
+    if (getJavaPath("/@basedir@/jre/lib/jexec", java, RELATIVE_DEPTH) != 0) {
         errorExit(errno, MISSING_JAVA_MSG);
     }
+    argi++;
     alen = (argc + 2) * (sizeof (const char *));
     if (alen <= 0 || alen > INT_MAX / sizeof(char *)) {
         errorExit(errno, BAD_ARG_MSG);