#JVM "A Java Exception occured"
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
es. However, when I try to run it on a different machine, I get the error message "A Java Exception occurred". Can anyone help me understand what might be causing this issue?
This error message typically indicates that there is a problem with the Java Virtual Machine (JVM) on the machine where you are trying to run your application. There could be a number of reasons for this error, such as:
-
The JVM version on the other machine may be incompatible with your application. Make sure that the JVM version installed on the other machine is compatible with the version of Java you are using to develop your application.
-
There may be missing or corrupted Java runtime files on the other machine. Try reinstalling Java on that machine to see if that resolves the issue.
-
It is also possible that there is a problem with the classpath or environment variables on the other machine that is preventing your application from running correctly.
-
Check if there are any specific dependencies or configurations required for your application to run properly on different machines.
By investigating these possible causes, you should be able to identify and resolve the issue causing the "A Java Exception occurred" error message when running your application on a different machine.
are you using the IJ terminal?
No, the Windows 11 Terminal.
try using your OS's shell, such as the Command Prompt or PowerShell on Windows
hmm
so changes are, the file association for your jar isnt proper, if it's only occuring when double clicking the jar
when running in terminal, its using what is on your path
but when double clicking, it uses the file association (what you select when "Open With" pops up)
What should I set so it runs properly?
try right clicking the jar, choosing "Open With", then select the java version you used to compile
Ok, there are jdk1.8.0_201, jdk-21, jre1.8
did you compile with jdk 21?
I think so, where can I check it again?
which version is your IDE using?
IntelliJ IDEA 2023.2.6 Community Edition
my bad, i mean what version of java is your ide using
check project structure
@ashen arch
Your question has been closed due to inactivity.
If it was not resolved yet, feel free to just post a message below
to reopen it, or create a new thread.
Note that usually the reason for nobody calling back is that your
question may have been not well asked and hence no one felt confident
enough answering.
When you reopen the thread, try to use your time to improve the quality
of the question by elaborating, providing details, context, all relevant code
snippets, any errors you are getting, concrete examples and perhaps also some
screenshots. Share your attempt, explain the expected results and compare
them to the current results.
Also try to make the information easily accessible by sharing code
or assignment descriptions directly on Discord, not behind a link or
PDF-file; provide some guidance for long code snippets and ensure
the code is well formatted and has syntax highlighting. Kindly read through
https://stackoverflow.com/help/how-to-ask for more.
With enough info, someone knows the answer for sure 👍