-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for AsTeRICS running with Java 11 #323
Open
deinhofer
wants to merge
6
commits into
master
Choose a base branch
from
fixes4java11
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The upgrade was necessary due to a missing constraint java.net.ssl error when starting the grizzly-*-2.3.23.jar service. The new version was modularized even more, e.g. the osgi console is not included by default. We could later think to remove it again, by removing * ../bin/ARE/org.eclipse.equinox.console_1.3.300.v20190516-1504.jar and its dependencies As of JDK 11 many APIs (e.g. javax.xml, javax.activation, javax.servlet,...) were removed from the core, that's why we need to add them manually. Some of them are added in another commit for the WebService service. The following links were very helpful in finding the solutions and appropriate replacement jars: * https://docs.oracle.com/en/java/javase/11/migrate/index.html#JSMIG-GUID-C25E2B1D-6C24-4403-8540-CFEA875B994A * https://download.eclipse.org/equinox/
Links helping to find the solution: * https://www.jesperdj.com/2018/09/30/jaxb-on-java-9-10-11-and-beyond/ * http://openjdk.java.net/jeps/320 * eclipse-ee4j/jaxb-ri#1222 Here are some other useful infos about important changes between Java 8 and Java 11 * http://openjdk.java.net/jeps/260 * https://docs.oracle.com/en/java/javase/11/migrate/index.html#JSMIG-GUID-C25E2B1D-6C24-4403-8540-CFEA875B994A
… not the case with Java 11 any more
* Unfortunately had to change alle build.xml files because the name of the file is hardcoded. * A more elegent solution would have been to centrally define a property in imported.xml which is used in each build file, but unfortunately the import of the files is at the end of the build.xml files and hence other property values need for the file path definition would not have been set at that time of evaluation. * APE: Here we had to fix the bin/APE/template/imported.xml file also to fix the name of the osgi-jar file to use when running an AT-solution * ARE_RestAPIlibraries/JavaLibrary: Here we also had to include the jaxb-replacement jars into the classpath. I also deleted the jar files of JavaLibrary/lib and used the ones of ARE/services/WebService instead to avoid having duplicate jar files in the repository.
* This fix uses the java11 branch (https://github.com/NeuronRobotics/nrjavaserial/tree/java11) of the nrjavaserial project, which fixed the segmentation fault when using Java 11 on windows. * Unfortunately, I could not apply the patch (NeuronRobotics/nrjavaserial@a190730) with get_long_var to the asterics-specific rxtx-version (https://github.com/asterics/AsTeRICS/tree/master/ARE/RXTX) for windows because that version does not have such a function but has other fixes which provide support for Serial devices over Bluetooth which is used e.g. for the HidActuator device. * Ideas for fixing the problem * skip support for serial over bluetooth * switch to JSSC: https://github.com/scream3r/java-simple-serial-connector * try to debug the lib and fix it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR provides a runnable version of Asterics with Java 11 (tested with Linux and Win10, Oracle JDK 11).
Here are some useful infos about important changes between Java 8 and Java 11
da9be4e
Conclusion
Due to the modularization of Java since Java 9, and the removal of some APIs and other changes, there had to be done the following fixes:
Upgrade of Eclipse Equinox OSGI engine to version 3.14
The upgrade was necessary due to a missing constraint java.net.ssl error when starting the grizzly-*-2.3.23.jar service.
The new version was modularized even more, e.g. the osgi console is not included by default. We could later think to remove it again, by removing ../bin/ARE/org.eclipse.equinox.console_1.3.300.v20190516-1504.jar and its dependencies
As of JDK 11 many APIs (e.g. javax.xml, javax.activation, javax.servlet,...) were removed from the core,
that's why we need to add them manually.
Some of them are added in another commit for the WebService service.
The following links were very helpful in finding the solutions and appropriate replacement jars:
Manually added JAXB dependency for webservice service as Java 11 does not ship it any more
Links helping to find the solution:
Fixed crash of rxtx library (cimcommunication) with Java 11 on Windows