Will
Will

Reputation: 8631

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?

Upvotes: 3

Views: 1988

Answers (2)

stivlo
stivlo

Reputation: 85496

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.

Upvotes: 2

GenuinePlaceholder
GenuinePlaceholder

Reputation: 695

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.

Upvotes: 1

Related Questions