setenv variable with spaces in launchd.conf?

前端 未结 5 939
栀梦
栀梦 2021-01-02 07:58

I\'m a Linux user that just recently got a mac. I\'m trying to set up my IDE and found out that Macs don\'t use .bashrc / .bash_profile / etc. for GUI apps. So, if you have

5条回答
  •  醉话见心
    2021-01-02 08:37

    Try using launchd instead (create plist /Library/LaunchDaemons/java.props.plist):

    
    
    
    
        Label
        java.props
        ProgramArguments
        
            launchctl
            setenv
            JAVA_OPTS
            -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8
        
        RunAtLoad
        
        KeepAlive
        
        LaunchOnlyOnce
        
    
    
    

    This will run once and set your environment up. Hope it'll help.

提交回复
热议问题