x4e / PaperBin

An experiment at improving the performance of PaperMC
Other
96 stars 8 forks source link

error instantly after running start command #3

Closed stw222 closed 4 years ago

stw222 commented 4 years ago

OS is Ubuntu MATE 18.04.3 LTS with Linux kernel 5.2.11 64 bit

openjdk version "1.8.0_252" OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~18.04-b09) OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

server is running Paper version git-Paper-1618 (MC: 1.12.2) (Implementing API version 1.12.2-R0.1-SNAPSHOT) PaperBin 1.0

/home/hub/Minecraft# java -Xms1G -Xmx14848M -noverify -jar PaperBin.jar spigot.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: sun.tools.attach.WindowsVirtualMachine.init()V
        at sun.tools.attach.WindowsVirtualMachine.init(Native Method)
        at sun.tools.attach.WindowsVirtualMachine.<clinit>(WindowsVirtualMachine.java:192)
        at sun.tools.attach.WindowsAttachProvider.attachVirtualMachine(WindowsAttachProvider.java:69)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
        at dev.binclub.paperbin.utils.InstrumentationFactory.loadAgent(InstrumentationFactory.kt:73)
        at dev.binclub.paperbin.utils.InstrumentationFactory.access$loadAgent(InstrumentationFactory.kt:14)
        at dev.binclub.paperbin.utils.InstrumentationFactory$instrumentation$2.invoke(InstrumentationFactory.kt:23)
        at dev.binclub.paperbin.utils.InstrumentationFactory$instrumentation$2.invoke(InstrumentationFactory.kt:14)
        at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
        at dev.binclub.paperbin.utils.InstrumentationFactory.getInstrumentation(InstrumentationFactory.kt)
        at dev.binclub.paperbin.MainKt.main(Main.kt:27)

This could just be an issue of you developed it in windows and that this isn't meant for Linux

5HT2 commented 4 years ago

Use oracle JDK

fee1-dead commented 4 years ago

This is configured in a resource file META-INF\services\com.sun.tools.attach.spi.AttachProvider (typically this file exists in tools.jar). It will search CLASSPATH to get first occurrence of this resource file and read the AttachProvider implementation class from it. You might have installed an openjdk that is for windows, because on linux it should use sun.tools.attach.LinuxAttachProvider.

fee1-dead commented 4 years ago

Try to fix this by editing META-INF\services\com.sun.tools.attach.spi.AttachProvider in tools.jar image

stw222 commented 4 years ago

Can you explain how to do this to someone who doesnt know java programming?

Im taking an online class for how to use java but im not far into it yet.

Not sure where this tools.jar is

5HT2 commented 4 years ago

Try using Oracle jdk first, as the error you got is commonly related to that. If it doesn't help, the other person can explain I guess

fee1-dead commented 4 years ago

tools.jar is located in JDK_PATH/lib/tools.jar

fee1-dead commented 4 years ago

This should be a problem of your jdk installation. If you can't locate tools.jar please reinstall jdk and make sure that your jdk is built for linux. You should close this issue because it is not related to this project.

x4e commented 4 years ago

Sorry, this was my bad, Its fixed in the latest commit, I will create a release soon :)