Hi Florent,
please note that the existing .basex configuration file will never be overwritten, except for the case that some options are invalid (which may occur when new options are added in a new version of BaseX.
Best, Christian ___________________________
On Mon, Mar 25, 2013 at 12:46 PM, Florent Georges lists@fgeorges.org wrote:
Hi Christian, thanks Kendall,
The org.basex.path property is indeed doing the job here. Thanks!
One thing I noticed though (and it is not specific to Java, but related to calling the server and client from the command line), is that when using a new home directory (containing no .basex file), the server will always write PORT = 1984, even when passed the option -p12345:
# variables home=`pwd`/basex-home jar=/Library/Java/org/basex/basex-7.6.jar prop=-Dorg.basex.path=$home class=org.basex.BaseXServer # create a new dir mkdir $home # start and stop the server java -cp $jar $prop $class -p12345 & sleep 2 java -cp $jar $prop $class -p12345 stop # look into .basex grep PORT $home/.basex
The last command return the following, showing the default values:
PORT = 1984 SERVERPORT = 1984 EVENTPORT = 1985 PROXYPORT = 80 STOPPORT = 8985
Shouldn't it save the port number passed on the command line?
Regards,
--
Florent Georges http://fgeorges.org/ http://h2oconsulting.be/
On 25 mars 2013 10h18, Christian Grün wrote:
Hi Florent, thanks Kendall,
you can explicitly speciy a BaseX home directory via the "org.basex.path" system property, or place a .basex file in the directory you are starting BaseX from (i.e., in the “current working directory”). You’ll find some information on the page “Configuration” in our Wiki [1], which hopefully includes all relevant information. If something is missing, feel free to ask again.
Best, Christian
[1] http://docs.basex.org/wiki/Configuration ___________________________
On Sun, Mar 24, 2013 at 8:15 PM, Florent Georges lists@fgeorges.org wrote:
Hi,
When I start a BaseXServer in Java, it creates a config file ~/.basex and a data directory ~/BaseXData. Is there any way to ask BaseX not to create the config file, and to use a specific another data directory?
Or at least to tell it where to look for the config file (instead of going to ~/.basex)? I couldn't find either in the documentation.
Regards,
--
Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk