Not able to set ENV LUA_PATH No such file or directory - lua

I am working on open source LUA project. It has some modules and submodules. I am trying to set LUA_PATH env. But it always fails with error.
bash: ./user_modules/shared_testcases/?.lua: No such file or directory
Command I used is:
set LUA_PATH /usr/local/share/lua/5.2/?.lua;./user_modules/shared_testcases/?.lua

You need to quote the path:
set LUA_PATH '/usr/local/share/lua/5.2/?.lua;./user_modules/shared_testcases/?.lua'
Otherwise, as you have seen, the shell tries to expand the ?
in the path.

Related

I have deleted my path variable in Environment variable how can I now add MinGw compiler

I have deleted my path variable in Environment variable how can I now add MinGw compiler.How can I now add path for MinGw compiler in my device .Pls Help....
Personally I never add the location of the MinGW compiler to my PATH. The main reason is that I sometimes use different MinGW/MinGW-w64 toolchains on the same system.
You can open a Command Prompt or MSYS2 shell and add the MinGW's bin location to the PATH for just that session.
In Command Prompt that would look like:
SET PATH=C:\MinGW\mingw32\bin
or in MSYS2 shell:
export PATH=/C/MinGW/mingw32/bin:$PATH
Or if you use an IDE you can specify the path there, so that also doesn't require a global PATH environment variable setting. See https://winlibs.com/#usage-codeblocks for an example on how to do this with MinGW-w64 and Code::Blocks.

can't set path for javac

I've put in an embarrassing amount of time reading threads here and elsewhere, I cannot compile HelloWorldApp.java
Using Windows 7
the location of the script is C:\Users\Phil\Desktop
the location of javac is C:\Program Files\Java\jdk1.8.0_77\bin
In Environment Variables, in both User and System Variables, I have clicked NEW, and given the "Variable Name" as javac and "Variable Value" as `
C:\Program Files\Java\jdk1.8.0_77\bin;
`
I have tried to make this work based on the 2 different ways here (to no avail): https://docs.oracle.com/javase/tutorial/getStarted/problems/
I am failing to set a path, or tell computer where to find it from within cmd. What am I doing wrong?
just you have to do set temporary path set path=C:\Program Files\Java\jdk1.7.0_45;
or
change your Environment variable path
to
variable name=%path%
variable value:\Program Files\Java\jdk1.7.0_45;
then open cmd and run javac command to check
Okay, so I have solved my problem:
In Environment Variables, the "Variable Name" must be: PATH
The Variable value is: C:\Program Files\Java\jdk1.8.0_77\bin
Now It works!

Javac is not being recognized even after setting the class path variable

My problem is that I have set the bin path in Class path variables. After that
Command Prompt is recognizing "java" command but "javac" program is still not being recognized.
Make sure you are pointing to the "bin" directory of the jdk and NOT jre. Also, as Juned answered, you need to open a new command line after you update the environment variable in "PATH"
Assuming you have set the jdk/bin folder path to your system PATH variable.
Just make sure you re-open the command line because an open command line does refresh itself with the new environment params.
After adding jdk/bin to your PATH, simply launch a new command prompt and type javac, java magic should start happening.
Adding C:\Program Files\Java\jdk1.8.0_121\bin to Path environmental variable should be done. But you shouldn't insert any space between the previous ; and the path of bin folder:
Path: c:\some name\.....\; C:\Program Files\Java\jdk1.8.0_121\bin ==>WRONG
Path: c:\some name\.....\;C:\Program Files\Java\jdk1.8.0_121\bin ==>OK

bash_profile and the PATH variable

I have the following in my bash_profile to automatically run the smlnjinterpreter:
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/smlnj-110.74/bin:${PATH}"
export PATH
Additionally I would also like to run theswi prolog interpreter by adding its path at:
\opt\local\bin
How can I set the PATH variable to check both or is there a better way?
Why does Petite Chez Scheme require no PATH or environment variable settings? That is, when I type petite into the terminal the petite chez scheme interpreter starts automatically.
How can I set the PATH variable to check both?
This is one way, not necessarily the best way
items=(
/Library/Frameworks/Python.framework/Versions/2.7/bin
/usr/local/smlnj-110.74/bin
/opt/local/bin
)
for item in ${items[*]}
do
PATH=${item}:${PATH}
done
export PATH
Why does Petite Chez Scheme require no PATH or environment variable settings?
Perhaps it installs to a standard location, such as
/bin, /usr/bin, /usr/local/bin

Setting LD_LIBRARY_PATH in Cygwin

I am following the tutorial : http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.html
when I reach the part where I am supposed to set the library path :
Unix or Linux:
LD_LIBRARY_PATH=`pwd`
export LD_LIBRARY_PATH
Windows NT/2000/95:
set PATH=%path%;
Neither of these work in cygwin. I keep getting an error when trying to run my program.
Cygwin doesn't use LD_LIBRARY_PATH, it looks for shared libraries in PATH, so try:
export PATH=`pwd`:$PATH
That will add the current directory to the front of the PATH.
Is that
LD_LIBRARY_PATH=$(pwd)
and you just messed up the html, or are you really running:
LD_LIBRARY_PATH=pwd
If the latter, try adding the $() to get the current working directory into the path. Also, you can
echo $LD_LIBRARY_PATH
to ensure it contains what you want. You might consider doing
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
to avoid discarding previous contents of the path.

Resources