1

Here is package command description for cli. Can this command be executed via java sdk?

Cherry
  • 31,309
  • 66
  • 224
  • 364

1 Answers1

0

There is no direct equivalent in the SDKs, it's a CLI feature only. You can invoke it like any OS command, i.e

Runtime.getRuntime().exec(...)

See example in this answer: https://stackoverflow.com/a/3774444/7401700

Use the overloaded form:

public Process exec​(String[] cmdarray,
                    String[] envp,
                    File dir)
             throws IOException

Source: https://docs.oracle.com/javase/10/docs/api/java/lang/Runtime.html#exec(java.lang.String%5B%5D,java.lang.String%5B%5D,java.io.File)