0

In Windows 8.1 I have an environment variable LATEX equal to

C:\Program Files\MiKTeX 2.9\miktex\bin\x64

and the path variable set to

%JAVA_HOME%\bin;%ANT_HOME%\bin;%LATEX%

The problem is that the LATEX folder is not visible from command line IF i don't put the trailing semicolon. If I check the path from command line it says

PATH=C:\Program Files\Java\jdk1.8.0_11\bin;C:\Program Files\apache-ant-1.9.4\bin;%LATEX%

But when I put the trailing semicolon it works.

It is not the first time I'm setting the PATH variable and I don't remember putting the trailing semicolon before. How come it works with the semicolon and not without it?

  • 1
    If I can venture a guess without setting up a full test environment I would say that the semi-colon removes the folder/file confusion caused by the period (aka full stop) in MiKTeX 2.9. But yes, you're right... a trailing semi-colon is not usually a requisite. – Jeeped Nov 3 '14 at 8:26
  • Right now I'm not able to test this, maybe by renaming the MiKTeX 2.9 folder, but I'm curious to know the reason for this strange behavior. Thanks. – MSX Nov 3 '14 at 8:30
  • 1
    @Jeeped - That can't be the issue. You can have any number of dots within a folder name, and it will work fine within PATH. – dbenham Nov 3 '14 at 20:27
  • I'm wondering if a subsequent command is appending another path to your PATH, without an intervening ;. This would cause your path to run together with the next value, and of course it will not work. The fault would be with the subsequent command. – dbenham Nov 3 '14 at 20:29
  • @dbenham - You're right of course. I had been thinking that a trailing ; was necessary to 'close' the folder path with the period but I just tested it out on a command window and that was not the case. I'm leaning toward your idea that some additional folder structure is appended to the %PATH% variable after-the-fact. – Jeeped Nov 3 '14 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.