0

Here is the scm command : lscm show Operations -u fgh4jor -P 56yuiop -r localhost Now my motive is that how to call above scm command programmatically in java ? Is it Possible?

Thanks in advance!!

Rajat Krishnan
  • 111
  • 2
  • 9
  • Of course its possible, but do you want to run it from the installed native libraries? Off the `PATH`? PS. Don't recommend sharing ur username or password... hopefully that is just trash string. – SGM1 Dec 23 '19 at 16:10
  • Don't worry its just a dummy parameters,i want to run it off the path – Rajat Krishnan Dec 23 '19 at 16:15
  • I mean my question is that in scm cmd line i am passing four parameter i.e username,password, repository uri and stream name and the command is "lscm show operations -u **** -P ******. -r localhost Stream_Name" Now how can i call this particular scm command line in java programmatically, consider the path for scm.exe is C:\scmtool\eclipse/scm.exe – Rajat Krishnan Dec 23 '19 at 19:22
  • You want to use `ProcessBuilder`: https://www.mkyong.com/java/java-processbuilder-examples/ or https://stackoverflow.com/questions/35837355/java-simple-process-builder-issue . But also make sure you check if its on a unix system and error handle correctly if you plan to share it. This assumes the executable is installed on the system. If this isn't a safe assumption, things will get more complicated, but still possible. – SGM1 Dec 23 '19 at 22:14

0 Answers0