0

I have a Weblogic (10.3.6) domain template that I am using to create a domain on Windows. The "startscript.xml" in the template contains a section to set JAVA_OPTIONS as below -

<setenv name="JAVA_OPTIONS" scope="global" delim=" ">
   <value>-Dlog4j.configuration=desktop/log4j.xml</value>
</setenv>

When the domain is created, this gets converted to a statement like this in the start*.cmd file :-

set JAVA_OPTIONS=-Dlog4j.configuration=desktop\log4j.xml

I am assuming that the domain configuration wizard is replacing the "/" with "\" because this is on a Windows platform (I haven't tried on Unix though).

Is there a way to prevent it? I would like the "/" to remain as it is.

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
Do Will
  • 711
  • 1
  • 9
  • 18
  • Why do you need it to remain as is? That is the correct slash direction for windows paths - not only that, Java doesn't care which direction the slash is – Display Name is missing Nov 11 '14 at 23:08
  • Apparently it does. With the "\", it can't find the log4j.xml. It is in a JAR at the path "desktop/log4j.xml". If I start up the domain after changing "\" to "/", it works fine. Is there anywhere I need to configure for Java to work with "\"? – Do Will Nov 13 '14 at 15:50
  • Interesting... we have mixed slashes all over the place and haven't had a problem. For instance we have `-Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy` which still picks up that file fine. One thing you could try is to pre-pend the file path like `file:desktop/log4j.xml` – Display Name is missing Nov 13 '14 at 16:28

0 Answers0