Ant Compile With rJava library

This is pretty simple but for the sake of “I-will-not-forget-it-anymore” I will write it here. I copied some files of a Java project to a new machine. When I tried to execute it in the new place, “Exception in thread “main” java.lang.UnsupportedClassVersionError: Bad version number in .classa file”. Recompiling everything should make it work. Since my code requires rJava it is necessary to inform this to the ant (I’m using ant by the way).  The command which made my day is:

ant clean compile -lib ~/R/i486-pc-linux-gnu-library/2.9/rJava/jri/JRI.jar

2.9: be aware about the version you’ve installed, if you’ve compiled the packages in a version < 2.10, you will need to reinstall ’em. In my case I did reinstall nlme, mgcv, spatstat, and igraph.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: