.jar built for Java 1.8?

78 views
Skip to first unread message

David Squire

unread,
Apr 22, 2017, 3:22:42 AM4/22/17
to cofoja
Thanks for the work on Cofoja. We use it for illustrating DbC in teaching at Monash University (in a subject derived from one originally taught using Eiffel). I would like to make wider use of it, if it were easier to set up.

The available Cofoja .jar on GitHub is built for Java 1.6. I've been unable to get it to work with Java 1.8 in Eclipse Neon on macOS 10.12. I downloaded a version of Java 1.6 from the Apple Developer site (go to https://developer.apple.com/download/more/ and search for Java).

In fact, I couldn't make it work at all with Neon, as I cannot make it use the Java 1.6 JDK. This is a known bug, not yet fixed: https://bugs.eclipse.org/bugs/show_bug.cgi?id=494481 (still in Oxygen, it seems).

I got it to work in Eclipse Mars though, once I pointed it to the 1.6 JDK. Once that was set up (project created and configured to use the Java 1.6 JDK and JRE), the instructions from http://liris.cnrs.fr/pierre-edouard.portier/teaching_2016_2017/pld_agile/201610_Install_Cofoja_in_Eclipse.pdf worked perfectly.

Any chance of a .jar built with Java 1.8?

Thanks again.

Regards,

David

Nhat Minh Lê

unread,
Apr 24, 2017, 2:33:02 PM4/24/17
to Cofoja
Hi,

Why are you trying to install a Java 6 JDK at all? Why not use Cofoja
with the Java 8 JDK? It shouldn't matter what old version of the JDK
Cofoja has been compiled with, since the JVM should be backward
compatible. Cofoja is compiled against Java 6 for maximum
compatibility; if there's a specific bug you are encountering while
using it with Java 8, please let me know.

I can provide a JAR file compiled against Java 8, but it's strange
that the current Cofoja JAR wouldn't run on a Java 8 JVM. From the
command-line I don't seem to have any issue using it. Well, in any
case, I've posted some JARs here: http://www.huoc.org/~minh/cofoja/
the newer ones are compiled against Java 8.

Best,
Nhat
> --
> You received this message because you are subscribed to the Google Groups
> "cofoja" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cofoja+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

David Squire

unread,
May 13, 2017, 2:20:42 AM5/13/17
to cofoja
Many thanks for that.

It didn't solve my problem - but that in itself was useful. It told me the problem was elsewhere. 

Ultimately the problem was my run configuration on Eclipse. I had used the refactoring tool to rename the class containing main(...), and it turns out that that did not cause the run configuration containing the old (now non-existent) main class to be refactored to use the name of the new one. That (old) configuration was where the VM arguments were. Once I copied them across to a new run configuration with the new main class name, everything worked (for both these, and cofoja.asm-1.3-20160207.jar).

Thanks again,

David
Reply all
Reply to author
Forward
0 new messages