Is your feature request related to a problem? Please describe.
Almost all Paper servers currently run on Java 8 which was released six years ago in 2014 which is slightly more than half a decade. Using Java 8 prevents developers from taking advantage of the new features and advancements in the language that have been made since then and makes the development experience extremely painful. Furthermore, the servers themselves do not benefit from the performance gains in recent Java versions.
Although Java 8 is still supported, it doesn't mean that it should be considered the baseline. It would be less disruptive to push for adoption of newer versions early while Java 8 is still supported rather than a chaotic scramble when Java 8 is has reached/reaching the end of the road.
It is the goal of this feature to encourage server owners and hosts to adopt modern Java versions.
Describe the solution you'd like
At start-up, a warning prompting the user to update the Java version will be displayed if the Java version is outdated. ~This is in addition to a 20 seconds delay~.
EDIT: Seems like people really hate having a delay
Example warning prompt:
*** Warning, this server is currently running on Java 8 which is outdated and unrecommended ***
*** Please consider updating to Java 11 from https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot ***
The warning message ~and delay~ can be disabled via the IHateNewSoftware property similar to the IReallyKnowWhatImDoingISwear property for outdated Spigot builds. The impact on maintenance introduced by this feature is negligible as it only requires that the Java version check to be bumped when a new Java version is released. Ideally, a new build to bump the Java version will be published independently of new MC updates.
The following issues still need to be addressed
Describe alternatives you've considered
_Do nothing_
Java 8 will continue to be supported until 2023 allowing server hosts and owners more time to update at their own pace. This will discourage developers from utilizing features introduced in the interim lest servers refusing to use their plugins due to the minimum Java version required.
_Compile Paper against a more recent JDK_
Strong-arming server hosts and owners to update their Java overnight is too disruptive, not to mention, a golden ticket to earn their ire. It may even cause a decrease in the adoption of Paper.
Additional context
This was originally requested upstream in Spigot but was rejected due to them not wanting to disrupt the current ecosystem.
Uh.. No.
We've already ripped out Spigot's startup delays, why would we want to put more in? This is stupid and pointless.
Thumbs down.
inb4 "don't use paper it breaks on java8"
What about just a warning instead?
:+1:
Not only would this allow for plugin developers to use many of the new features, it's also better for server admins too since we would make them aware that new versions exists and that performance is actually considerably better thanks to jvm improvements over the years.
@others, now that the delay is out of question, are you still :-1: in this?
I feel like a simple warning (without an extra startup delay or actually compiling against a newer Java version) would be similarly reasonable to the "Please use Paper" log from paperlib - it's free improvements/features and very little cases actually preventing you from upgrading, so why not tell the people that it exists, just like it's done with Paper?
I think a warning would be adequate. An alternative approach would be instead of a 10 second wait like with BungeeCord we could do something like 2 seconds that way it isn't as much of a headache to people who don't wanna add the startup flag. Either way I'm in support of some kind of message with/without a delay.
I think it's appropriate to check for Java 11 (LTS), not 13.
Should check for LTS or latest tbh., then just send a message explaining why updating might be of benefit for the server (e.g. better performance) and the potential issues (plugin incompatibility). Adding a new startup delay would be pretty dumb though.
Can I take it that most people who are for this prefer recommending LTS releases i.e. Java 11 instead of the latest available version, i.e Java 13?
I'm iffy on such a change, for one, we literally already have people who completely dismiss the existing update warning
And yea,, recommending LTSes is the better option, especially if we're tryna caux hosting providers into following, they're much more likely to bother with an LTS which retains support for a few years, vs say, java 13 which is going to lose support in 2 months
I'm iffy on such a change, for one, we literally already have people who completely dismiss the existing update warning
That鈥檚 true but there鈥檚 still a percentage of people who will be willing to heed such a warning, that alone I believe is enough justification to add the warning.
Since there has been an announcement on Discord regarding bumping the minimum Java version to 11 for Minecraft 1.17, would it be better to warn users earlier (maybe from the start of next year or something)?
See eb89fd5deabcaf7ab044f8f7953dde5c6e5c1ce1
Ah my apologies, didn鈥檛 see that commit, feel free to ignore my comment.
Most helpful comment
I feel like a simple warning (without an extra startup delay or actually compiling against a newer Java version) would be similarly reasonable to the "Please use Paper" log from paperlib - it's free improvements/features and very little cases actually preventing you from upgrading, so why not tell the people that it exists, just like it's done with Paper?