environment-variables

cd(1) and variables with spaces (cygwin)

人走茶凉 提交于 2019-12-23 15:54:19
问题 I've been having quite an unusual problem. In my .bashrc file, I have set a variable to a path name with spaces in it. I had a feeling this would cause problems, but I played around with setting an alias in a similar way and got it to work like so: alias npp="\"/cygdrive/c/Program Files (x86)/Notepad++/notepad++.exe\"" Now, I thought I could use the same trick for my environment variable - export PRO="\"/cygdrive/c/Program Files (x86)\"" This worked. Kind of. [myName] $ echo $PRO "/cygdrive/c

Docker compose doesn't recognize 'env_file'

馋奶兔 提交于 2019-12-23 15:25:20
问题 I am trying to run docker-compose up with the following configuration: php: image: php:7.0-fpm expose: - 9000 links: - nginx nginx: env_file: .env image: nginx:latest ports: - 80:80 - 433:433 environment: - NGINX_HOST: ${APP_URL} mysql: env_file: .env image: mysql:latest ports: - 3306:3306 environment: - MYSQL_ROOT_PASSWORD: ${DB_PASSWORD} - MYSQL_DATABASE: ${DB_DATABASE} - MYSQL_USER: ${DB_USERNAME} - MYSQL_PASSWORD: ${DB_PASSWORD} - MYSQL_ALLOW_EMPTY_PASSWORD: no I have an .env file in the

java.lang.RuntimePermission when running a applet from the web application

梦想的初衷 提交于 2019-12-23 14:56:52
问题 I'm trying to read a envrionment varaible from a applet, here is my code String env = System.getenv("TWS"); System.out.println(env); Runtime rt = Runtime.getRuntime(); String s = env + "\\WebStart.bat " ; System.out.println(s); try { Process p = rt.exec(s); } catch (Exception e) { } when i run the code from netbeans by right click and run, it is running without a problem. but when i put it to a jar file, add it to my web application and try to run it from a html page using the following code

Why are my custom process.env not working within dotenv?

一笑奈何 提交于 2019-12-23 12:57:19
问题 Learning that it is a bad practice to include API secret keys I've done some research and trying to learn how to create custom process.env . After reading: Node.js Everywhere with Environment Variables! How to set NODE_ENV to production/development in OS X How to set process.env from the file in NodeJS? dotenv file is not loading environment variables I'm trying to set an env file locally based on process.env.NODE_ENV . The application would be hosted on Heroku and in my .gitignore I have dev

Changes via SetEnvironmentVariable do not take effect in library that uses getenv

社会主义新天地 提交于 2019-12-23 12:56:35
问题 I have a simple c# application that is binding to a library compile with mingnu compiler toolset. I can easily call the functions in the library without issue. However the library calls getenv to set itself up this environment variable needs to be set for the library to work correctly so I am using Environment.SetEnvironmentVariable however the library cannot retrieve the value I have set. 回答1: getenv makes a copy of the environment variable block of the process on startup. Any subsequent

Changes via SetEnvironmentVariable do not take effect in library that uses getenv

半世苍凉 提交于 2019-12-23 12:55:11
问题 I have a simple c# application that is binding to a library compile with mingnu compiler toolset. I can easily call the functions in the library without issue. However the library calls getenv to set itself up this environment variable needs to be set for the library to work correctly so I am using Environment.SetEnvironmentVariable however the library cannot retrieve the value I have set. 回答1: getenv makes a copy of the environment variable block of the process on startup. Any subsequent

commons-exec: Executing a program on the system PATH?

↘锁芯ラ 提交于 2019-12-23 11:49:34
问题 I'm trying to execute a program (convert from ImageMagick, to be specific) whose parent folder exists on the path. Ergo, when I run convert from the command line, it runs the command. The following, however, fails: String command = "convert" CommandLine commandLine = CommandLine.parse(command); commandLine.addArgument(...) ... int exitValue = executor.execute(commandLine); If I specify the full path of the convert executable ( C:\Program files\... ) then this code works. If I don't do this, I

Should environment variables that contain a executable-path with spaces also contain the necessary quotes?

我与影子孤独终老i 提交于 2019-12-23 10:58:55
问题 When defining an environment variable (on Windows for me, maybe there is a more general guideline) set MY_TOOL=C:\DevTools\bin\mytool.exe if the tool is located on a path with spaces set MY_TOOL=C:\Program Files (x86)\Foobar\bin\mytool.exe should the environment variable already contain the necessary spaces? That is, should it read: set MY_TOOL="C:\Program Files (x86)\Foobar\bin\mytool.exe" instead of the above version without spaces? Note: In light of Joeys answer, I really should narrow

Should environment variables that contain a executable-path with spaces also contain the necessary quotes?

。_饼干妹妹 提交于 2019-12-23 10:57:04
问题 When defining an environment variable (on Windows for me, maybe there is a more general guideline) set MY_TOOL=C:\DevTools\bin\mytool.exe if the tool is located on a path with spaces set MY_TOOL=C:\Program Files (x86)\Foobar\bin\mytool.exe should the environment variable already contain the necessary spaces? That is, should it read: set MY_TOOL="C:\Program Files (x86)\Foobar\bin\mytool.exe" instead of the above version without spaces? Note: In light of Joeys answer, I really should narrow

Java default version doesnt reflect after PATH change

戏子无情 提交于 2019-12-23 09:17:26
问题 I am running currently on Java 1.7.0_17 64bit version and I want to launch an app using Java 32 bit version. I updated PATH variable to point to (C:\Program Files (x86)\Java\jre7\bin) Java 32 bit version. Then did a java -version it still shows the 64bit version. I gave up and tried to do a java -d32 -jar abc.jar and then it gives me an java -d32 Error: This Java instance does not support a 32-bit JVM. Please install the desired version. Please let me know how can the system refresh the