Build Failed
Werral opened this issue ยท 18 comments
It fails every time I try to run ant build. I followed the README.md file.
C:\Users\NAME\Documents\Development\mcdev\source\Equivalent-Exchange-3>ant build
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
Buildfile: C:\Users\NAME\Documents\Development\mcdev\source\Equivalent-Exchange-3\build.xml
clean:
increment_build_number:
[propertyfile] Updating property file: C:\Users\NAME\Documents\Development\mcdev\source\Equivalent-Exchange-3\build.properties
prep:
BUILD FAILED
C:\Users\NAME\Documents\Development\mcdev\source\Equivalent-Exchange-3\build.xml:54: C:\Users\NAME\Documents\Development\mcdev\source\Equivalent-Exchange-3${environment.source_location}\common do
es not exist.
Total time: 0 seconds
my environment.properties file :
base_location=C:/Users/NAME/Documents/Development/mcdev/
source_location=${base_location}/source
mcp_location=${base_location}/forge/mcp
release_location=${base_location}/source/Equivalent-Exchange-3/Releases
The problem does not have to do with tools.jar, it's probably what Robotic-Brain or Werral said.
I've had the tools.jar
error too, but I can still compile fine.
ya I installed the JDK and added the variable. I can launch MC with EE3(1.6.2) from eclipse, I just can't compile it.
I'm running 64 bit JDK. would that be an issue?
you're running 64bit, so JDK is installed in "C:\Program Files x64..." right? (I have no Windows so I'm just guessing here)
But it's looking in "C:\Program Files..."
So I would suspect the path variable is pointing to the 32bit folder
@Robotic-Brain 64-bit Windows does not have a "Program Files (x64)" folder. It installs 64-bit programs to "Program Files" and 32-bit programs to "Program Files (x86)".
@Werral Looking in my own Java install, I don't have a tools.jar in C:\Program Files\Java\jre7\lib\ (or in C:\Program Files (x86)\Java\jre7\lib) either, so it's possible there is a mismatch of Java versions...
@myoKun345 Ah, that's how it's organized... (As I said I have no windows to check)
I'm wondering if something has been broken in ANT. The tools.jar is in my JDK lib folder, not in the JRE lib folder (either of them) so it doesn't make much sense for it to be looking in JRE.
ya the tools.jar is in my JDK but missing from my JRE also. The part of the error I find odd is "C:\Users\NAME\Documents\Development\mcdev\source\Equivalent-Exchange-3${environment.source_location}\common does not exist."
It seems to be looking for the common folder inside the source folder. that doesn't exist.
wait is it really trying to "double expand" the base location?
"C:\Users\NAME\Documents\Development\mcdev\source\Equivalent-Exchange-3${environment.source_location}\common" would expand to "C:\Users\NAME\Documents\Development\mcdev\source\Equivalent-Exchange-3\C:\Users\NAME\Documents\Development\mcdev\source\common " wouldn't it!?
I think there is something really messed up with ant..
hm... are you running ant from C:\Users\NAME\Documents\Development\mcdev\source\Equivalent-Exchange-3 ?
maybe it automatically adds the current working directory to all paths? (which would be highly inconvenient since you specified an absolute path in your environment properties)
I tried downgrading my version on Ant last night and now I have an issue where windows isn't resolving it to the path variable any more.. I'll have to play with it some more before I can test if the compiling issue is related to the newest version ant.
so the absence of an environment.properties file was causing this weird behavior?
interesting... I was hoping stuff like that trows a more descriptive error :(
I'm not sure if it's still helpful, but I was getting this build error before, and two things were really causing it. The first problem was that my environment.properties file was actually environment.properties_sample. I think the error only comes up if it can't find the environment.properties file or environment.source_location tag, because when I renamed the file extension it came up with the correct directory, no double expanding or xml tag instead of a file directory or anything.
The second thing is that the common file is actually inside of the EE3 folder not the source folder directly, so I had to change the source location, so now my environment.properties file reads:
base_location=C:/Users/NAME/Desktop/mcdev/
source_location=${base_location}/source/Equivalent-Exchange-3/
mcp_location=${base_location}/mcp/forge/mcp/
release_location=${base_location}/source/Equivalent-Exchange-3/Releases/
And everything builds correctly. Hopefully this is helpful.
Sorry guy, I've been out of town.
I tried referencing the source_location to ${base_location}/source/Equivalent-Exchange-3/ instead of ${base_location}/source and I'm still getting the same BUILD FAILED error.
My environment.properties file is named just that and not environment.properties_sample