On Mon, Nov 04, 2002 at 08:52:12PM +1100, Ben Burton wrote:
>
> > > Sure. If nothing else, you can do it by replacing your java runtime
> > > command with a short startup script that looks for
> > > -Djava.library.path=foo on the
> >
> > And this works with kaffe, ibm-jdk, blackdown and sun jdk?
>
> It'll work with any Java runtime that supports -Djava.library.path, but they
> all should support this since it's the standard way to specify a JNI search
> path.
Then I second this.
> > This have to be mentioned in policy. Or maybe not. It should be quite
> > obvious that you have to make such things.
>
> I wouldn't want to force such a script on JVM maintainers; if they prefer to
> hard-code the debian JNI path in the JVM sources (as a debian patch) then
> that's cool with me. I'm happy just to include a reference to such a script
> in whatever bugs end up being filed on the various JVMs.
Such things is of course a good thing.
> I've written a perl script that does what I mentioned; it can be used as the
> JVM's primary runtime command. It merely fixes the JNI search path and
> passes everything straight through to the real java runtime.
Nice.
My suggestion is that you start filing wishlist bugs against the jvm:s
and talk to blackdown folk (hi there! ;) ) or similar. The packages
I can come up with is kaffe, gcj (has it a jvm too?), j2re
(blackdown) ibm-jdk1.1-installer and jdk1.1.
When it has been implemented on some important jvm:s (like kaffe,
jdk1.1 and possibly j2re) I'll update the Debian policy.
If no one objects (with acceptable objections) under this time of course. :)
The java policy is not just proposed anymore so we have to be careful with
the changes we make to it. :)
Regards,
// Ola
> The script is below.
>
> Ben.
>
> #!/usr/bin/perl -w
> #
> # Starts a java runtime, ensuring that the debian JNI module directory is on
> # the JNI search path.
> #
> # Variable $javaRuntime should be modified to suit the particular java
> # runtime being used.
> #
> # Usage: As for the particular java runtime being used.
> #
> # Copyright (C) 2002 by Ben Burton <benb@acm.org>
>
> use strict;
>
> # The real java runtime:
> my $javaRuntime = '/usr/bin/myjavaruntime';
>
> # The debian JNI module directory:
> my $debianJNIDir = '/usr/lib/jni';
>
> # The command-line options to pass to the real java runtime:
> my @commandLine;
>
> # The full JNI search path to use:
> my $JNIPath = '';
>
> # Build the command-line from the arguments given.
> foreach my $arg (@ARGV) {
> if ($arg =~ /^-Djava.library.path=(.+)$/) {
> # A component of the JNI search path has been given.
> if ($JNIPath) {
> $JNIPath = $JNIPath . ':' . $1;
> } else {
> $JNIPath = $1;
> }
> } else {
> # Some other argument has been given.
> push @commandLine, $arg;
> }
> }
>
> # Add the debian JNI module directory to the JNI search path if it's not
> # already there.
> if ($JNIPath !~ /(^|:)$debianJNIDir($|:)/) {
> if ($JNIPath) {
> $JNIPath = $JNIPath . ':' . $debianJNIDir;
> } else {
> $JNIPath = $debianJNIDir;
> }
> }
>
> # Call the real Java runtime.
> my @fullCommandLine = ( $javaRuntime, "-Djava.library.path=$JNIPath" );
> push @fullCommandLine, @commandLine;
> exec @fullCommandLine or exit(1);
>
>
>
>
> --
> To UNSUBSCRIBE, email to debian-java-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
--
--------------------- Ola Lundqvist ---------------------------
/ opal@debian.org Annebergsslingan 37 \
| opal@lysator.liu.se 654 65 KARLSTAD |
| +46 (0)54-10 14 30 +46 (0)70-332 1551 |
| http://www.opal.dhs.org UIN/icq: 4912500 |
\ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 /
---------------------------------------------------------------
Attachment:
pgpA7xuSV9KSb.pgp
Description: PGP signature