[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [equinox-dev] Re: Loading file.properties location from Config.ini or command line file

Hi Gunnar,

Thank you in advance for your answer.

My bundles which I have developed are which use this file. I mean some of my
bundles have to use some properties file so I have pass them in my bundle's
program code as System.getProperty("log4jAdaptorfile"), it does not care
about what it is the file, what I want it is to achieve that I am able to
provide a path relative to Launcher folder in order to remove the complete
path dependency so that I can use the same folder in different computers
without to modify the command line.

I just need to specify a path for the properties files which are located in
folder inside Launcher_ROOT_DIRECTORY folder so that I can copy the
Launcher_ROOT_DIRECTORY folder in other machine and launch Equinox without
depending on the complete path.


My command line in the machine A is (I call this command inside

>>java -Dlog4jAdaptorfile="C:\log4j.properties"  -jar
org.eclipse.osgi_3.4.0.v20080605-1900.jar ?console

My command line in the machine B is:

>>java -Dlog4jAdaptorfile="C:\testing\log4j.properties"  -jar
 org.eclipse.osgi_3.4.0.v20080605-1900.jar ?console

What I want is to remove -Dlog4jAdaptorfile="C:\testing\log4j.properties"
in the command line by locating log4j.properties file in a folder inside
Launcher_ROOT_DIRECTORY and writing something similar in Config.ini file in
order to specify the log4j.properties path relative to
Launcher_ROOT_DIRECTORY instead of the complete path. 

Imagine if I specify in Config.ini something like
..\properties_file\log4j.properties\ the JVM or Framework should be able to
take C:\testing\log4j.properties or C:\log4j.properties depending on the
complete path for each machine.

Is there any way to specify a System Property relative to Equinox.jar path?

Thank you in advance


-----Mensaje original-----
De: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx]
En nombre de Gunnar Wagenknecht
Enviado el: sábado, 27 de marzo de 2010 20:17
Para: equinox-dev@xxxxxxxxxxx
Asunto: [equinox-dev] Re: Loading file.properties location from Config.ini
or command line file

Am 26.03.2010 04:47, schrieb David Conde:
> java -Dlog4jAdaptorfile="C:\log4j.properties"  -jar
> org.eclipse.osgi_3.4.0.v20080605-1900.jar ?console
> I would like to fix this system properties called log4jAdaptorfile to a
> relative path which depends from where I launch the command shown above.

Who is using the property? From what I can tell it's not an Equinox
property. You need to ask the developers of the library using that
property (log4j?) if they are able to resolve the path relative to the
current working directory.


Gunnar Wagenknecht

equinox-dev mailing list