Re: jb_build with "-source 8" ignored
Hi Dylan,
Le 26/02/2016 07:29, Dylan a écrit :
> So I really need to set "-source 8" to build beagle but I don't know
> why it was ignored. Could someone have any idea of where is my
> mistake?
Your syntax looks correct. I gave it a try with a trivial class using
the Java 8 syntax:
public class Foo {
public Runnable r = () -> {};
}
With javahelper/0.54 in unstable I got this:
ebourg@icare:~$ jh_build --javacopts="-source 1.7" --no-javadoc
foo.jar .
find . -name *.java -and -type f -print0 | xargs -s 512000 -0
/usr/lib/jvm/default-java/bin/javac -g -cp :debian/_jh_build.foo -d
debian/_jh_build.foo -source 1.7
warning: [options] bootstrap class path not set in conjunction with
-source 1.7
./Foo.java:3: error: lambda expressions are not supported in -source 1.7
public Runnable r = () -> {};
^
(use -source 8 or higher to enable lambda expressions)
1 error
1 warning
ebourg@icare:~$ jh_build --javacopts="-source 1.8" --no-javadoc
foo.jar .
find . -name *.java -and -type f -print0 | xargs -s 512000 -0
/usr/lib/jvm/default-java/bin/javac -g -cp :debian/_jh_build.foo -d
debian/_jh_build.foo -source 1.8
/usr/lib/jvm/default-java/bin/jar cfm /home/ebourg/foo.jar
../_jh_manifest.foo Foo.class
So I fail to see what goes wrong with beagle.
Emmanuel Bourg
Reply to: