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

Re: findjava requirement



Hallo Ean,

* Ean Schuessler wrote:
>> After having this discussion, because they are not 'similar enough' to
>> rely on the alternative system.
>Well, they *could be* similar enough if we specify exactly what Debian
>expects a JAVA_HOME setup to provide.

It's not the java.home or anything else. That's only important for
apps like ant, which rely on java.home/bin/javadoc and such thing. The
problems are:
* different commandline option. Try -Xm256mb or the JIT options with
  different VMs...
* different API level: are the XML/whatever APIs available with every VM?
* is this special feature actually implemented?

Read the mails from proposal one to three, where this was discussed and
the conclusion was, that you can't even rely on sun derived VMs to be
that similar, that it works. The problem is, that you also can't
version this things: virtual packages don't have versions, and if you
need a new virtual package or bin/java-version every time, you end up
with hundreds...

>The packages of those special VMs would need to provide wrappers that
>adapt their behavior to the Debian JAVA_HOME standard.

Also, the 'JAVA_HOME standard' does not exist, as the only thing
which defined it is the sun layout. And even IBM does it diffrently
with 'put all jni headers into $JAVA_HOME/include'.

>> Consider: kaffe, sunVM, sablevm and gij. User has installed kaffe and
>> gij, the alternative system has put gij as /usr/bin/java. App runs on
>> kaffe and sunVM. App calls /usr/bin/java (or /usr/lib/jre/bin/java).
>> Crash...
>Tell me again how findjava fixes that problem?

The fix is more that you don't call any alternative managed app, but
the VM directly.

for vm in /usr/bin/kaffe /usr/lib/j2sdk/1.4/bin/java ... ; do 
  if [ -x $vm ]
    JAVACMD="$vm"
    break
  fi
done
if [ ! -x "$vm" ]
  echo "No Java Virtual Maschine found, abort...
  exit 1
fi  

findjava takes this aproach and puts a level of abstraction inbetween
(the package names of the VM) and factors this code into one place:
the findjava script. It also makes it possible to choose one default
VM, which should be used, if this VM is 'known working'.

For more information, please read the discussion from the 3 Proposal
up to now, which helds all the arguments about this. Also, the
implementation is at www.katzien.de/debian/java/.

Jan
-- 
Jan Schulz                     jasc@gmx.net
     "Wer nicht fragt, bleibt dumm."



Reply to: