I'd like to invoke a method in JDI which has String
as a parameter. So first I will have to create a String
value(com.sun.jdi.Value
) but the only way which comes to my mind is to use the newInstance()
method on ClassType
, but this method also takes Value
as parameter just like the invokeMethod()
which I wanted to call in the first place. So I still need a com.sun.jdi.Value
to create a String
.... But how can I create the String without any com.sun.jdi.Value
?
Asked
Active
Viewed 66 times
0

Nfff3
- 321
- 8
- 24
-
1Are you looking for [`mirrorOf(String)`](https://docs.oracle.com/javase/7/docs/jdk/api/jpda/jdi/com/sun/jdi/VirtualMachine.html#mirrorOf(java.lang.String))? – Louis Wasserman Aug 31 '20 at 21:56
-
@LouisWasserman, yes, that works. Thank you very much! – Nfff3 Aug 31 '20 at 23:06