-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Use classpath option #943
Comments
That worked fine for me:
from debug output:
|
For the classpath option to work you need to give it the main class of your program, -jar and -classpath at the combined do not work |
Good point, they usually can't but so far Java 16 might be allowing it. |
What you're encountering is different than what used to happen when combining classpath and jar arguments. What exact Also, I'm curious what why you're needing to add to the classpath. Maybe there's a different way to solve the original use case. |
Hello, i need the classpath option in order to load additional libraries (e.g mongodb and redis drivers) for my plugins. I've solved it now by editing the the start-minecraftFinalSetup. But of course, that isn't ideal. My suggestion would be to add kind of a "RUN_COMMAND" environment variable or something similar so that other people who have a similar problem won't have to create fat jars. |
What does your modification look like? Also, what plugin(s) are you using? I'm wondering why they're not doing things like shading the client libraries in with their own plugin jar. |
The plugins are our custom-made ones, I didn't shade the libraries because I found this to be a more maintainable way if one library needs an update, otherwise I would have to recompile every plugin. The modification is just a swap of - jar with -cp and the main class that comes after the classpath declaration at the end of the file where the start command is executed. |
While what you're asking is an easy change, I am not happy about adding it since the usability quickly gets challenging. Someone has to extract the
and even then launching with
Now I have to add the I have never heard of a plugin/mod requiring You're also welcome to build an image that extends from this one. I'll leave this issue open to think about it some more. |
You're right, adding such an option would certainly drive up complexity, its probably a better option for everyone to just modify the start script as i did for one's own purposes. |
This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open. |
Hello, how can i use the -classpath option? Whenever i pass it to the server using JVM_OPTS, the server complains about the passing of a non existing 'j' option. This is probalby due to -jar getting appended to the end of the command. Is there a solution for this?
The text was updated successfully, but these errors were encountered: