home - Games with children
Add to the system variable path. SET command - working with Windows environment variables. History of App Paths

PATH is an environment variable and is a list of folders that is used by the operating system to search for executable files (*.EXE). In practice, if the folder is added to PATH, executable files can be run from the command line without specifying the full path to them.

  • To see a list of folders included in the PATH variable, simply type PATH on the command line.
  • You can add a folder to PATH using the Windows GUI. To do this, open the system properties dialog box (WIN+PAUSE), on the tab Additionally press the button Environment Variables, in the system variables section, select PATH and press the button Change.

As part of Windows auto-installation, we are, of course, interested in the issue of adding a folder to PATH from the command line during system installation.

PATH Command

This command adds the specified folders to PATH, but the changes are valid only during the current command session(i.e. if you run this command from a batch file, the added folders will only be in PATH for as long as it runs).

Path=%PATH%;"%systemdrive%\system32\mytools";"%programfiles%\Opera"

pathman utility

pathman /as "%systemdrive%\system32\mytools";"%programfiles%\Opera"

Advice. You can collect all your favorite command line utilities into one folder and add it to your PATH. In the example above, my utilities are collected in %systemdrive%\system32\mytools.

AutoIt script

;what path should be added to the Path variable$addtopath=@ProgramFilesDir&"\7-Zip" ;retrieve the current contents of the Path variable$curpath=RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path")

Variable PATH is a system variable with which the operating system finds the necessary executable objects on the command line or terminal window. The variable parameter contains a list (separated by semicolons) ; ) directories in which the executable file will be searched when calling the command from the console.

In the operating system Windows system variable PATH can be set using the system utility in Windows Control Panels.

Let's describe how to change the value of a variable PATH in the operating system Windows 10.

On the menu Start execute the command System(Control Panel → System and Security → System):

Click on the link Advanced System Settings:

Open the Environment Variables window:


In chapter Environment Variables And System Variables select the environment variable PATH. Click Change. If the variable PATH does not exist, click Create.

To change system environment variables, you must have the appropriate rights. If there are none, you should create a user variable.


In the window " Change environment variable" (or New system variable) specify the value of the environment variable PATH, then confirm the action by pressing the button OK.


If you use a variable PATH not for the command line, but for other applications, for example PHP module, you should restart your computer. This section concerns:
  • Platforms: Solaris SPARC, Red Hat Linux, SUSE Linux, Oracle Linux, Windows 10, Windows 8, Windows 7, Vista, Windows XP, Mac OS X

The instructions on this page are intended only for experienced users and system administrators.


General information

  • Variable PATH is a system variable that the operating system uses to find the desired executable objects on the command line or terminal window.
  • System variable PATH can be set using system utility in the Windows Control Panel or using the Linux and Solaris shell startup file.
  • On computers running Windows or Mac OS X making changes to the PATH system variable usually not required.

Windows

