issue compiling actions java 8
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 13
- Joined: Tue Mar 16, 2021 10:01 pm
issue compiling actions java 8
Hi,
I have a very strange issue I cannot figure out:
I am developing oxygen actions in java and include these actions via classpath for oxygen 23. The actions are compiled on archlinux using java 1.8 (https://archlinux.org/packages/extra/x8 ... 8-openjdk/). I also specifically specify 1.8. in the pom file. This used to work until a couple of days ago, i received this error (relevant part in english) when trying to add these actions from the framework action panel:
As I couldn't figure out the problem, I reinstalled eclipse on a new virtual machine where I only have the newest java version as well as java8 installed and switched default to java8. I was able to recompile the actions yesterday, which solved the error. I also added some other actions and included them in the framework.
Today, for no apparent reason, I again received the error. There is no way the jar file cloud have been cimpiled with java 9 (I think that is 53.0?), as it is not installed, and I did not change anything in eclipse. It is also very weird that the actions work in oxygen; I just can't add them in the framework action panel.
Any ideas? Many thanks
I have a very strange issue I cannot figure out:
I am developing oxygen actions in java and include these actions via classpath for oxygen 23. The actions are compiled on archlinux using java 1.8 (https://archlinux.org/packages/extra/x8 ... 8-openjdk/). I also specifically specify 1.8. in the pom file. This used to work until a couple of days ago, i received this error (relevant part in english) when trying to add these actions from the framework action panel:
Code: Select all
...framework\jar\bdts-actions.jar - Die Klassen wurden mittels einer neueren Version des JAVA-Compilers kompiliert, als die aktuell installierte.
module-info has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Today, for no apparent reason, I again received the error. There is no way the jar file cloud have been cimpiled with java 9 (I think that is 53.0?), as it is not installed, and I did not change anything in eclipse. It is also very weird that the actions work in oxygen; I just can't add them in the framework action panel.
Any ideas? Many thanks
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: issue compiling actions java 8
Hello,
My best guess it's the same issue as this:
xxx-ditamap-framework.jar - The classes were compiled using a newer version of the Java compiler than the one currently
In short, the build system you're using is adding this module-info.class to the jar, even though you've specified Java 8 for compilation. Your classes are compiled with Java 8 but this info class is compiled with Java 9 compatibility and added to your jar.
This shouldn't be an actual issue in practice since this particular class is Java 9+ specific, so not needed in Java 8. You are getting an error in Oxygen in the framework action panel because Oxygen browses all classes from the jar and encounters one it cannot load (when running with Java 8 ).
Regards,
Adrian
My best guess it's the same issue as this:
xxx-ditamap-framework.jar - The classes were compiled using a newer version of the Java compiler than the one currently
In short, the build system you're using is adding this module-info.class to the jar, even though you've specified Java 8 for compilation. Your classes are compiled with Java 8 but this info class is compiled with Java 9 compatibility and added to your jar.
This shouldn't be an actual issue in practice since this particular class is Java 9+ specific, so not needed in Java 8. You are getting an error in Oxygen in the framework action panel because Oxygen browses all classes from the jar and encounters one it cannot load (when running with Java 8 ).
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service