logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: Odd problem starting program with log4j2 on Windows
Date Thu, 05 Jul 2018 16:05:53 GMT
On 7/3/2018 4:59 PM, Ralph Goers wrote:
> Also - Since %DEFAULT_SERVER_DIR% doesn’t have a leading “/“ you might have to
specify file:///.

There is no leading / on Windows.  An absolute path starts with "X:" there.

I created an eclipse project and then copied the resulting source and 
binary files, plus the minimum required log4j jars, to a new location 
and made a batch file to illustrate the problem.

To try it, extract the following zipfile, open a command prompt, cd to 
the root of the extracted files, and type "script\start".


The current working directory gets added to the location in URI form.  
This is also what is happening with the Solr startup.

We have an issue in Solr to track getting the problem fixed there:


If I change "file:" to "file://" that does seem to fix the problem, but 
only if the indicated path is absolute.  So it works on the Solr startup 
(which is working with absolute paths), but fails in my recreation 
zipfile, which uses a relative path.

We are using file: on Linux without the // and aren't having any 
problems.  It seems to be a problem only on Windows.


To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message