File tree Expand file tree Collapse file tree
src/main/java/pw/yumc/MiaoScript Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 <modelVersion >4.0.0</modelVersion >
33 <groupId >pw.yumc</groupId >
44 <artifactId >MiaoScript</artifactId >
5- <version >0.23.0 </version >
5+ <version >0.23.1 </version >
66 <developers >
77 <developer >
88 <id >502647092</id >
5050 <properties >
5151 <env .GIT_COMMIT>DEV</env .GIT_COMMIT>
5252 <update .changes>
53+ §622-06-21 §afeat: 兼容 1.7.10-1.19 版本;
54+ §afeat: 兼容 JDK17 BungeeCord;
5355 §622-05-25 §afeat: 兼容 1.7.10-1.18.2 版本;
5456 §622-05-21 §afeat: 优化 框架加载逻辑;
5557 §622-05-20 §afeat: 调整 require 主包逻辑;
Original file line number Diff line number Diff line change 88import java .nio .file .Paths ;
99
1010public class MiaoScriptAPI {
11- public static final String VERSION = "0.23.0 " ;
11+ public static final String VERSION = "0.23.1 " ;
1212 private static String root ;
1313 private static String libPath ;
1414 private static ScriptEngine scriptEngine ;
Original file line number Diff line number Diff line change @@ -35,7 +35,11 @@ public MiaoScriptEngine(String engineRoot) {
3535 }
3636
3737 private void loadGraalJS (String engineRoot ) {
38- this .engine = this .parentLoadNetworkNashorn (engineRoot );
38+ try {
39+ this .engine = this .parentLoadNetworkNashorn (engineRoot );
40+ } catch (Throwable ex ) {
41+ this .engine = this .loadNetworkNashorn (engineRoot );
42+ }
3943 if (this .engine == null ) {
4044 this .engine = this .loadNetworkGraalJS (engineRoot );
4145 }
@@ -56,7 +60,7 @@ private void loadNashorn(String engineRoot) {
5660 ex .printStackTrace ();
5761 }
5862 try {
59- if (this .engine == null && engineRoot != null ) {
63+ if (this .engine == null ) {
6064 this .engine = this .loadNetworkNashorn (engineRoot );
6165 }
6266 } catch (final Throwable ex ) {
You can’t perform that action at this time.
0 commit comments