Comments (13)
I patched ScriptCraft to work with GraalVM with the GraalJS JavaScript engine.
Tested under Win10, GraalVM R21.2.0, SpigotMC R1.17.1.
You may try it using the fork https://github.com/ediloren/ScriptCraft. Includes instructions in the updated 'ReadMe'.
from scriptcraft.
This is likely because your java version is greater than java 8.
You can check this by typing "java -version" into a command prompt.
Java versions greater than 8 will get this error because they don't come with javascript pre-installed anymore.
Personally, I have 2 JDKs installed, one for scriptcraft and one for everything else.
Whenever I want to run my scriptcraft server at the command prompt, I specify the right version of java by running this command:
in a powershell terminal. Note that I'm using the ` key to escape the space character in "Program Files".
from scriptcraft.
same. nothing about a js engine in docs but i guess you could try installing node somewhere?
from scriptcraft.
5650c49
that commit fixed it. you need to compile it yourself. I would do it for you but it's good practice not to use a version a random person (me) from the internet compiled cuz there is no way you can trust me to not put malware in it
from scriptcraft.
This is likely because your java version is greater than java 8.
You can check this by typing "java -version" into a command prompt.
Java versions greater than 8 will get this error because they don't come with javascript pre-installed anymore.Personally, I have 2 JDKs installed, one for scriptcraft and one for everything else.
Whenever I want to run my scriptcraft server at the command prompt, I specify the right version of java by running this command:
in a powershell terminal. Note that I'm using the ` key to escape the space character in "Program Files".
It's not working for me.
Still have the same error like author. "No JavaScript Engine available".
Using jdk1.8.0_271
.
Note: you can write Progra~1
or Progra~2
than Program` FIles.
from scriptcraft.
@quartze Hmm, weird. Just for sanity's sake, when you enter "C:\Progra~1\Java\jdk_1.8.0_271\bin\java -version" you get the expected version number, right?
In that case, I would try uninstalling and reinstalling java? Not certain what your issue might be if it still persists.
from scriptcraft.
I'm having the same issue. When I run /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java -version
, the result() is:
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_275-b01)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.275-b01, mixed mode)
So I get the right version of java. And I just installed it today(used jdk 15 before).
I have a feeling I might have to explicitly add a javascript engine, like grall or nashorn.
from scriptcraft.
@Tacoalarmclock well you're using openJDK, rather than oracle's normal jdk. That might be your problem (as although OpenJDK and oracle's jdk are functionally the same, I don't know if OpenJDK comes with javascript prepackaged as well)
from scriptcraft.
5650c49
that commit fixed it. you need to compile it yourself. I would do it for you but it's good practice not to use a version a random person (me) from the internet compiled cuz there is no way you can trust me to not put malware in it
I'm having the same issue. How could I compile this myself?
from scriptcraft.
There is a build in the zip file release here: https://github.com/Magikcraft/MagikCraft/releases
from scriptcraft.
As I poorly understand java, problem is that Spigot server needs at least java 16, but javascript engine (Nashorn) was removed in java 15.
I have no idea how to solve it
- either how to build spigot only to use java 11 (latest version with Nashorn)
- or how build scriptcraft with another javasript implementation (GrallVM?)
from scriptcraft.
Everyone youll not regret it to fix that use java 8.0.302-open you can install with sdkman
from scriptcraft.
Reinstall spigot server with command:
java -jar -Xmx1G -Djdk.net.URLClassPath.disableClassPathURLCheck=true BuildTools.jar --rev 1.16.5
openjdk-8-jdk needed
from scriptcraft.
Related Issues (20)
- How to detect if user has a group? HOT 1
- Post install problem: '/js up()' causes ScriptException HOT 4
- Run on a client PC/website, or backend only? HOT 2
- Switch license to GPL-3.0 HOT 7
- No JavaScript engine in release 3.4.0
- Has anyone tried PaperMC with ScriptCraft? It states it is a drop in replacement for CraftBukkit and Spigot. HOT 4
- exports.name = function () {} vs function name() {} HOT 1
- Can SCJS be used on a home PC or only on a remote server? HOT 3
- Will NodeJS support come in? HOT 2
- Update to spigot-1.17.jar: No JavaScript Engine available (mac) HOT 6
- Does not work with GraalVM R21.2.0 - java type error HOT 3
- [scriptcraft] No JavaScript Engine available. ScriptCraft will not work without Javascript. HOT 1
- Console only responds with "/js Javascript code" HOT 2
- how to run HOT 3
- How to use with MC 1.18.2 HOT 5
- Stuck at Step 3 of Install HOT 1
- Is it possible to use npm packages in script craft? HOT 2
- Engine Error HOT 1
- Does this support node 20.2.0? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scriptcraft.