Apache Ant 1.9.6 will not run on Windows 7 - ant

Because I was having problems, I opened a command window and changed to the very bin directory where ant was installed. Then I entered 'ant -version'. It returned:
Files\Java\jdk1.8.0_72"" was unexpected at this time.
Entering 'ant' alone gives the same message. The JAVA_HOME is set to the jdk folder (jsk1.8.0_72), and the PATH adds \bin to it. Nothing else appears broken.
Any ideas gratefully received. Thank you.
Since writing the above, I tried shifting to 32-bit jdk7 from 64-bit jdk8. Output from "ant --version" changed a bit to: Files was unexpected at this time.
Changing the Symlinks in C:\ProgramData\Oracle\Java\javapath did nothing good.
Output of "set | findstr /b /i //"java_home=//"" is:
JAVA_HOME="C:\Program Files (x86)\Java\jdk1.7.0_79"
For PATH=, the output is too long and characters could be missed, so instead I ran: echo %PATH% > d.txt. Here is the result:
C:\Program Files\Everything;C:\Program Files\gradle-2.8\bin;"C:\Program Files (x86)\Launch4j";C:\Program Files (x86)\Apache\apache-ant-1.9.6\bin;"C:\Program Files (x86)\Java\jdk1.7.0_79"/bin;C:\cygwin64;C:\cygwin64\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Windows Resource Kits\Tools\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\curl;C:\Devkit\bin;C:\Ruby21-x64;C:\Ruby21-x64\bin;C:\Perl64\site\bin;C:\Perl64\bin;C:\Program Files (x86)\Apache\apache-ant-1.9.0\bin;"C:\Program Files (x86)\Java\jdk1.7.0_79"\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\GNU\GnuPG\pub;C:\Program Files (x86)\WinMerge;C:\Program Files (x86)\Bazaar;C:\Program Files\jEdit;C:\Program Files (x86)\Groovy\Groovy-2.1.7\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files (x86)\Calibre2\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\CMake\bin;C:\Program Files (x86)\mingw-w64\i686-4.9.2-posix-dwarf-rt_v4-rev2\mingw32\bin;C:\Program Files (x86)\Scite\scite\bin;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\Git\cmd;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Tcl\bin;C:\Program Files (x86)\Arduino\hardware\tools\avr\bin;C:\Program Files\dbd\Beard;C:\Program Files\dbd\dd;C:\Users\dbd\AppData\Roaming\npm
Please note that all the Java Demos run OK, suggesting that the basic java installation is OK.. Have not yet looked at the Registry. All of this is mysterious and upsetting.
Thanks to Stefan De Laet and Chad Nouis. More to be done.

This entry in your PATH doesn't look quite right:
"C:\Program Files (x86)\Java\jdk1.7.0_79"/bin
Those quotation marks shouldn't be there. Also, the forward slash before bin should be replaced with a backslash:
C:\Program Files (x86)\Java\jdk1.7.0_79\bin
Next, the JDK directories appear twice in your PATH:
...;"C:\Program Files (x86)\Java\jdk1.7.0_79"/bin;...;"C:\Program Files (x86)\Java\jdk1.7.0_79"\bin;...
Only one JDK directory is necessary. I recommend deleting the second entry.
Further, your JAVA_HOME also shouldn't have quotation marks. The following...
JAVA_HOME="C:\Program Files (x86)\Java\jdk1.7.0_79"
...should be...
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_79

At long last and finally, 'ant -version' gets the correct response: "Apache Ant(TM) version 1.9.6 compiled on June 29 2015". I beiieve several things contributed to the success:
Switching from 64-bit to 32-bit java. Since Ant comes as a zip file, I could not discover whether it is really 64-bit or 32-bit. I did find it in my 32-bit folder, but that could be a holdover from earlier times. But maybe not.
fixing the PATH. The PATH which I sent was an end-result after substitution composed of a replacement for the following: "...%JAVA_HOME%/bin...". Normally, I would have spotted it, but because of the %, I did not. Thank you Chad Nouis! When I switched to 32-bit, I did not touch the PATH entry, but merely changed JAVA_HOME. This may have been in the system for some time.
Oh Well! Have a good day everyone and thanks again!

Related

Where is neo4j-server.properties on Windows?

