Link to home
Start Free TrialLog in
Avatar of bachra04
bachra04Flag for Canada

asked on

Using properties.store just re-arranged the parameters

I need a way to store and retrieve parameters from a config. file using java Properties but keeping the order, line spaces and comments in the configuration files.

Thanks,
B.T
Avatar of Mick Barry
Mick Barry
Flag of Australia image

then you'll need to load it yourself into a LinkedHashMap
Maybe even an ArrayList if you want to also store the comment.
Avatar of bachra04

ASKER

what about the comments and spaces between lines that I want to keep.
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> what about the comments and spaces between lines that I want to keep.

thats why i said you may need to use a List
see the link for how to read file into list