I've found the answer for it from this page http://docs.basex.org/wiki/Options

so for the java code in version 8.6.7, it needs to use


System.setProperty("org.basex.dbpath", "/home/xxx/test_basex/");

to set this global path and then, BaseX will read/create collection to this dbpath correctly.


Bang, Pham Huu
- Research Associate/PhD Student in Computer Science-
Address: Room 96, 2nd Floor, Campus Ring 1, Jacobs University, 28759 Bremen, Germany.
Email: b.phamhuu@jacobs-university.de
Tel: +49 174 7096020
"Your best teacher is your last mistake"


Jacobs University,
Address: Campus Ring 1, 28759 Bremen, Germany
Phone: +49 421 20040

"Our Focus in research and education"

From: basex-talk-bounces@mailman.uni-konstanz.de <basex-talk-bounces@mailman.uni-konstanz.de> on behalf of Bang Pham Huu <b.phamhuu@jacobs-university.de>
Sent: Friday, January 5, 2018 12:26:01 PM
To: basex-talk@mailman.uni-konstanz.de
Subject: [basex-talk] How to set DBPath in BaseX version 8.6.7 as in version 7.3.1?
 
Hello,

I'm using BaseX version 7.3.1 and I can set dbpath where the collections
are created with this code:

new Set("dbpath", "/home/xxxx/basex-database").execute(context);

However, when changing to BaseX version 8.6.7, this statement will throw
exception "org.basex.core.BaseXException: Global option 'DBPATH' cannot
be set."

and instead it tries to create new collections to a default folder:
/home/xxxx/BaseXData

How can I set BaseX to work on existing dbpath folder
(/home/xxxx/basex-database) as in version 7.3.1? Because I have existing
data here and not the newly created one.

Thanks,