velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Son Juhee" <foun...@hotmail.com>
Subject how to find vm location in a velocity application jar
Date Mon, 24 Apr 2006 01:27:43 GMT
hi, 

I'm developing a simple code-generator program using velocity.
I'll distribute this as a jar (including java main- class and vm files ) to 
developers.
A problem is the location of vm files..

generator.jar! main.java
                    vm/ aaa.vm
                           bbb.vm

in this structure, how can I find the path of vm files?

property.setProperty( "file.resource.loader.path", "../vm" );
Velocity.init(property);                                              
=> doesn't work.. it searches for the "where javaw executed"../vm  NOT 
INSIDE JAR!!

I cannot use an absolute path, because vm files are inside jar and I don't 
even know where developers will put the jar  !!

is there any way to use ../.. path to access vm files inside jar??

please help.. any help will be appreciated!



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


Mime
View raw message