This site requires JavaScript, please enable it in your browser!
Greenfoot back
Christoph
Christoph wrote ...

2015/11/27

Compile error: package com.sun.jna does not exist

Christoph Christoph

2015/11/27

#
Hello, I am trying to compile greenfoot from source in Debian 7 and I receive the following compiler error: GreenfootUtil.java:24: error: package com.sun.jna does not exist Additionally, some other errors resulting from the first error, for example: GreenfootUtil.java:25: error: package com.sun.jna.platform.win32 does not exist What is missing here? Regards Christoph
nccb nccb

2015/11/27

#
You are probably missing the jna JARs on the Greenfoot classpath (they live in the bluej/lib directory). The JAR is included if you build via ant, so I'm guessing you're using an IDE to build it; easiest thing to do is just to add all JARs in bluej/lib onto the classpath for the Greenfoot side.
Christoph Christoph

2015/11/27

#
I am using ant.
Christoph Christoph

2015/11/27

#
The error occurred because, in bluej/build.properties, I had defined bluej_home as ., but for greenfoot, it must be ../bluej .
nccb nccb

2015/11/27

#
Hmm, that's odd -- the JNA libraries are definitely in the classpath in Greenfoot's build.xml. Perhaps you can tell us which target you are building, which Java version you are using, and paste a fuller stack trace using "ant -v targetname", either here or by email to nccb@kent.ac.uk.
Christoph Christoph

2015/11/30

#
With bluej_home=../bluej I could build ant target "ready-to-run" successfully. Then I tried target "debian-dist", which failed, obviously because of another problem with relative paths in the build.properties files. So, I re-edited them and entered absolute paths. After that, "ant debian-dist" was successful. Now I am wondering why the Debian package downloadable from greenfoot.org contains a file wunderground-core.jar, but neither the Greenfoot sources contain a file with that name, nor "ant debian-dist" created it.
Christoph Christoph

2015/12/2

#
Does greenfoot need wunderground-core.jar to work correctly?
You need to login to post a reply.