Hi,
Iron Eagle wrote:
> Hi,
>
> that sounds interesting. Can please give me a short example how you
> "assemble the classpath in the start script"?
bash:
============= %< =============
# * Goto script root dir
cd `dirname $0`/..
APP_CP=
# * Set class path
for i in lib/*.jar; do
APP_CP=$APP_CP:$i
done
APP_CP="$APP_CP:config"
...
============= %< =============
Windows batch:
============= %< =============
@REM * Goto script root dir
cd /d %~dp0\..
set APP_CP=
@REM * Set class path
for %%i in (lib\*.jar) do call :APP_CP_append %%i
call :APP_CP_append "config"
...
goto :EOF
:APP_CP_append
set APP_CP=%APP_CP%;%1
goto :EOF
============= %< =============
Actually these snippets are part of some kind of templates that we provide
as own dependencies to a project that should have a run script and adjust
(filter them) for the project itself, so we can keep stuff like the main
class to use in property files belonging to the current project.
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]