-6

I am able to compile the java program but not able to run it. The problem is that java cannot open the .cfg file which is part of JRE 8.

problem of running the program

2
  • Do you have permissions to read jvm.cfg? Commented Mar 22, 2020 at 6:28
  • 1
    Advice for the future: HOW TO COPY A TEXT FROM COMMAND LINE WINDOW: 1) Press Ctrl+A to select all text. 2) Press Enter to copy it to clipboard. 3) Paste it here, surround it with 3 backtick marks ` Commented Mar 22, 2020 at 6:46

1 Answer 1

0

Firstly check if you have permission for running jar. Then check it your runtime is same as JDK.

Check if you are typing command correctly: java -jar file.jar Edit: It seems like your .cfg file doesn’t exist or it’s corrupted. Check it and try rebuild it. If it didn’t work you have syntax error somewhere int cfg file.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.