Now I'm using Padre IDE. Since I am using that, It uses different perl.exe file to run the code.
But by default perl.exe path is set to C:\Perl\bin\perl.exe. I want to change this path to IDE path. How to change this ?
This path is save in environment variable PATH (Advanced System setting->Advanced->Environment Variables).
The search path is stored in the PATH environment variable. The path to the IDE version is either missing or comes after 'C:\Perl\bin' in the list.
At the command line, you can view the setting with this command:
echo %PATH%
If it's just missing, this command will add the one you want to the front of the list:
setx PATH "Path\To\IDE\Perl;%PATH%" /m
Actually, that should work in any case - nothing should break because of a duplicated entry in the list.
Related
I am trying to get Java and Prolog to work together (on OS X 10.11.1). What I want, is just to input my Prolog Queries from Java.
When I run Java code such like
PrologProcess process = Connector.newPrologProcess();
process.queryOnce(query);
I get the following Error:
java.io.IOException: Cannot run program "swipl": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
...
First I did was adding entries to my PATH variable as I suppose that SWIProlog could not been found, but it showed no effect.
My PATH contains:
/opt/local/lib/swipl-7.2.3/
/opt/local/lib/swipl-7.2.3/bin
/opt/local/lib/swipl-7.2.3/bin/x86_64-darwin15.0.0/swipl
/opt/local/lib/swipl-7.2.3/bin/swipl.home
/Applications/SWI-Prolog.app/Contents/swipl/lib/jpl.jar
/Applications/SWI-Prolog.app/Contents/swipl/bin/x86_64- darwin15.0.0/swipl
/Applications/SWI-Prolog.app/Contents/swipl/
/Applications/SWI-Prolog.app/Contents/
Hope somebody knows whats up.
Any ideas?
Several of your PATH entries make no sense. Try on Terminal.app window:
$ which swipl
That will tell where the swipl executable is located. As it seems that you also have installed the SWI-Prolog.app GUI application, the correct path to the executable is:
/Applications/SWI-Prolog.app/Contents/MacOS/
Also note that Mac OS X GUI applications don't run on top of a shell and thus don't inherit the environment variable definitions that you use for command-line commands. But Eclipse allows in one of its preferences panel to define environment variables there.
Download binary packages on https://www.playframework.com/documentation/2.0/Installing gives me a play-2.0 folder with play exec file. However running play on that same directory using console returns
play: command not found
My environment is MAC and I tried
chmod a+x play
while running into the same problem
Can someone give me a guide on the installation process?
When we run a command, the shell look for this file (command) in a list of directories (folders). This list of directories is stored in a enviroment variable called PATH. If you want to see the values inside PATH. You can run:
echo $PATH
Note that the folders are separated by :.
The problem you are facing is because the shell can't find a dir that contains the file play. This happens because the play's dir is not in PATH
You can add play's dir to your PATH by running
export PATH=$PATH:/path/to/your/play/dir
This is a temporary thing. After you exit your shell session you will loose it. To make it permanent you need to edit the .bash_profile file in your home folder and add this command in the end of the file and save it.
Not able to install plugin its showing the below error...
C:\devbox>vagrant plugin install 'vagrant-hostmanager'
The directory where plugins are installed (the Vagrant home directory)
has a space in it. On Windows, there is a bug in Ruby when compiling
plugins into directories with spaces. Please move your Vagrant home
directory to a path without spaces and try again.
Ruby (language used by Vagrant) has "issues" with directory names that contain spaces.
Vagrant will use an environment variable (supplied by windows) to tell it where your user directory is (so it can decide where to put your "home" directory). But you might have a space in your user name (I do) which causes a problem for ruby (which is doing the work to install the plugin).
The solution is to move your project to a project directory you choose that doesn't have any spaces in the directory name. Then, use an environment variable called VAGRANT_HOME and set it to a specified directory. The plugin installation procedure will check for the existence of this variable and use it if it exists instead of locating a home directory within the windows current user directory.
I created a folder called home within C:\Hashicorp\Vagrant and used that (C:\Hashicorp\Vagrant\home).
Setting windows environment variables is not hard (rather trivial actually) - you can find out how here: http://www.computerhope.com/issues/ch000549.htm
You'll have to do a restart to your system for it to take effect (it all worked after a reboot for me).
I've found a slight variation to the #Reinsbrains answer. In order to have a home directory without spaces within its name. I created a junction to my user/home directory. In my case I decided to go with a Linux style structure, but any location would work. In an admin command prompt:
mkdir c:\home
mklink /j c:\home\maarten "c:\users\Maarten Bicknese"
Next set the VAGRANT_HOME environment variable to the newly created junction.
setx VAGRANT_HOME c:\home\maarten
Fire up a new command prompt and you're good to go!
I can't figure out how to copy a file in Windows Dos up multiple directories. Basically I want to replicate this linux command for windows
cp ../../../Dir/Item.o Item.o
Basically I need to copy an item that is up 3 folders from a folder called "Dir" into my current directory. I use this (in linux) as part of a build step and would like to do the same for windows. I have tried changing ".." and it didn't work.
Any help will be appreciated.
It's is almost the same on Windows. You need the correct command, and you need to use back slash instead of forward slash
copy ..\..\..\Dir\Item.o Item.o
copy ..\..\Dir\Item.o .
You need to use the back-slash as directory separators. . denotes the current directory
I'm trying to install a font for use with TCPDF. To do so, I need to run the included command line utility ttf2ufm. (Included with TCPDF in fonts/utils/ttf2ufm) When I run it though, I get the error -bash: ttf2ufm: command not found. I'm probably just overlooking something simple, but I've searched and can't find what I'm missing here.
Should mention I'm using Debian Lenny.
Perhaps you do not know how commands are executed in bash.
If the program is not in the path, you need to specify the path to get it to run.
If you are in the right directory.
.../fonts/utils/ $ ./ttf2ufm ....
Note the ./ in front of it, that gives the file a path, in the present working directory, or the full path will work, or any other relative path. Just using ttf2ufm on its own will not, as the current directory is not usually part of the executable path.
Additionally, the program will need its executable bit set.