Bug#588379: using jh_depends when a .jar exists in one than one package

Scott Howard showard314 at gmail.com
Sun Jul 11 15:12:29 UTC 2010


Thanks for the reply

"Processing" is a java package which compiles java code, so it depends
on the jdk. The package won't build unless tools.jar is explicitly in
the classpath at build time (I'm not too familiar with that package, i
work with arduino so I don't know what happens if tools.jar isn't in
the classpath at runtime for processing).

"Arduino" is a derivative of Processing which compiles C code, but is
based on the Processing classes, and won't build unless tools.jar is
explicitly in the classpath (spits out undefined class errors).
tools.jar is apparently used when compiling code, that's why it's in
the jdk and not in the jre [1,2]. However, "java-propose-classpath" on
arduino.jar only sees symbols of three .jars: the arduino.jar itself,
and two java library packages (not the jdk).

Maybe we can use javahelper to define one classpath during build time
and another for runtime? (I've tried but haven't found how to do it
yet using jh_build and setting CLASSPATH and/or using .classpath, and
I haven't tested if the package would even work - just a theory) I
have a feeling that having a different classpath than the build time
classpath isn't that good of an idea, especially when upstream's
wrapper for launching the .jar [3] does the following:

for LIB in \
    java/lib/rt.jar \
    java/lib/tools.jar \
    lib/*.jar \
    ;
do
    CLASSPATH="${CLASSPATH}:${APPDIR}/${LIB}"
done
export CLASSPATH


We don't do that in debian, since CLASSPATH is defined before jh_build.


This might be a really unique case, but I guess the quirk would be if
tools.jar is found in the classpath to include either the openjdk OR
sun jdk since the file exists in both and only one is installed during
build time (the one in main). I'd understand if it's too much to
change and maintain the change for the few java packages that would
depend on tools.jar, I'll defer to your experience and opinion.


[1] http://packages.debian.org/search?suite=sid&arch=any&mode=path&searchon=contents&keywords=tools.jar
[2] http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/tooldocs/solaris/jdkfiles.html
[3] http://arduino.googlecode.com/svn/trunk/build/linux/dist/arduino





More information about the pkg-java-maintainers mailing list