Computer Science, asked by genius263, 7 months ago

31. How can you provide parameters to a program during
execution time?​

Answers

Answered by zack1706
2

Explanation:

To pass arguments to the jar:

java -jar myjar.jar one two

You can access them in the main() method of "Main-Class" (mentioned in the manifest.mf file of a JAR).

String one = args[0];

String two = args[1];

Similar questions