Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to view java system properties in eclipse

I was wondering if there is a way to do this?

I know how to set them through the use of

-Dpropertyname=property

Can I view this in the debug view within eclipse?

like image 921
Will Avatar asked May 23 '26 05:05

Will


2 Answers

You can go to the Expression view and create a new expression with the following text:

System.getProperty("propertyname")

To show the Expression view: Click on Window Menu -> Show View -> Others... -> Type Expr -> Click OK.

like image 154
stivlo Avatar answered May 24 '26 18:05

stivlo


Although there is no direct way of doing this, that I know of, you can always print it out with

System.out.println(System.getProperty("yourProperty"));

You can then view the property in the console. Although this is not a very good way it seems to be the only one.

like image 35
GenuinePlaceholder Avatar answered May 24 '26 18:05

GenuinePlaceholder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!