You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Xiangrong Fang <xr...@gmail.com> on 2009/01/17 04:45:19 UTC

path tho the sqlmapconfig.xml file

Hi All,

I just started to use iBatis. And had a problem which I cannot solve
for 3 days :)

I am using netbeans, I put my sqlmapconfig.xml file (and the sqlmap
file) in the src folder, which is the root folder of the jar file
netbeans create.

This works well, but I cannot edit the xml file after jar is
published. I try to put the files in the dist folder, where jar is in,
and in the program using "../sqlmapconfig.xml" to reference it. But it
does not work.

How can I use a file that is in the parent folder of the jar file ?
Is there any way to programatically set the classpath?

Thanks,
Shannon

Re: path tho the sqlmapconfig.xml file

Posted by Larry Meadors <la...@gmail.com>.
Add the directory with the files to the classpath when you start java.

java -cp <your classpath here:your directory here> <your class here>

Larry


On Mon, Jan 19, 2009 at 3:52 AM, André Bernis <an...@gmail.com> wrote:
> I have exactly the same problem!
>

Re: path tho the sqlmapconfig.xml file

Posted by André Bernis <an...@gmail.com>.
I have exactly the same problem!