File: 03-launcher.patch

package info (click to toggle)
visualvm 2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 46,220 kB
  • sloc: java: 300,623; xml: 14,996; javascript: 3,738; ansic: 1,890; cpp: 1,294; sh: 1,208; makefile: 68
file content (43 lines) | stat: -rw-r--r-- 1,088 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From: Markus Koschany <apo@debian.org>
Date: Tue, 22 Jan 2019 17:42:10 +0100
Subject: 03 launcher

Forwarded: not-needed
---
 visualvm/launcher/visualvm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/visualvm/launcher/visualvm b/visualvm/launcher/visualvm
index 93c54bc..b5534e3 100644
--- a/visualvm/launcher/visualvm
+++ b/visualvm/launcher/visualvm
@@ -48,6 +48,8 @@ cd "$progdir"/..
 basedir=`pwd`
 cd "$old"
 
+basedir=/usr/share/visualvm
+
 case "`uname`" in
     Darwin*)
         # set default userdir and cachedir on macOS
@@ -73,6 +75,20 @@ elif [ -f "$progdir"/../etc/visualvm.conf ] ; then
     . "$progdir"/../etc/visualvm.conf
 fi
 
+ARCH=`dpkg --print-architecture`
+visualvm_jdkhome=
+for j in /usr/lib/jvm/java-11-openjdk-$ARCH /usr/lib/jvm/default-java; do
+    if [ -x $j/bin/javac ]; then
+       visualvm_jdkhome=$j
+       break
+    fi
+done
+if [ -z "$visualvm_jdkhome" ]; then
+    echo >&2 "Version of OpenJDK is not supported. Please use the default-jdk."
+    exit 1
+fi
+
+. /etc/visualvm/visualvm.conf
 
 export DEFAULT_USERDIR_ROOT