Hi,
[2025-12-01 19:54:08+0100] Bruno Haible:
Haelwenn (lanodan) Monnier wrote:
+all: javaversion.class
+ $(JAVAC) -d . -target 1.1 javaversion.java
Thanks for trying. But the problem is that
1) As noted in javaversion.java:
* This program _must_ be compiled with
* javac -d . -target 1.1 javaversion.java
* since its purpose is to show the version of _any_ Java implementation.
2) Current Java compilers don't support '-target 1.1' any more:
Oh wow, I didn't expect this.
For the record it still works via the Eclipse Compiler for Java
in case it would need to be rebuilt:
$ ecj -d . -target 1.1 javaversion.java
$ file javaversion.class
javaversion.class: Cafe Babe compiled Java class data, version 45.3
$ zypper info ecj | grep Version
Version : 4.23-4.5
And can confirm it works in the oldest JavaVM I could still get
on a modern system:
$ jamvm javaversion
1.5
That said I wonder, without distributing a binary downstream anymore,
is `-target 1.1` still needed?
Only weird case I can think of is a javac that can't build for the JRE,
but wouldn't that effectively be a broken system?
Best regards