Wiki

Clone wiki

EpiCell / Home

EpiCell Wiki

This is the official Wiki for EpiCell covering mainly developing intructions.

Requirements

Checking out the repository

EpiCell uses a Mercurial repository. To clone the repository use:

$ hg clone https://bitbucket.org/muellermartin/epicell

Setting up Eclipse

Installing MercurialEclipse

For instructions on how to install Mercurial for Eclipse see "How can I download the plugin?" on the project's website.

Creating a project from repository

  1. Select File > New > Other...
  2. If you installed MercurialEclipse properly, you should see the category Mercurial then select Clone Existing Mercurial Repository
  3. In the next window paste the repository URL in the according text field.
  4. If you have a bitbucket account type in your username and password
  5. Make sure "Checkout as a project(s) in the workspace" is checked
  6. Choose "EpiCell" as the Clone directory name
  7. Click on Finish

Setting up required libraries

For setting up the required libraries see "Setting Up LWJGL with Eclipse". Don't forget to add slick.jar!

Troubleshooting

Running the application gives error "Could not get the JAWT interface"

Running the application results in an Exception with something like:

JavaVM WARNING: JAWT_GetAWT must be called after loading a JVM
Fri Nov 23 11:43:13 CET 2012 ERROR:Could not get the JAWT interface
org.lwjgl.LWJGLException: Could not get the JAWT interface
	at org.lwjgl.opengl.AWTSurfaceLock.lockAndInitHandle(Native Method)
	at org.lwjgl.opengl.AWTSurfaceLock.access$100(AWTSurfaceLock.java:51)
	at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:94)
	at org.lwjgl.opengl.AWTSurfaceLock$1.run(AWTSurfaceLock.java:92)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.opengl.AWTSurfaceLock.privilegedLockAndInitHandle(AWTSurfaceLock.java:92)
	at org.lwjgl.opengl.AWTSurfaceLock.lockAndGetHandle(AWTSurfaceLock.java:66)
	at org.lwjgl.opengl.MacOSXCanvasPeerInfo.initHandle(MacOSXCanvasPeerInfo.java:57)
	at org.lwjgl.opengl.MacOSXDisplayPeerInfo.doLockAndInitHandle(MacOSXDisplayPeerInfo.java:56)
	at org.lwjgl.opengl.PeerInfo.lockAndGetHandle(PeerInfo.java:85)
	at org.lwjgl.opengl.MacOSXContextImplementation.create(MacOSXContextImplementation.java:47)
	at org.lwjgl.opengl.ContextGL.<init>(ContextGL.java:132)
	at org.lwjgl.opengl.Display.create(Display.java:847)
	at org.lwjgl.opengl.Display.create(Display.java:754)
	at org.newdawn.slick.AppGameContainer.tryCreateDisplay(AppGameContainer.java:299)
	at org.newdawn.slick.AppGameContainer.access$000(AppGameContainer.java:34)
	at org.newdawn.slick.AppGameContainer$2.run(AppGameContainer.java:364)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:345)
	at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314)
	at net.mueller_martin.epicell.Main.main(Main.java:19)

This is a LWJGL specific error, which seems to be related to Java 7 on Mac OS X. Until LWJGL doesn't get fixed, using a Java 6 execution environment fixes the error. In Eclipse you can follow these steps too do so:

  1. Select the project properties (Project > Properties).
  2. Select the Java Build Path category on the left.
  3. Select JRE System Library [Java 7 (MacOS X Default)] (or similar) and hit Remove.
  4. Then click Add Library..., select JRE System Library and choose Alternate JRE.
  5. In the dropdown menu choose Java SE 6. By clicking Finish and OK your project should run properly.

If you're encountering this issue in command line, using the full path to the Java 6 binary will fix this issue especially under Mac OS X:

e.g. using

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java

To run the main method in EpiCell.class including LWJGL (with native files) and Slick this might look like this:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java -cp .:lwjgl.jar:slick.jar -Djava.library.path=native/macosx/ EpiCell

Updated