So I am evaluating using JasperServer for an upcoming project. As a result I have a Jasper development environment setup on my MacBook Pro which includes JasperReports Server and Jasper iReports.
Recently I upgraded to OS X Mavericks and everything Jasper came crashing down. After further investigation I discovered a few things:
- Â Mavericks actually didnâ€™t come with a version of JDK, and in fact removed the version was installed on my Mac.
- As a result, $JAVA_HOME appeared to be non-existent
- Also, after getting Java installed again the default path bin/java has changed to Commands/java
So, to get things working again I did the following:
Go hereÂ to download the latest release of java.
Upgrade and Reinstall JasperServer
My existing copy of JasperServer would still not run so I upgraded to the latest release (v5.5 at the time of this writing).
Download the latest Jasper here
Note: Â In hindsight Iâ€™m assuming that this because of the $JAVA_HOME issues and the installer setting paths in configuration files. (Therefore, you may not need to upgrade. Â You might be able to simply re-install the existing version. If so, let me know in the comments.)
Once you do this, JasperServer should run again.
Check that java is installed
open terminal and type
You should see your java version number…
To Check your $JAVA_HOME
Open terminal and type:
If you see an empty line then follow steps in Part B, else if you see a path like this:
then congratulations – continue on to the next step.
Part B) Manually Set Your Java_Home (Only if the last steps didn’t work)
So if you tried to set your JAVA_HOME Â on your mac but it didn’t work then try doing the following which was originally written about here:
- Start up Terminal
- Type “cd ~/” to go to your home folder
- Type “touch .bash_profile” to create your new file.
- Edit .bash_profile with your favorite editor (or you can just type “open -e .bash_profile” to open it in TextEdit.
- Type “. .bash_profile” to reload .bash_profile and update any functions you add.
Now test your JAVA_HOME again – Open terminal and type:
Finally, Tell iReport where Java is in Mavericks
- Right click on the iReport.app (in Applications)
- Show Package Contents
- Navigate to /Contents/Resouces/ireport/etc
- Edit iReport.conf with your favorite text editor
- Add a line that says something like
Where “jdkhome” should match the path that appears when you type â€œecho $JAVA_HOMEâ€ in terminal Â For example, mine is:
Save the file and try running iReport again. Â Your problems should be solved.
Let me know on Twitter or in the comments if this helped you!