-
Notifications
You must be signed in to change notification settings - Fork 168
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
update for support of modern JDKs #113
Open
fabrice-ducos
wants to merge
26
commits into
luaj:master
Choose a base branch
from
fabrice-ducos:master
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
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
…jme and compile-jse New versions of ant (e.g. 1.10.11) at this time of writing fail to build jar-jme because the source (1.2) and target (1.3) are considered too old. The jme target can now be compiled separately with 'ant jar-jme' and the jse target with 'ant jar-jse' The jse target will now be built with source="1.8" and target="1.8"
…eger, new Double...) Replaced with valueOf() in order to silence many warnings from modern versions of the JDK
… to ensure repeatable builds by ant
Internal classes create, resume, ..., yield, wrap renamed Create, Resume, ... Yield, Wrap This change was motivated by the fact that yield is a restricted name in JDK 14+ A lowercase 'yield' class was producing a warning in JDK 8 and could potentially not compile in newer JDK.
…cted symbol fixed (it was returning a strange character corresponding to an internal token code, meaningless to the user)
…ed from 1.2, 1.3 or 1.4 to 1.8
-target 1.4 -> -target 1.8 <param name=java_version value="1.4+"/> -> <param name=java_version value="1.8+"/>
Replaced the deprecated, non generic Hashtable with generic Map (interface) and HashMap (implementation) Hashtable h -> Map<LuaValue, Integer> h this.h = new Hashtable() -> this.h = new HashMap<>()
…generic HashMap to non generic Hashtable for JME portability
Store Integers directly in h (instead of String): this.h.put(v, Integer.valueOf(idx)) -> this.h.put(v, new Integer(idx))
Store Integers directly in RESERVED (instead of String): Integer.valueOf(FIRST_RESERVED+i) -> new Integer(FIRST_RESERVED+i)
joko-prasetyo
approved these changes
Apr 12, 2024
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.
The official luaj repository still relies on very old versions of Java and JDK (<= 1.4). It supports JSE (Java Standard Edition) and JME (Java Micro Edition, for embedded Java).
For personal needs, I have updated it to modern versions of Java (8+) and JDK in this fork. The fork has been tested successfully on several modern operating systems (Windows 10, Linux Ubuntu 21.04, MacOSX Monterey 12.6).
Unfortunately, because of limitations of JME (generics are not, and probably will never be implemented in JME, as well as StringBuilder that is now required for concatenation of strings in modern Java), the support of JME had to be removed from the fork. The code for JME is still there (and it is possible to try to compile it optionally, but it will likely not pass) and is not planned to be removed in the near future.
JME is not actively developed anymore by Oracle and should be considered a legacy technology.
This pull request is provided as is, in the hope it might be useful for the maintainers of the official luaj repo. However, since the support of JME has been dropped in the fork (at least temporarily), they may consider not integrating these changes. This will be at the cost of staying at obsolete versions of Java (< 5).