LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Introduce me c++ / java configuration file libraries please. (https://www.linuxquestions.org/questions/programming-9/introduce-me-c-java-configuration-file-libraries-please-889607/)

cshong 07-02-2011 11:06 PM

Introduce me c++ / java configuration file libraries please.
 
I would like a library for either C++ or Java that can store and read configuration files and meet my following requirements:

For C++:
- Cross-platform support (Windows, Linux, MAC OS, etc).
- On Windows, support Microsoft Visual C++ compiler.
- Full unicode support (Can read and write text in configuration file in unicode format)
- Optional and not necessary: Support Xcode on MAC OS.

For Java:
- Cross-platform support (Windows, Linux, MAC OS, etc). I know Java itself support cross-platform, but I just want to mention this.
- Full unicode support (Can read and write text in configuration file in unicode format)

Please do not introduce me the following libraries:
- libconfig (lack of Unicode support)

You no need to introduce me libraries for both language at the same time. If you know libraries for C++, just introduce libraries for C++. If you know libraries for Java, just introduce libraries for Java.

paulsm4 07-03-2011 03:51 PM

Java:
* Your best bet is to read and write good, old fashioned "property files":

http://www.exampledepot.com/egs/java.util/Props.html


C/C++
* Your best bet is to read/write a simple clear text UTF8 file:
FORMAT:
- name=value
- "#" is comment
- whitespace ignored

For either case, you might also consider an XML file (if, and only if, 2-D name/values isn't sufficient)

http://download.oracle.com/javaee/1....JAXPIntro.html

http://joysofprogramming.com/libxml-tutorial/


'Hope that helps .. PSM

gzunk 07-04-2011 11:39 AM

For Java, maybe consider Apache Commons Configuration


All times are GMT -5. The time now is 06:25 AM.