On Windows, where is neo4j-server.properties as described in this documentation?
http://docs.neo4j.org/chunked/stable/security-server.html
I can't find it anywhere, and creating it myself in places that seem reasonable have no effect.
I'd like to be able to access the server from a remote IP other than localhost. Thanks.
Update
Neo4j is installed at C:\Program Files\Neo4j Community\bin\neo4j-community.exe
I've created the file at C:\Program Files\Neo4j Community\conf\neo4j-server.properties
Here's the complete contents:
org.neo4j.server.webserver.port=7474
#allow any client to connect
org.neo4j.server.webserver.address=0.0.0.0
However, the settings don't seem to take effect. Am I missing something?
From the Neo4j startup window, click the "options" button bottom left.
This shows an options windows which includes the path to your conf file:
Ok I think I know what's going on: You installed 1.9.4 stable via the new simplified Windows Installer? If so: That seems to be a very limited 'dev' installer. It has a simple MSI, it has a simple GUI to let you select the database, and then you do everything from the web console. This is a departure from previous methods of installing on Windows. I tried it out, and I abandoned it because I need full control of the configuration. The conf files, normally found in a conf folder parallel to the bin folder, are not installed with this installer.
If you want the traditional installer, grab the enterprise download.
That said: I wouldn't waste time on the 1.9.x branch unless you're running in production. If you're still in dev/test, I'd go straight to 2.0 (milestone 6 is now available). You'll get Labels (reason enough to switch), updated Cypher engine, and lots of other improvements. Also: the 2.0 installer is still a traditional configuration, complete with conf folder, where you can make all the configuration changes you need to make.
EDIT The download link for the zip version is now back, so you can choose either the exe or zip version of installation. This means you can install 1.9.4 just like before, and have full access to all the configuration files.
EDIT 2 After a bit of email exchange w/someone at Neo Technology, I found out that, for this particular installer, everything needed is bundled into a single JAR file. if you look in the bin folder after installing, you'll see these files:
If you search the JAR file (via 7zip or something similar), you'll find the default server configuration file:
I suspect you could place the neo4j-server.properties file into the JAR file here as well (though I haven't tried).
The original poster is using the Community version on Windows, as am I. Despite what anyone has said, no one has actually answered the question with verifiable, tested results. I originally said, "This is not an answer". However, I now tend to think it IS the answer, just not the desired result. The answer is, to the best of my knowledge, with my specific tests and results documented below: NOWHERE: YOU CAN'T CONFIGURE current stable 1.9.4 or milestone 2.0.0-M06 Community versions on Windows x64.
I have tried the suggestions under the best answer, which were untested and unverified, and they do not work. See specific quotations below.
Neither of the currently pushed 2.0.0-M06 or stable 1.9.4 Community versions are configurable in any way, shape or form on Windows -- given the current documentation and non-answers. As a first time user to Neo4j with these two versions, this has been very frustrating, to have no clear way to configure the software, and incorrect official documentation.
"Also: the 2.0 installer is still a traditional configuration, complete with conf folder, where you can make all the configuration changes you need to make." #David Makagon
This is a false statement. It is the same as 1.9.4, no conf folders anywhere on disk.
"I suspect you could place the neo4j-server.properties file into the JAR file here as well (though I haven't tried)." #David Makagon
I have tried both Neo4j Community 1.9.4 and 2.0.0-M06 x64 on Windows 7 x64, running as a user, with and without running as administrator.
I've used ProcMon and could not even find any attempt to read any "conf" file at documented location. However, I found other odd locations with a "config" in the name, and have tried there also, out of morbid curiosity, included below.
Summary of config file locations which DO NOT work:
C:\Program Files\Neo4j Community\conf\neo4j-default.properties [1.9.4]
C:\Program Files\Neo4j Community\conf\neo4j-server.properties [1.9.4, 2.0.0-M06]
C:\Program Files\Neo4j Community\bin\neo4j-community.exe.Config [1.9.4]
C:\Program Files\Neo4j Community\bin\neo4j-default.properties [1.9.4]
C:\Program Files\Neo4j Community\bin\neo4j-server.properties [1.9.4]
C:\Program Files\Neo4j Community\bin\conf\neo4j-server.properties [2.0.0-M06]
C:\Program Files\Neo4j Community\bin\neo4j-desktop-1.9.4.jar\org\neo4j\server\config\community\neo4j-default.properties
C:\Program Files\Neo4j Community\bin\neo4j-desktop-1.9.4.jar\org\neo4j\server\config\community\neo4j-server.properties
C:\Program Files\Neo4j Community\bin\neo4j-desktop-1.9.4\org\neo4j\server\config\community\neo4j-default.properties
C:\Program Files\Neo4j Community\bin\neo4j-desktop-1.9.4\org\neo4j\server\config\community\neo4j-server.properties
C:\Users\root\Documents\Neo4j\neo4j-default.properties [1.9.4]
C:\Users\root\Documents\Neo4j\neo4j-server.properties [1.9.4]
C:\Users\root\Documents\Neo4j\conf\neo4j-default.properties [1.9.4]
C:\Users\root\Documents\Neo4j\conf\neo4j-server.properties [1.9.4]
C:\Users\root\Documents\Neo4j\default.graphdb\neo4j.properties [1.9.4, 2.0.0-M06]
C:\Users\root\Documents\Neo4j\default.graphdb\neo4j-server.properties [1.9.4]
C:\Users\root\Documents\Neo4j\default.graphdb\conf\neo4j-server.properties [1.9.4]
Also note, the jar's config file
C:\Program Files\Neo4j Community\bin\neo4j-desktop-1.9.4.jar\org\neo4j\server\config\community\neo4j-default.properties
corresponds directly to (exact same file, no differences)
C:\Users\root\Documents\Neo4j\default.graphdb\neo4j.properties
Yet changing the port in this location also does nothing.
Is there a way to configure this through the webadmin? It is definitely not clear at all.
I'm using the Windows 32 community version 2.0.3. To edit any of the properties, there's "settings" button in the GUI (where you start the database from)?
Download the windows community binary 64bit .zip from 'Other Versions'. You'll need to install the JDK 7 and set the JAVA_HOME path variable. All folders, including Conf, are exposed and you can control the the default port and localhost bindings per documentation.
A bit late, but I spent a while on searching for it today.
The seo4j-server.properties file is at (absolute path example):
C:\Users\username\AppData\Roaming\Neo4j Community\neo4j-server.properties
It is accessible from Neo4j GUI - under the "Setting" button. I have tried it with Community version 2.1.6 and it works fine.
Under ...\<neo4j-community-1.8.2>\conf directory.
The conf file is created under AppData\Roaming\Neo4j Community Edition when you click on edit in server configuration (Options GUI)

Setting Java path on Windows for Ant

Just downloaded the latest version of Ant and installed at:
C:\apache-ant-1.8.4
I added the following to the Env Path variable:
...;C:\apache-ant-1.8.4\bin
When I open a terminal window and type:
ant -version
I get:
Files\Java\jdk1.7.0_07"" was unexpected at this time.
In System variables I have the variable JAVA_HOME set to:
"C:\Program Files\Java\jdk1.7.0_07"
so it appears that "ant -version" is struggling to read the space in JAVA_HOME even though it is in quotes.
I see an alternative post on this topic:
Ant and Eclipse
but it doesn't tackle this specific point.
Has anyone else encountered this problem and know the answer?
My guess is current definition of JAVA_HOME has unwanted double quotes. Show output of set JAVA_HOME on command window. It should not have any double quotes.
Please start command prompt. Set the JAVA_HOME again
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_07
Hmmm, it should be fine with quotes. Could be something else in your path. If all else fails you could revert to dos 8.3 notation.
dir /x
Which gives
13/01/2013 03:57 PM <DIR> PROGRA~1 Program Files
13/01/2013 03:57 PM <DIR> PROGRA~2 Program Files (x86)
In case anyone else is still encountering this problem, I am on Windows 7 and was experiencing the same. I was using the GUI provided by right-clicking the "computer" icon to attempt to set the JAVA_HOME path to the relevant program files folder (C:\Program Files (x86)\Java\jdk1.7.0_45). This will not work! The GUI doesn't accept spaces in paths. Command line however, does. Use set JAVA_HOME= C:\Program Files... to get it working, filling out the rest of the path with the location of your jdk installation.

Why is ant looking for tools.jar in the wrong dir? [duplicate]

This question already has answers here:
Unable to locate tools.jar
(35 answers)
Closed 9 years ago.
I am trying to execute `ant -version' and I get
C:\Users\owner>ant -version
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
Apache Ant(TM) version 1.8.4 compiled on May 22 2012
I checked all of my environment variables and I cant find a reference to C:\Program Files\Java\jre7
I have the JDK and JRE installed at C:\Program Files (x86)\Java\jre7 and C:\Program Files (x86)\Java\jdk1.7.0_10
I also have stuff in C:\Program Files\Java\jre7 and C:\Program Files\Java\jdk1.7.0_10
Can anyone tell me why ant is looking in the wrong directory?
I have seen a bunch of other questions on stackoverflow but none of them solve my issue.
output of %path% is
C:\Users\owner>echo %path%
%CommonProgramFiles%\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Window
s;C:\Windows\System32\Wbem;C:\Program Files (x86)\CyberLink\Power2Go;C:\Program
Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsof
t SQL Server\90\Tools\binn\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Window
s\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.6.0_24\bin;C:\Prog
ram Files\TortoiseSVN\bin;C:\Program Files (x86)\Java\jdk1.7.0_10;C:\Program Fil
es (x86)\Android\android-sdk\tools\apache-ant-1.8.4\bin;C:\Program Files (x86)\A
ndroid\android-sdk\platform-tools\;C:\Program Files (x86)\Android\android-sdk\to
ols\;C:\Program Files\Common Files\Microsoft Shared\Windows Live
C:\Users\owner>echo %JAVA_HOME%
%ProgramFiles(x86)%\Java\jdk1.7.0_10
Ant does (unfortunately) rely on the JAVA_HOME system property. You will want to make sure that this property points to a valid JDK installation (and not a JRE).
I just figured out what it was
changing %JAVA_HOME% from %ProgramFiles(x86)%\Java\jdk1.7.0_10 to C:\Program Files (x86)\Java\jdk1.7.0_10 fixed it.

delphi 2009 compile packages

i truly don't get it.
trying to recompile the qr5 packages, and is impossible with this Delphi.
build the QR5Run_Rad6.bpl, everything is fine.
when i install QR5Design_RAD6.bpl an error message appears
"its not possible to run the program since qr5run_rad.bpl is missing in your computer. try again installing your program to solve this problem."
just did!
clean build compile doesn't work in any order. closed the ide and reopened , still doesn't work.
what else is left?
clean all related dcp and bpl
QR5Design_RAD6.bpl <> qr5run_rad.bpl
And more importantly, the qr5run_rad.bpl needs to be found on the systempath in order for the IDE to find it so it can be used by the design time package.
In other words: you need to build the qr5run_rad.bpl as well as the QR5Design_RAD6.bpl. And you need to make sure that the qr5run_rad.bpl ends up in a folder that is on your system path, not just any old folder where you have the sources and/or dcu's.
In addition to what Marjan wrote:
Windows uses these places when looking for a DLL (or BPL, which is a DLL):
The directory from which the application loaded.
The system directory. Use the GetSystemDirectory function to get the path of this directory.
The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.
The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
The current directory.
The directories that are listed in the PATH environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path.
Delphi puts BPL files in a directory like C:\Documents and Settings\All Users\Documents\RAD Studio\8.0\Bpl which it adds to your PATH when Delphi is installed. For Delphi 2009, that Path would probably be C:\Documents and Settings\All Users\Documents\RAD Studio\6.0\Bpl on a Windows XP machine.
--jeroen

How to do a command line build using Delphi 7?

I am trying to build a delphi project from the command line compiler
Example: C:\dcc32 -B C:\BD\Delphi7\work\MyProject.dpr
Aside from the the standard evironment pathing:
$(DELPHI)\Bin;
$(DELPHI)\Lib;
$(DELPHI)\Imports;
$(DELPHI)\Projects\Bpl;
$(DELPHI)\Rave5\Lib;
there is nearly 50 other paths to other libraries, components, etc...
How do i package this all up and point to these to use in the commanline parameters to make my build?
When i run the example above
C:\dcc32 -B C:\BD\Delphi7\work\MyProject.dpr
i get a FATAL: File not found : 'file name here'
thanks
Under Delphi 7 you need to edit you dcc32.cfg file (in you Delphi bin folder). You need to copy the library path from the IDE and put in the dcc32.cfg file. You have to add it 4 times for the different command line parameters, eg:
-u=path
-i=path
-r=path
-o=path
There are 4, I believe. I haven't done this in a few years so I hope that the info is correct. Certainly, the command line compiler does not use the same place to store the paths as the IDE does.
I don't think dcc32.exe is stored under C:\, if it is you're installation of Delphi is really out of order, or you have moved only the dcc32.exe file.
It's advised to use the dcc32.exe from the directory where the Delphi install has stored it. The Delphi directory depends strongly on the Delphi version, but for Delphi versions op to 7, this looked something like this:
C:\Program Files\Borland\Delphi7\bin\dcc32.exe
For later versions of Delphi, this should be changed to:
"C:\Program Files (x86)\Embarcadero\RAD Studio\8.0\bin\DCC32.exe" -h

Resources