[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Fwd: Re: [architecture] Re: JPackages and ObjectWeb]



Jan Schulz wrote:

Hallo Nicolas,

* Nicolas Mailhot wrote:
jsse.libs=$(build-classpath jsse)
javamail.libs=$(build-classpath javamail)
test.libs=$(build-classpath junit xerces-j2 httpunit)
            ^^^^^^^^^^^^^^^
I thought you don't have such a script. Thats exactly what I propose
to use, but on runtime. And merging it with your static 'put all the
symlinks in place' code and redoing it so that it outputs one line,
which incldues all the information and can be used to start the JVM.


The symlinks are only for jvm specific jars (jvm extensions, which may later become part of java itself).

$ build-classpath jdbc-stdext ant bsh xerces-j2
/usr/lib/jvm-exports/java/jdbc-stdext.jar:/usr/share/java/ant.jar:/usr/share/java/bsh.jar:/usr/share/java/xerces-j2.jar

You can see how jdbc is a jvm extension so it exists as a symlink is /usr/lib/jvm-exports. Every other jar (normal jar) gets picked up in /usr/share/java a bit easier.

So instead of doing symlinks and then start the JVM, you will do

java-config --execute-line --jvms="JVMpackage1:JVMPackage2" \
--classpath="$ANT_PUT_FIRST;package1;package2" \
--jvm-options="server:256MB" \
--add-lib-path="/some/other/path/you/asked/for/"


java-config should work like any other -config script I presume.

We have nearly all this functionality already as bash functions, though not through an executable script, but a library that is sourced for each script we run so:

# Source functions library
. /usr/share/java-utils/java-functions

MAIN_CLASS=foo.Bar

# Set parameters
set_jvm
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS

# Let's start
run "$@"

--
Sincerely,

David Walluck
<david@anti-microsoft.org>

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: