How do you extract a JAR in a UNIX filesystem with a single command and specify its target directory using the JAR command?

前端 未结 4 674
囚心锁ツ
囚心锁ツ 2020-12-23 16:34

I am creating a Python script within which I am executing UNIX system commands. I have a war archive named Binaries.war which is within an ear archive named Portal.ear

4条回答
  •  佛祖请我去吃肉
    2020-12-23 17:03

    Can't you just change working directory within the python script using os.chdir(target)? I agree, I can't see any way of doing it from the jar command itself.

    If you don't want to permanently change directory, then store the current directory (using os.getcwd())in a variable and change back afterwards.

提交回复
热议问题