I realize this isn't 100% relevant yet, but I'm very curious about this.
In JDK8, javac parameters "source" and "target" are deprecated, and will be removed in JDK9.
As a JavaME developer, I'm wondering how then I'll be able to target older platforms. For example, I'm using target 1.3 when developing for Blu-ray. How do I compile my Xlets for Blu-ray when JDK9 is out if there's no "target" option? I imagine there must also be other (although we can agree not a lot) people out there still needing to target older devices. What do we do when JDK9 is out?
EDIT: Is it even possible to target 1.3 with JDK9?
To answer the question "how to compile without the target option", the new -release flag is a safer and more reliable alternative to -source and -target. See JEP-247 for more details. You will target older platforms with -release the same way you would with -source and -target.
The statement "source and target will be removed in JDK9" is sort of true but not quite: the -source and -target flags themselves are not removed, but their use to target specific older versions is deprecated. From JEP-182: "in JDK 9, support for a source or target of 1.5 or earlier will be removed."
To answer the question "is it even possible to target 1.3 with JDK9?" The answer is that with regards to the -release flag, JDK9 will not compile to target 1.3.
From javac -help:
--release <release>
Compile for a specific VM version. Supported targets: 6, 7, 8, 9
Your best option is to compile with an older version of the JDK. If you need to target 1.3, there's not a lot of reason to use the Java 9 compiler anyway.
I am unaware of -source and -target being deprecated in Java 8 and removed in Java 9 - the early access build (at least 9-b131) still has them. Do you have a source for that?
The only change in that area I know of is JEP 247, which introduces -release, which is kind of a shortcut for the other two.
Related
All groovyconsole binary distros I have found don't support Java 14. The console complains if you try to specify a Jar file that has been compiled with Java 14, for example.
The obvious solution, I thought, was to build Groovy with Java 14. That seems non-trivial.
gradle.wrapper.properties files contain
distributionUrl=http://services.gradle.org/distributions/gradle-2.3-bin.zip
which is a broken URL. Change that to https and then it works, partially.
You then get
FAILURE: Build failed with an exception.
What went wrong:
Could not determine java version from '14.0.2'.
Reading the docs for gradle makes it clear that most (all?) versions of gradle do not support Java 14. Definitely version 2.3 does not. Why - I have no idea.
So... back to my original question. How can I get a groovy installation to support Java 14?
Thanks!
If the Jar cannot be loaded, it is most likely the asm lib, which is unable to read it. To read Java14 you need at least ASM 7.2 I think. ASM in Groovy is not provided as standalone library, because of possible conflicts with other jar dependencies it is shadowed (bytecode is transformed by renaming the packages and directly added to the Groovy jar). I see here 2 options:
compile Groovy yourself and change the dependencies to have at least ASM 7.2. It does not matter if you build Groovy with a lower version of the JDK, the JDK still allows to read "old" jars.
use at least Groovy 2.5.9, 3.0.0 or 2.4.19, as they include asm 7.2 or higher
Of course this does not mean it will change the Groovy Gradle is using easily. For that I would use Groovy 2.5 and read Bumping Groovy version in Gradle?
If this does not solve the problem or answer the question I would need more details.
What happend:
I'm now working on a linux side-by-side installation issue since rpm no longer support to install the 32-bit and 64-bit same name packages on a machine at the same time. So I need to change the name of the 32-bit package from xxx.i386.rpm to xxx-32bit.i386.rpm. For supporting the upgrade of this package, I should provide the old package name: xxx in the spec file.
Problem:
I've looked into the pages of rpm.org looking for whether we can specify the version which we provided in the spec file like:
Provides: xxx = 16.0
I've done some test and it seems to work. But I can't find any offical explanation.
Does anyone else know the properly behaviour if I specified the provides package version in the Provides.
I'm putting aside that multilib is still supported by RPM (and I'm puzzled why are you doing that). But when i focus on that spec problem.
You have it nearly correct. Just omit that percent sign. Correct is:
Provides: xxx = 16.0
Note that the "16.0" should be just version. While it technically can be version-release, this will make you trouble some time later.
And if you want to provide really clean upgrade path, you should put there Obsolete too. See https://docs.fedoraproject.org/en-US/packaging-guidelines/#renaming-or-replacing-existing-packages
As far as I understand, "2" in "/lib/ld-linux.so.2" changes very rarely. There are old programs that can't work with new library and new programs that can't work with the old library. But they both refer to /lib/ld-linux.so.2, preventing installing both libraries.
BTW what are that version 'GLIBC_2.17' not found things? Why version is not in soname, but somewhere else?
Whenever a library is changed in a way that old programs do not work with the new version of the library this number is chaned. If old programs will still work with the newer library (and programs needing the new version will not cause a crash with the old library) there is no need to change the number because you can simply install the latest version of the library.
As far as I understand the "2" (it was "1" ten years ago) should not change any longer. The reason is simple:
The first version of "ld-linux.so.2" was written in a way that any version of "ld-linux.so.2" should work with any program using this file - maybe printing an error message when an older version of "ld-linux.so.2" is used.
This means: It is never necessary to install two different "ld-linux.so.2" files but it is enough to install the latest version of this file. You should not simply overwrite this file because it comes as a bundle with other files (e.g. "libc.so.6") that must have the same version.
In the "2" version of the loader .so files may contain a table of version numbers supported. So "libc.so.6", version GLIBC_2.16, may contain the information that "GLIBC_2.15" is also supported by this version of the library. (New versions should be backward compatible so this should be the case.)
Programs may contain a list of versions required (for example: a program requires libc.so.6 version "GLIBC_2.17"). The loader (ld-linux.so.2) checks if the library supports the version that is required by the program and refuses starting the program if not. In this case the error message form your question is printed by the loader.
There's a fix in one of the more recent versions of JAXB (2.2.1). I'm trying to determine if that's included in a recent update to Java 6. Is there a way to tell which which versions of a JVM/JRE/JDK contain which versions of JAX-WS/JAXB?
Looking at Sun/Oracle's site, I can view the release notes for the latest versions of Java SE 6, but I can't tell which versions of the XML libs are included. I guess I could download the latest JDK and run 'xjc -version', but there should be a better way (esp. if it was added in a previous release - I don't want to keep downloading JREs to tell which was the first with the version of JAXB I'm interested in).
To my knowledge, libraries are not upgraded on each released of the JDK/JRE, except in major versions. Even then, I don't think they cross the minor-version line.
And, to answer your unwritten question, this is the output from xjc -version on JDK 1.6.0_24:
xjc version "JAXB 2.1.10 in JDK 6"
JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB
2.1.10 in JDK 6)
2.1.10 was released on February 6th, 2009, which was updated in Java 6u14.
I am using MonoDevelop 2.2 from the Debian testing repository. I have installed the addins for GTK support, for version 2.8 and 2.10.
When I compile my solution, I get warnings saying Warning: Assembly 'glade-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f' not found. Make sure that the assembly exists in disk. If the reference is required to build the project you may get compilation errors. (ProCos)
The warning is perfectly alright, because the installed libraries do not offer V2.10 of glade-sharp. So I open the reference dialog, remove the reference and insert a reference to V2.8 of glade-sharp (which does exist). Close the reference dialog and recompile. And bang, same warning and the reference has been changed back to V2.10.
Anybody have any ideas how to fix this? Or is this a known bug in that version of MonoDevelop?
If you're using the GTK version support, all the GTK-related assemblies should have the same version. I suspect that if gtk-sharp.dll is 2.10, then MD will "fix" glade-sharp to 2.10 too. In project options is a dropdown for picking the GTK version; using this will update all GTK assemblies to a specific version.
Note also that you can use the project pad to set a reference to not require a specific version.
I suggest trying MD 2.4, and if it's still an issue, please file a bug report.