Developping a parser that needs a JAR

Here developers can talk about how to write a Parser for LogMX

Moderator: admin

Post Reply
john
Posts: 4
Joined: Sun Dec 31, 2006 12:17 am

Developping a parser that needs a JAR

Post by john »

Hi,

My parser needs a JAR : where can I add this JAR file so that LogMX will include it in its classpath when using this parser?
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Re: Developping a parser that needs a JAR

Post by admin »

john wrote:Hi,

My parser needs a JAR : where can I add this JAR file so that LogMX will include it in its classpath when using this parser?
Hello,

You have to add this JAR filename to the classpath used to start LogMX. Depending on your OS, you should modifiy the following file from your LogMX distribution:
  • (Linux/Mac) => "logmx.sh" : add your JAR on the line "LOGMX_CLASSPATH=$LOGMX_PATH/classes:...." (JARs are separated with ":", and LogMX dir is "$LOGMX_PATH")
  • (Windows, using "LogMX.bat") => "LogMX.bat" : add your JAR on the line "SET LOGMX_CLASSPATH=%LOGMX_HOME%\classes;...." (JARs are separated with ";", and LogMX dir is "$LOGMX_HOME")
  • (Windows, using "LogMX.exe") => "launcher.cfg" : add your JAR on the line "-Xmx302m -cp classes\;...." (JARs are separated with ";" and paths are relative to LogMX root directory)
Last edited by admin on Wed Nov 26, 2008 7:50 pm, edited 1 time in total.
biodegradable
Posts: 1
Joined: Wed May 23, 2007 10:39 am

Post by biodegradable »

Hi,

It will be better to add another env. variable like : LOGMX_ADDITIONAL_CLASSPATH

where all specifics jar files could be added... this will permit to keep your script as is :

LOGMX_CLASSPATH=$LOGMX_ADDITIONAL_CLASSPATH
:$LOGMX_PATH/classes

Cheers
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Post by admin »

biodegradable wrote:Hi,

It will be better to add another env. variable like : LOGMX_ADDITIONAL_CLASSPATH

where all specifics jar files could be added... this will permit to keep your script as is :

LOGMX_CLASSPATH=$LOGMX_ADDITIONAL_CLASSPATH
:$LOGMX_PATH/classes

Cheers
Hello,

You're right 'biodegradable', it will be easier this way.

It will be available in version 1.0.1 that will come soon

Thank you.
Post Reply