0

I have a jar file. I am running this jar file by creating a process. So, what is the difference between running it through command prompt without creating a process? Will it affect the application's performance?

David Oliván
  • 2,717
  • 1
  • 19
  • 26
ganesh
  • 43
  • 6

1 Answers1

0

If your application requires you to run the jar file as a command in a separate process from your java application,It's the way to go.There is no question of performance. However when you launch command prompt through Runtime.exec(),command line will be executed as a sub-process or a separate process in a random layer. I'd rather recommend you to use ProcessBuilder,however it's a different topic.

For difference between Runtime.exec() and ProcessBulilder please go through this

Community
  • 1
  • 1
Ankit Tripathi
  • 405
  • 4
  • 13