kaklakariada / portmapper

A tool for managing port forwardings via UPnP
GNU General Public License v3.0
697 stars 90 forks source link

Error "A Java exception has occurred" #135

Open lemaximedu66 opened 2 months ago

lemaximedu66 commented 2 months ago

image very descriptive thx java lmao

image

kaklakariada commented 2 months ago

Hi @lemaximedu66 ,

It looks like you are using an old version of Java. Please download a newer version, for example 21 from https://adoptium.net/temurin/releases/?package=jre and install it.

kaklakariada commented 2 months ago

If this does not work, please start PortMapper on the command line:

java -jar portmapper.jar

This should output a more helpful error message.

lemaximedu66 commented 2 months ago

idk why but it works with the "java" command wtf

lemaximedu66 commented 2 months ago

image

im confused

lemaximedu66 commented 2 months ago

Hi @lemaximedu66 ,

It looks like you are using an old version of Java. Please download a newer version, for example 21 from https://adoptium.net/temurin/releases/?package=jre and install it.

i updated it less than 1-2 months ago

kaklakariada commented 2 months ago

OK. It looks like your Windows uses two different Java versions: it uses Java 8 when double clicking the .jar file, but the Path environment variable points to java command from Java 19.

You could

  1. Uninstall Java 8 and Java 19 and install Java 21 and try to double click again
  2. Create a small .bat file containing the java -jar command und use that for starting PortMapper.
lemaximedu66 commented 2 months ago

thats weird cuz when you go on java.com it makes you download the first version (the java 8 thing) and i think the other is called Java Developpment kit or something and it isn't offered on java.com and i also think minecraft won't run on jdk

kaklakariada commented 2 months ago

That's strange. Java 8 is deprecated since a long time and not supported any more. I recommend downloading from https://adoptium.net/temurin/releases/?package=jre&os=windows

PortMapper needs Java 11 or later.