pieter12345 / javaloader Goto Github PK
View Code? Open in Web Editor NEWA Bukkit plugin which allows loading, unloading and compiling java projects in runtime.
A Bukkit plugin which allows loading, unloading and compiling java projects in runtime.
So I have been getting the error message "No java compiler available. This plugin requires a JDK to run on. Disabling plugin" when using the plugin on my server. Here is a picture of the stacktrace:
My path variable was pointing to the wrong Java executable. The server was running on JRE. My PATH variable was pointing to JRE and JDK in the wrong order.
I removed the JRE from the PATH variable. This allowed it to point to the JDK
Maybe the error message could include "is the server running on JRE instead of JDK?" or "you have to run the server with JDK."
P.S. @Ecconia found the reason for the stack trace.
"The project manager is not set in onEnable due to the error, which causes an NPE in onDisable."
Currently, depending on a plugin usually happens through:
jar -PROVIDED ./../../../myPlugin-1.0.6-SNAPSHOT.jar
When updating a plugin that is being depended on, the file name of that plugin usually changes, breaking the dependency link.
The proposal is to support:
plugin myPlugin
Which will use the Bukkit API to obtain the jar file belonging to that plugin.
When a project is deleted from the file system, JavaLoader will remove it on command usage.
This is fine, if the intention is to unload the project.
But if the intention is to recompile a project, it should not unload the project, as it will not be able to perform its task to recompile and enable the project again.
This becomes relevant if the project needs to be loaded most of the time.
If a mess up happens and for whatever reasons the folder does not exist anymore.
It would be fatal to disable the project.
Recompile should only ever unload a project if it was able to successfully compile it.
When project A
depends on project B
, recompiling project B
is only possible by first unloading project A
manually. This becomes a larger issue if more projects depend on project B
.
c
(compile) flag argument to the recompile command that, when set, will automatically recompile direct and indirect dependents.r
(reload) flag argument to the recompile command that, when set, will automatically unload and load direct and indirect dependents (unload before unloading B
and load after loading B
).B
change, but this is the responsibility of the programmer.These solutions allow the programmer to recompile any project with the choice to reload or recompile and reload dependents using a single command, while maintaining availability for players and without missing synchronized events.
The /javaloader recompile [project]
command automatically performs a clean (removing all generated binaries) and a build (generate new binaries). However, once binaries have been generated, there is no way to remove them through commands. Removing binaries can be useful to prevent JavaLoader to load a project until it has been recompiled.
Proposal:
Add a /javaloader clean [project]
command that removes the binaries for the given project or (optionally) all projects.
The compile fails because the JavaLoader packages cannot be found in the project.
Using JDK 8 doesn't cause these issues.
Currently when new commands are added to a project the recompile is not able to add these to the players command registry.
This leads to the players not seeing the new command and even getting an error when typing it. It however perfectly works.
Whenever JavaLoader detects, that a plugin added a command or removed one, or it loads/unloads a project with commands, it should call the method syncCommands()
in the class CraftServer
.
This method is private and needs to be accessed via reflection.
It creates a new list of all commands and sends that list to all players and new ##players.
When adding a command into a JavaLoader project, and recompile this project, players can right away see this command in their tabcompletion (if its conditions are met).
Proposal:
Add a /javaloader enable/disable [project]
command that sets the given or (optionally) all project disabled state(s). This disabled state would prevent JavaLoader and its users from loading or recompiling the project until it has been enabled again. This disabled state should be persistent through restarts, which could happen through a .disabled
file in the project directory.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.