On Sun Jun 29 15:04, Richard Cole wrote: > I've started looking into javahelper, very nice package. > > I tried to package a small library (jarjar) following the javahelper > tutorial but I got stuck. I was trying to build with sun-j2sdk1.6. I
by which you presumably mean sun-java6-jdk, if you haven't noticed that it's now in non-free > tried calling jh_build from debian/rules: > > jh_build jarjar.jar src/main > > jh_build then tried to call javac src/main, but javac said that > src/main was an invalid flag. It seems that you have to list all the > java files to be compiled when you call the sunjava version of javac. Hmm, I remember changing something related to that. But I can't now find it. Indeed you are correct, GCJ does what you would expect and Sun javac does not. I shall change it to find | xargs, but be annoyed at having to do so. There doesn't seem to be a way (afaict) to compile more java files than will fit on a command line, which is a bit of a pain. The fix will be in the next upload. > So it seems that most software in debian is being compiled with > java-gcj. Is there a significant difference in the class files that > are produced by java-gcj and sunjava? Is java-gcj the current > preferred compiler in debian by virtue of it being open source? Is > anyone thinking of ways to select either a java-gcj or sunjava built > system? Are their issues mixing jars from the two compilers? How > stable is java-gcj? The only difference is the default version of class file produced. As long as you are producing class files of at most as new a version as your runtime supports, it doesn't matter which compiler you use. Since it is only compiled to byte code there is not much of an issue of optimization either. The main difference is whether there are any language features etc which you use that gcj doesn't support yet. It is pretty good with 1.5 features, but as yet does not have a class library with generics to compile against, so using generics from the standard library won't work (but will in your own classes). Of course, the main difference is that if you compile with gcj the package can go in main, not contrib. openjdk should fix that. Generally we recommend building with gcj (or, rather, default-jdk) where possible. > Is there any plan to integrate javahelper with common debian build > system, so that one can reduce the size of ones debian/rules files? Well, it is already as terse as debhelperized packages (which amount of code I personally like). If someone who knows cdbs would like to integrate it into there I would be more than happy, however, I don't know cdbs and therefore cannot do so myself. Matt -- Matthew Johnson
signature.asc
Description: Digital signature