views:

36

answers:

1

In .NET you can create strongly-typed configuration sections using build-in base classes that do a lot of the mundane heavy lifting with respect to XML Serialization/De-serialization, schema validation, type-casting, etc...

I'm working on a Java application and I'm looking for a similar capability. If there is a built-in facility for this I would prefer to not reinvent the wheel. I don't do a lot of Java so any guidance and links with examples/walk-throughs would be great.

Does anyone have any tips on how I can accomplish this using built-in Java capabilities?

+1  A: 

I think the closest you can get to .NET configuration sections is the Preferences API.

This is still a rather low-level approach however. Its intended use is more geared towards user preferences than actual system-wide configuration.

Another option would be Commons Configuration, which provides similar functionality, still not strongly-typed.

Ronald Wildenberg