Answer the question
In order to leave comments, you need to log in
How to rename java to jar?
There is a test.java file with classes. You need to rename this file to test.jar format so that when you double-click the file opens. I tried via IntelegiIde c build artifacts. But it didn't work there. Tried via command line with
java -jar test.jar. It gave an error: Error: Could not find or load main class jdk Caused by: java.lang.ClassNotFoundException: jdk. Are there any other ways or where am I making a mistake?
Answer the question
In order to leave comments, you need to log in
"How to rename .txt to .exe so that it can be opened by double clicking?"
This is not called "rename", but "compile". I won’t tell you about your IDE, but in general, in general, it’s done like this:
Good afternoon.
I think you need to start by learning the basics.
jar is a java archive.
java is the file extension before compilation
class is the file extension after compilation (where the bytecode is stored)
Error: Could not find or load main class jdk Caused by: java.lang.ClassNotFoundException: jdk.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question