When force setting parameter -server-port when launching the server file (e.g.: java -Xms512M -Xmx1G -jar server.jar nogui --server-port 27602 ) the server doesn't start because of this error:
[22:37:21] [main/FATAL]: Failed to start the minecraft server java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap') at net.minecraft.server.v1_14_R1.PropertyManager.c(PropertyManager.java:132) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44] at net.minecraft.server.v1_14_R1.PropertyManager.a(PropertyManager.java:148) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44] at net.minecraft.server.v1_14_R1.PropertyManager.a(PropertyManager.java:172) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44] at net.minecraft.server.v1_14_R1.PropertyManager.getInt(PropertyManager.java:189) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44] at net.minecraft.server.v1_14_R1.DedicatedServerProperties.<init>(DedicatedServerProperties.java:66) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44] at net.minecraft.server.v1_14_R1.DedicatedServerProperties.load(DedicatedServerProperties.java:105) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44] at net.minecraft.server.v1_14_R1.DedicatedServerSettings.<init>(DedicatedServerSettings.java:17) ~[minecraft_server.jar:git-Spigot-0c02b0c-e879c44] at net.minecraft.server.v1_14_R1.MinecraftServer.main(MinecraftServer.java:1130) [minecraft_server.jar:git-Spigot-0c02b0c-e879c44] at org.bukkit.craftbukkit.Main.main(Main.java:201) [minecraft_server.jar:git-Spigot-0c02b0c-e879c44]
Other parameters like -log-limit 262144000 or -server-ip 82.208.17.29 work properly
This error prevents server hostings in proper setting where they're required to use specific ports on servers and not let users to change this setting.