Windows 10 and Windows 8
  1. In the "Search" line, search for: System (Control Panel)
  2. Click on the link .
  3. Click Environment Variables. In chapter Environment Variables Change
  4. In the window (or New system variable OK OK.
Windows 7
  1. On the desktop, right-click on the icon Computer.
  2. From the context menu, select Properties.
  3. Click on the link Advanced System Settings.
  4. Click Environment Variables. In chapter Environment Variables select the PATH environment variable. Click Change. If the PATH variable does not exist, click Create.
  5. In the window Changing a system variable(or New system variable) specify the value of the PATH environment variable. Click OK. Close other open windows by clicking OK.
  6. Reopen the command prompt window and run the java code.
Windows XP
  1. Click Start, select Control Panel, double click on System and select a tab Additionally.
  2. Click Environment Variables. In chapter Environment Variables select the PATH environment variable. Click Change. If the PATH variable does not exist, click Create.
  3. In the window Changing a system variable(or New system variable) specify the value of the PATH environment variable. Click OK. Close other open windows by clicking OK.
  4. Reopen the command prompt window and run the java code.

Mac OS X

To run another version of Java, provide the full path or use the java_home tool:

% /usr/libexec/java_home -v 1.8.0_73 --exec javac -version

Solaris and Linux

  1. To see if the path is configured correctly:
    In terminal windows, enter:
    % java -version
    The version of the java tool will be displayed if it cannot be found. If the version is outdated or an error appears java: command not found, then the path is set incorrectly.
  2. Determine which executable version of java is the first one found in a variable PATH
    In a terminal window, enter:
    % which java
Final path setup

To set the path permanently, configure it in the startup file.
Note. Instructions are provided for the two most popular shells on Linux and Solaris. If you are using other shells, see the tutorial on setting the PATH variable.

Bash shell

Edit the startup file (~/.bashrc)

  1. Change a variable PATH variable
    PATH=/usr/local/jdk1.8.0/bin:$PATH
    export PATH
  2. Download the startup file
    %. /.profile

  3. % java -version
C shell (csh)

Edit the startup file (~/.cshrc)

  1. Set the path
    set path=(/usr/local/jdk1.8.0/bin $path)
  2. Save changes and close window
  3. Download the startup file
    % source ~/.cshrc
  4. Make sure the path is set by repeating the java command
    % java -version

Today we are telling you how to add a new $PATH variable in the macOS (OS X) operating system.

If you are tired of entering certain commands in the macOS Terminal every time through ./team , then you need to add an environment variable. That is, you need to enter the full path to the utility command in the file .bash_profile .

How to find out the full path to a command?

There are two options to find out the full path where the utilities with the corresponding command are located.

Using the additional menu

Right-click on the folder where the command is located and when the context menu appears, press the ALT (OPTION) button and “Copy path to”.

Using a terminal

Drag the folder with the command into the “Terminal” and then you can copy the full path.

How to add an environment variable on macOS?

There are also 4 options - the first is to open the file .bash_profile using Finder and entering the path, the second and third and fourth using the terminal:

Add a variable to the file .bash_profile from Finder

Open your home directory ( / Users/your_name ), enable and open the file with a text editor .bash_profile .

Add the following entry to the file:

Add an environment variable in macOS using Terminal and text editor

Open a terminal and write the following command:

open -a /Applications/TextEdit.app ~/.bash_profile

A window with a text editor will open, you just need to add an entry

export PATH=$PATH:/your/path/to/command/

Close the text file, you're done!

Add an environment variable in macOS using the Terminal

Open a terminal and run the command:

echo "export PATH=$PATH:/your/path/to/command/" > .bash_profile

All is ready!

Add an environment variable in macOS using Terminal and nano

Before you begin, familiarize yourself with the work. Open a terminal and write the command:

nano ~/.bash_profile

add entry:

export PATH=$PATH:/your/path/to/command/

Save the entered data.

Do you still have additional questions? Write them in the comments about what you did or vice versa!

That's all! Read more useful articles and instructions in the section. Stay with the site, it will be even more interesting!

Instructions

Right-click on the My Computer icon located on your desktop or Start menu. In the context menu that appears, select the bottom line “Properties” - a new “System Properties” window will open. You can also open the System Properties window by pressing the Windows + Pause Break hotkey combination. If you are using the Windows 7 operating system, then also right-click on the “My Computer” icon, select “Properties”, and then select “Advanced system settings” on the left side of the properties window.

In the “System Properties” window, go to the “Advanced” tab by left-clicking on it - you will see three sections of additional system settings. Below them there will be two more buttons - “Environment Variables” and “Error Report”. You need environment variables - click on the appropriate button.

The Environment Variables window contains two categories of variables, one being User Environment Variables and the other being . Find the path variable in the list of system variables and select it by clicking the left mouse button.

Now, with the path variable selected, click on the “Change” button located under the list window - a small “Change system variable” window will open, where two input lines will be located - “Variable name” and “Variable value”. Change the value of the path variable to whatever you want.

Another way to change the value of the path variable is as follows: in the “Environment Variables” window, click on the “Create” button, then in the window that opens, in the “Variable Name” field, enter “path” and in the “Variable Value” field, enter the desired value. This will change the current value of the path variable to the one you just entered.

Video on the topic

An environment variable called Path is used by operating system components and applications installed on it to obtain directory addresses in which to search for executable files. Some addresses are present in this variable by default and the user cannot change them, but he can add (“write”) additional addresses to it.

Instructions

Right-click the “My Computer” icon on the desktop and select “Properties” from the pop-up context menu. The same can be done with the “Computer” item in the main menu of the operating system on the “Start” button. Or you can simply press the win + pause hotkey combination - any of these actions will launch the OS component called “System Properties”.

Go to the “Advanced” tab of the window that opens and click the “Environment Variables” button located at the bottom. Another window will open with two tables placed in it - the operating system installation you need is placed at the top (“User Environment Variables”). Select the line that has the word Path in the “Variable” column, and then click the “Edit” button under this table. As a result, a third and final dialog box will open with the title “Changing a user variable” and two fields to fill out.

Enter the desired path in the “Variable value” field. If it already contains any entry, add a new one to the right, separating it from the existing one with a semicolon (;). In order not to make a mistake in writing the full address to the desired directory, it is better to copy the path to it in Windows Explorer - open it (win + e), go to the desired folder, select the full path in the address bar of the file manager (ctrl + a), copy (ctrl + c), return to the dialog box and paste the contents of the clipboard (ctrl + v) into the Variable Value field.

Leave the value in the “Variable Name” field unchanged (Path should remain there) and click OK. After this, successively press the same OK buttons in the other two open windows. This completes the procedure for adding a new value to the Path variable.

Video on the topic

All Nokia mobile phones are made on the S40 and S60 platforms. This means that java machines are automatically integrated on them. Therefore, to install a J2ME application on such a phone, you just need to copy it to the phone's built-in memory or to a memory card.

Instructions

Launch the Internet browser of your Nokia mobile phone to install Java. You need to download the JAR file. For other phones, you would also need to download the JAD file. However, due to the greater demand for this particular file type, it will be easier for you to download it.

Please note that automatically, along with the JAD file, a JAR file will also be downloaded to your phone. Use the phone's built-in browser if it is based on the S40 platform. This is necessary so that after downloading the file will be automatically installed. Those. installing Java is no longer necessary. Go to the "Games" or "Applications" section. In the list of programs you will find the newly installed file.

Do the following to install the Java application if yours has a memory card. Turn off your phone. Remove the memory card from it. Take a card reader. Use it to connect your phone memory card to your computer. Copy all the Java applications you are interested in to the appropriate folder. After this, remove the memory card correctly and insert it into the phone.

Do the following if your phone is based on the S60 platform. Launch your mobile phone's built-in browser. Download the required JAR or JAD file. You can also use a third-party browser, such as Opera Mobile, Opera Mini or some other. The thing is that the built-in browser will automatically save the file to the UCDownloaded folder, and with a third-party browser you can set any folder as the save location on the memory card of your mobile phone.

For correct installation, remove the memory card from your mobile phone. Using a card reader, connect it to your personal computer. Then install the JAR file into the applications folder on the memory card. The installation does not take long and should not cause any complications. After it is completed, remove the memory card and insert it into the phone.

The operation of setting an environment variable can be performed by the user using standard tools of the Microsoft Windows operating system and does not require the use of additional third-party software.

 


Read:



The easiest way to bewitch a guy How to bewitch someone to like without consequences

The easiest way to bewitch a guy How to bewitch someone to like without consequences

Quite often you hear stories about unhappy love, when a guy is drawn to continue walking or to another girl who acts as a homewrecker...

What is the compatibility of Scorpio and Pisces in a love relationship?

What is the compatibility of Scorpio and Pisces in a love relationship?

Now many people believe in horoscopes - probably because they constantly find confirmation of their correctness in real life. Horoscopes are very often...

Pisces and Scorpio compatibility of signs in love relationships, marriage and friendship

Pisces and Scorpio compatibility of signs in love relationships, marriage and friendship

These partners share the same element - water and thus have a sensitive understanding of each other's minds and hearts. Scorpio is very deep and...

Cooking corn porridge according to the best recipes

Cooking corn porridge according to the best recipes

Corn grits are an energy product that is sold in all Russian grocery stores. Unfortunately, he doesn't use much...

feed-image RSS