I'm trying to use the PathEnv to keep the fantom home directory and my work directory separate. The issue is that the JDBC jar file I am trying to use will only be resolved if I put it in {fan.home}. I would like to put it in {fan.work}\lib\java\ext\ instead of {fan.home}\lib\java\ext\.
Is this by design or just overlooked?
I've got fantom setup in a Dropbox account using relative paths.
This works: Dropbox\Apps\fantom-1.0.65\lib\java\ext\sqlite-jdbc-3.7.2.jar
This dosn't: Dropbox\workspace\lib\java\ext\sqlite-jdbc-3.7.2.jar
I start fan using
:: Dropbox\Environment\Bin\fan.cmd
@ECHO OFF
SETLOCAL
PUSHD "%~dp0.\..\..\Apps\fantom-1.0.65" || GOTO :EOF
SET fan_home=%CD%
POPD
PUSHD "%~dp0.\..\..\workspace" || GOTO :RUN
SET FAN_ENV=util::PathEnv
SET FAN_ENV_PATH=%CD%
POPD
:RUN
"%~dp0.\..\..\Apps\CommonFiles\Java\bin\java.exe" -cp "%fan_home%\lib\java\sys.jar" fanx.tools.Fan %*
:: End Dropbox\Environment\Bin\fan.cmd
I've noticed this myself (as I too use the PATH_ENV) but as my jars are few, I didn't mind sticking them in the fan home dir.
This may be by design, as I guess weaving JavaFFI stuff into a core Fantom class (Env) would prove troublesome. There's no mention of PATH_ENV in docLang::JavaFFI#classpathRuntime and no mention of java classpath in docLang::Env#PathEnv.
andyMon 8 Jul 2013
Yeah I noticed that too recently - we should fix.
brianMon 8 Jul 2013
That was probably just because of weird bootstrap issues. But I pushed a fix to add at least the workDir path to the classpath (after the Env instance is initialized). That isn't perfect because it doesn't add all the paths to the classpath (just homeDir and workDir). But I have some plans to basically collapse PathEnv into the core sys::Env so we can simplify a bunch of stuff, and then at that point I will make it work with every path.
Caementum Sun 7 Jul 2013
I'm trying to use the PathEnv to keep the fantom home directory and my work directory separate. The issue is that the JDBC jar file I am trying to use will only be resolved if I put it in {fan.home}. I would like to put it in {fan.work}\lib\java\ext\ instead of {fan.home}\lib\java\ext\.
Is this by design or just overlooked?
I've got fantom setup in a Dropbox account using relative paths.
This works:
Dropbox\Apps\fantom-1.0.65\lib\java\ext\sqlite-jdbc-3.7.2.jar
This dosn't:
Dropbox\workspace\lib\java\ext\sqlite-jdbc-3.7.2.jar
I start fan using
The output of running
is
SlimerDude Sun 7 Jul 2013
I've noticed this myself (as I too use the PATH_ENV) but as my jars are few, I didn't mind sticking them in the fan home dir.
This may be by design, as I guess weaving JavaFFI stuff into a core Fantom class (Env) would prove troublesome. There's no mention of PATH_ENV in docLang::JavaFFI#classpathRuntime and no mention of java classpath in docLang::Env#PathEnv.
andy Mon 8 Jul 2013
Yeah I noticed that too recently - we should fix.
brian Mon 8 Jul 2013
That was probably just because of weird bootstrap issues. But I pushed a fix to add at least the workDir path to the classpath (after the Env instance is initialized). That isn't perfect because it doesn't add all the paths to the classpath (just homeDir and workDir). But I have some plans to basically collapse PathEnv into the core sys::Env so we can simplify a bunch of stuff, and then at that point I will make it work with every path.