pokiuwu / v203.4

MapleStory v203.4 Fork of MapleEllinel
MIT License
70 stars 73 forks source link

new ScriptEngineManager().getEngineByName("JavaScript") returns null - JDK 15 Removed Nashorn Javascript Engine #9

Closed azim92 closed 3 years ago

azim92 commented 3 years ago

Hi, since JDK 15 had removed nashorn javascript engine, currently all skills will return ScriptEngineManager.getEngineByName("JavaScript") as null.

https://github.com/pokiuwu/v203.4/blob/d339a9b12ba517e43079694961589936e0fa5cd4/src/main/java/net/swordie/ms/client/character/skills/info/SkillInfo.java#L44

Quick solution for this is by adding the below dependency in the pom.xml for those who are using Java 15 and above.

<!-- https://mvnrepository.com/artifact/org.openjdk.nashorn/nashorn-core -->
<dependency>
    <groupId>org.openjdk.nashorn</groupId>
    <artifactId>nashorn-core</artifactId>
    <version>15.3</version>
</dependency>