iReport 3.0.0 on Mac OS. How to make it work?

iReport is a gui for designing jrxml (the actual reports) files for JasperReports. It is supposed to work on any platform.

We’re using 3.0 instead of 3.5 because 3.5 is based on Netbeans.

I’m trying to work with it on Mac OS (it was extremely slow in the virtual machine, something to do with java I guess).


chmod u+x

…because it’s not executable.

But then it gave me a weird error:

comp:iReport-3.0.0 user$ ./
-bash: ./ /bin/bash^M: bad interpreter: No such file or directory

Google said it’s because of the problem with newline in different platforms. In linux it’s LF (\n)(line feed). In windows it’s CRLF (\r\n) (carriage return, line feed).

So this ^M character appearing in the error is actually the left-out CR.

How to fix it? Wikipedia says:

tr -d '\r' < inputfile > outputfile

This works. But then the next error. calls bin/

The same thing for it.

That’s it. Why was the shell script in a dos format only god can tell.

Note that iReport on a Mac should be in a place whose path does not involve spaces. Here’s a solution for that too.

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

This site uses Akismet to reduce spam. Learn how your comment data is processed.