-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Compiled Java plugins do not work #405
Comments
I've found the issue. The class bytecode-viewer/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java Line 172 in b5664b2
This is fine and all, but what it then does is not. It loads the ASCII string and copies it to a file (after which it tries to load it as a plugin): bytecode-viewer/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java Lines 190 to 193 in b5664b2
This only works for source files that are ASCII. Converting binary (ZIP, JAR, etc.) files to strings will corrupt it, that is self-explanatory. - DiskWriter.replaceFile(tempFile.getAbsolutePath(), area.getText(), false);
+ Files.copy(savePath, tempFile); I used bytecode-viewer/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java Line 65 in b5664b2
bytecode-viewer/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java Lines 172 to 180 in b5664b2
bytecode-viewer/src/main/java/the/bytecode/club/bytecodeviewer/plugin/PluginWriter.java Lines 254 to 260 in b5664b2
|
|
Gradle compiled plugin results in:
Using any archiving program to add classes into ZIP/JAR:
same result as Gradle
Using
javac
andjar
to compileTemplate.java
to a JAR:Loading the plain
Template.java
file:Works! (different loader strategy:
JavaPluginLaunchStrategy
)TLDR:
CompiledJavaPluginLaunchStrategy
is broken.The text was updated successfully, but these errors were encountered: