Computer Science, asked by prathameshdhuri, 1 year ago

java jre provides which command that is needed to execute java application

Answers

Answered by QGP
1
Here's the command:
/bin/java.exe -jar Executable.jar
If you want to run a program: Let's assume name of your program is Brainly.java

To compile it, go to command prompt and type:

javac Brainly.java

If it shows error, check your program.

This command creates a Brainly.class file in the directory where your program is stored.

When it is successfully compiled, then you can execute it by the following command:

java Brainly


Yes, here you don't need to type Brainly.java ; you need to type only filename.


QGP: Correction in first sentence: Name of your program is Brainly.java
QGP: I edited the answer for that matter
Similar questions