"javac is not recognised" after setting the path - javac

I already set the path in advanced settings. but when i compile a program it says
javac is not recognised.. 'javac' is not recognized as an internal or
external command, operable program or batch file.

Related

Unable to run MiniZinc from command line - Even after adding installation location to PATH

Initially, I had the error: minizinc is not recognized as an internal or external command, operable program or batch file. when running minizinc mzn-cbc model.mzn data.mzn in the Git CMD.
Later on, following the instructions found at https://github.com/MiniZinc/libminizinc/issues/213 with suggestions from https://groups.google.com/forum/#!topic/minizinc/IFpUM_TSNGU, I did: export PATH=$PATH:{MINIZINC} where {MINIZINC} is the installation location. However, my terminal returned the error: 'export' is not recognized as an internal or external command, operable program or batch file. This also happens when I tried running the above with the windows command prompt..
Is there a way to go about solving this?
If it helps, the folder in which MiniZinc is installed looks something like this on my computer:
I'm afraid the instruction given in the GitHub issue only works within bash and derived shells. By default Windows uses batch instead. To change the PATH system variable, which is what it is called on Windows, you need to take different steps. They are explained here: https://java.com/en/download/help/path.xml

Make a script executable in bin directory ant

Here is my ant script that wants to convert the script to executable from a zip. Here is what I do:
unzip a .zip file,
store to temp directory
run the script 'pkg' with a argument validate
<chmod dir="tmp/temp/test/bin" perm="ugo+rx" includes="**/*" />
<echo message="Making scripts exec: tmp/temp/test/bin" />
<exec executable="/bin/bash">
<arg value="tmp/temp/test/bin/pkg"/>
<arg value="validate"/>
</exec>
This does not make the script executable and instead gives this error:
Execute failed: java.io.IOException: Cannot run program "D:\tmp\temp\test\bin": CreateProcess error=5, Access is denied.
Cannot run program "D:\tmp\temp\test\bin": CreateProcess error=5, Access is denied.
Are you running this under Windows or Linux/Unix/MacOS?
Windows doesn't have the concept of executability in a file. Instead, it associates file suffixes with executable programs. For example, I could associate the .py suffix to be associated with the python.exe program. Opening foo.py will run that Python script under the Python executable. Change the name to foo.pl, and either the script won't run, or if you've associated .pl with perl.exe, will run the script under Perl.
You can add the suffix of your script to the %PATHEXT% environment variable which will allow you to type the file name sans extension. For example, if I added .py to %PATHEXT%, and I type in foo into the command line terminal, Windows may look for foo.py and then execute that. (unless it finds foo.exe or foo.bat first. Then those would execute).
The <chmod> task does nothing under Windows. In the <chmod> man page, it states:
Changes the permissions of a file or all files inside specified directories. Right now it has effect only under Unix or NonStop Kernel (Tandem).
Also, not all Zip implementations can store file permission and ownership information -- especially Unix style permissions and ownership. Some can, and some can't. Even if you somehow want to express the file's executability for Unix systems, it may not work.
What I recommend is to include a <condition> test in your script to test for the OS. Then, you can separate what to do if you're on Linux/Windows/MacOS and what you want to do on a Windows system.

Can't run zf from ps interface

I have a working zend framework 2 skeleton application, have added zf2 bin folder to the global windows path variable, yet I cannot run any command starting with zf.
I get the following error message:
The termzfis not recognized as the name of a cmdlet, function, script file, or operable program.

Capistrano build script using Ant

I have a PHP app I've been deploying with Capistrano for a while now. I'd like to compress js and css locally and perform other cleanup tasks before deploying to the server. I currently use build_script to make an Ant call:
set :build_script, "ant compress -q"
I'm not sure if this is limited to Windows, but my partial output looks like:
executing locally: ant compress -q
{$HOME}\AppData\Local\Temp\20120826020126>/*
'/*' is not recognized as an internal or external command,
operable program or batch file.
{$HOME}\AppData\Local\Temp\20120826020126>Licensed to the Apache Software Foundation (ASF) under one or more
'Licensed' is not recognized as an internal or external command,
operable program or batch file.
{$HOME}\AppData\Local\Temp\20120826020126>contributor license agreements. See the NOTICE file distributed with
'contributor' is not recognized as an internal or external command,
operable program or batch file.
{$HOME}\AppData\Local\Temp\20120826020126>this work for additional information regarding copyright ownership.
'this' is not recognized as an internal or external command,
operable program or batch file.
{$HOME}\AppData\Local\Temp\20120826020126>The ASF licenses this file to You under the Apache License, Version 2.0
'The' is not recognized as an internal or external command,
operable program or batch file.
you was unexpected at this time.
Is there any way to suppress all output from Ant, or at least get Capistrano not to pass any output from my build script to the command line?
I found the answer on both SuperUser and StackOverflow.
set :build_script, "ant compress -q > NUL"

Compiling Error On BlackBerry

I have done simple java app for blackberry, while building am getting following error.
"Building Hisantosh
C:\BlackBerryJDE4.5.0\bin\rapc.exe -quiet import=..\lib\net_rim_api.jar codename=Hisantosh Hisantosh.rapc warnkey=0x52424200;0x52525400;0x52435200
"C:\Documents and Settings\Santosh\My Documents\Downloads\greetingscreen.java"
"C:\Documents and Settings\Santosh\My Documents\Downloads\helloworld.java"
I/O Error: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified
Error while building project "
I have set all path variables.
Make sure you have your environment variables setup, you'll need to set up 'PATH' environment variable, the path will be something like: C:\Program Files\Java\jdk1.6.0_07\bin; depending on where you have installed your JDK files.
If this is setup, check out this link from Blackberry knowledge centre

Resources