aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes java.io.IOException: CreateProcess: make error=2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "java.io.IOException: CreateProcess: make error=2" Watch "java.io.IOException: CreateProcess: make error=2" New topic
Author

java.io.IOException: CreateProcess: make error=2

nikil shar
Ranch Hand

Joined: May 25, 2008
Posts: 116
hi all,
am getting this below error while trying to build my web application :

Buildfile: D:\onlinebill\online-bill\build.xml
build:

BUILD FAILED
D:\onlinebill\online-bill\build.xml:126: Execute failed: java.io.IOException: CreateProcess: make error=2


the line which the error points to is :



have tried verifying my classpath, etc and tried including location of the build file in the build path as suggested by

http://www.coderanch.com/t/107779/Ant-Maven-Other-Build-Tools/Execute-failed-java-io-IOException

but still cant get around this error.

any help would be much appreciated.

ta.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

I you cd to ${build} and enter:

make

what happens?


JBoss In Action
nikil shar
Ranch Hand

Joined: May 25, 2008
Posts: 116
hi,
thanks for the reply. When i enter 'make' in ${build} dir i get this error :

'make' is not recognized as an internal or external command,
operable program or batch file.

i am using ecllipse to build and run my application.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16240
    
  21

"make" is not part of Eclipse. You'll need to install it.


Customer surveys are for companies who didn't pay proper attention to begin with.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

Might I ask why you are running "make" when building a web application?
nikil shar
Ranch Hand

Joined: May 25, 2008
Posts: 116
Peter Johnson wrote:Might I ask why you are running "make" when building a web application?


maybe i misunderstood your original request to cd into ${build} and run 'make'.

my comment on using ecllipse was to show i didnt write the build script, it was autogenerated by eclipse thats why i dont really understand why its throwing the 'build failed' error below.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16240
    
  21

nikil shar wrote:

my comment on using ecllipse was to show i didnt write the build script, it was autogenerated by eclipse thats why i dont really understand why its throwing the 'build failed' error below.


This while we say - not so jokingly - that the best IDE to learn programming with is Windows Notepad. When stuff gets generated for you by "magic", you'll have no clue as to what's wrong.

And far worse, I've seen a lot of projects out there where people were doing things that "worked", but not very well, precisely because they didn't know what was going on.

Make is the program I used to use before I adopted Ant. It was originally designed for Unix systems and its primary use is to build applications in C or C++. although, like Ant, it can build almost anything. The main difference between make and Ant is that Ant has a better understanding of how to build Java projects.

You probably have the Eclipse CDK installed. The CDK is the C developer's Kit, and it does for people working on project in C/C++ what the Eclipse Java Developer's Kit does for people working in Java. In this particular case, it appears that the IDE has constructed an Ant script which (possibly amoung other things) wants to build modules using the make utility.

Make, however, isn't included with the CDK. That's because it's normally part of the C developer's toolset for that particular platform. Actually, "make" is only one of several such programs. There's "gmake" that the GNU projects are usually built with, and I think that the Microsoft developer platforms have had both an "nmake" and and nmk. All these programs are a lot alike, but they do have critical differences, as well.

But the most important thing is that if you have a Java project and your Ant script wants to run make. you did something terribly wrong. Because it thinks you're trying to compile and like non-Java code and it built the build.xml to make it do so.
nikil shar
Ranch Hand

Joined: May 25, 2008
Posts: 116
hi, thanks for the reply. Eclipse is pretty useful in most cases but in this case its made my life a little difficult.

 
Consider Paul's rocket mass heater.
 
subject: java.io.IOException: CreateProcess: make error=2