How to edit environment variables In Windows 8.1 - windows-8.1

I am trying to mod Minecraft and the YouTube tutorial I'm watching is on Windows 10, I'm on Windows 8.1.
The thing is they're editing environment variables. So what? I think. They tell me to create a variable called JAVA_HOME, Done.
So, the problem? They're editing the PATH variable, and they get a window coming up, and they add a variable to the multiple others there. But when I try to, It comes up with a single line that is already taken, so I can edit that.
At the moment I can`t mod it because of that reason. Any help would be greatly appreciated.

Refer the first answer here. Environment variables for java installation
Make sure you resart your system for the system to recognize your environment variables changes.

Related

Configure node with .noderc

I feel like this is a silly question but I can't get node to run a .noderc file, not even to just log to the console and not even on linux where I would expect everything to work.
My use case is that for work I have to use Windows and npm has installed modules to a particular location (%HOME%\AppData\Roaming\npm\node_modules\), whereas the default module.paths in node does not include that directory. I am fine with the location, so I don't want to fix this on the npm end of things. I have easily fixed the issue by appending this path to modules.paths, so the real solution should be for me to add that to an rc file.
I tried making a .noderc in my Windows home directory, and to my surprise it seems to not be running. I did the same on my personal laptop running a linux distro (~/.noderc) and the same thing happens. A log to console or definition of a test var does not show up in the REPL.
Is there something obvious I am missing? Usually programs have a hierarchy they run through, with default configs, a system level config file (if it exists), and a user level config file (if it exists). In the case of a program like X, they are executed in order and overwrite options, where as in something like bash, they are checked in reverse order and the first one found is executed (it is common for the first line of a user level bash config to source the system level one). How does node function?
EDIT:
In the comments below where I link to an old SO thread I noticed that there is a bit of a hack involving an alias to get the .noderc to work. So I guess a better question is, how are things like module.paths configured in node? There must be a way not involving a full rebuild.
As there has been no answer for over 10 days, I am going to just post my workaround form the comment above. It looks like there is no node config file. Any further info on that welcome. In order to solve my particular problem, I used the NODE_PATH environment variable.
I personally prefer to use use config files and not environment variables for scripting issues that need to be addressed every time. Config files are always read automatically, while using an environment variable requires you to always remember to add the variable or to permanently add the variable to your environment (which clutters the environment). I prefer to restrict environment variables to specific variations from the default. However, as I said, I can't find a config file for node.

python os.getenv('APPDATA') returns none - os.environ does not have APPDATA listed in the data dictionary

What happened here? Why did this disappear? It was working fine earlier today. I can look in the windows environment variables and see it listed there still for system and user environemtn variables, but it no longer shows up in the python command. I deleted the .pyc file as well, but still no go? How do I get it back?

Intellij IDEA and Gradle Wrapper on Windows / Linux

I don't want to download the wrapper from the internet -- that is, the DistributionUrl I set is local. I have an absolute path (can't be relative) for both Windows and Linux, but they're slightly different.
Does anyone have any suggestions as to how I can set up Gradle/IDEA in such a way that my wrapper will work for both platforms?
Can I set up two wrappers? Through IDEA?
Something that can be done with an init script? Does IDEA recognize these?
I tried creating a wrapper task with both .properties file set ups, but IDEA ignores it.
Thanks.

$VIM location wrong on Windows 7

for some reason my $VIM location on this Windows machine I am using points to /etc. Is there a way to change this? I don't know where it would be to change this so it is looking in the correct location. Thank you.
Vim will use an environment variable for $VIM, if one is defined. Check if you have a %VIM% environment variable defined. If you do, it may have been set by cygwin or a similar program, so be sure any Vim installation in there still works without this variable before removing it permanently.

Find: Parameter format not correct

I keep hearing this is a path issue with cygwin. It is prevent emacs from working within my cygwin. When I execute find on the cli (not bash/cygwin) I get the same error not matter what I type. I've read this is a problem with path creation within cygwin and that it should be prepending itself to the path. As you can see it is doing that.
Here is my /etc/profile
PATH=/usr/local/bin:/usr/bin:/bin:$PATH
export PATH
Problem is that as everyone else stated, emacs is using find.exe provided by windows. To change this, you need to change your %userprofile%.emacs file.
As nobody else states (even faq!), this file is not created automatically anymore. Go into Options > Save options the mini-buffer (one line at the bottom of emacs) will tell you where the file is being written to.
Go in there and add this line (You've installed cygwin at c:\cygwin, right?):
(setq find-program "C:\\cygwin\\bin\\find.exe")
You may need to restart Emacs for this to take effect.
Just add this line to you .profile
alias find='/cygdrive/c/cygwin/bin/find.exe'
Oddly-enough, I needed to use
(setq find-program "/bin/find.exe")
instead.
But thanks for the suggestion Drew.
Adding a setq find-program [msys2 or git path] in my init file, as suggested (I tried different forms), didn't work for me. "C:\Windows\System32\find.exe" is first in the path if I type where find in eshell and I didn't find how to remove it, only how to add others, which doesn't solve the problem.
So I share here the more radical, but working (also in Powershell), solution I used: replacing the find.exe in "C:\Windows\System32" with the one from "C:\msys64\usr\bin". I kept the old file in case, but so far so good. You need to change the permissions for this operation (see here how to gain full control, but I suggest only applying this to the file, not the whole folder, and putting things back after ;)).

Resources