FS#31460 - [swt] Swt may not have java-runtime >= 7 as requirement

Attached to Project: Arch Linux
Opened by Simon Gilliot (ALSimon) - Friday, 07 September 2012, 21:24 GMT
Last edited by Guillaume ALAUX (galaux) - Saturday, 08 September 2012, 11:27 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Guillaume ALAUX (galaux)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

It seems that the last version of swt package set java-runtime >= 7 as dependency.
Also, it requires me to install jdk7-openjdk and therefore to remove openjdk6.

On the project website (http://www.eclipse.org/swt/), I haven't found any sentence which let me suppose that the last swt release requires java 7 to works.

Additional info:
* package version(s) : swt 3.7.2-2
This task depends upon

Closed by  Guillaume ALAUX (galaux)
Saturday, 08 September 2012, 11:27 GMT
Reason for closing:  Fixed
Additional comments about closing:  Added compile flag "target=1.6". Fixed in 4.2-1
Comment by Guillaume ALAUX (galaux) - Saturday, 08 September 2012, 07:05 GMT
Unfortunately it does depend on java 7: see  FS#31410 ,  FS#31335  and  FS#30295 .
Also try to compile the SWT example from the main page [0] with openjdk6 and you will get that error.

[0] http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet266.java
Comment by Simon Gilliot (ALSimon) - Saturday, 08 September 2012, 10:22 GMT
I don't think so.

IMO, swt depends (at runtime) from java 7 because it was compiled by java 7 without any target specified, so was compiled for a java 7 target.
Once compiled in this way, it indeed deepends on java 7.

I think ant (in build-swt.xml : https://projects.archlinux.org/svntogit/packages.git/tree/trunk/build-swt.xml?h=packages/swt) allow us to change java compilation target (see https://ant.apache.org/manual/Tasks/javac.html) :
<javac srcdir="${src}" destdir="${build}" target="1.6" />

With swt compile in this way, these errors would'nt occur anymore ant swt may be working fine on openjdk6 & openjdk7
Comment by Guillaume ALAUX (galaux) - Saturday, 08 September 2012, 11:25 GMT
Damn you are right! I was compiling the previous example against the swt.jar built without the "target".
I'm bumping package swt to 4.2 but including your suggestion. Thanks.

Loading...