Tuesday, July 12, 2011

Deploying MT4j Application Java Executable

First we tried just exporting using eclipse, but we ran into errors with "UnsatisfiedLinkError" referencing "no jogl found" under java.library.path.

Next we tried building a FatJar using the Fat Jar Eclipse Plugin located at fjep.sourceforge.net, and able to be downloaded via eclipse from http://kurucz-grafika.de/fatjar . This yielded similar results, however.

To attempt to remedy this, we copied all of the files referencing gluegen and jogl into the java\jdk\jre\lib\ext directory, which removed the UnsatisfiedLinkError for jogl but popped up with another for Win7Touch . After migrating all files we could find referencing that to the ext folder as well, including some that probably had nothing to do with it, we were still at the same error. Not only was this getting messy, but it was getting us nowhere and would be annoying to set up via batch when deploying on a new pc.

Next, we elected to try moving all relevant files into the JAR (.dlls, .jnilibs, basically everything referencing jogl and win7) into the JAR itself, but this didn't fix any errors.

After hunting around on the forums some more in the morning, we found that one solution was to place all of these files in the same directory, on the same level as the jar file, but not *IN* it. This yielded success.

End result: To make the executable jar file run when using mt4j, move all .dlls, .so's, and *.jnilib's into the same directory as the jar, as well as any pictures or sounds your JAR needs to run properly. For us, the relevant .so's and libraries and such were as follows:

gluegen-rt.dll
jogl.dll
jogl_awt.dll
jogl_cg.dll
libgluegen-rt.jnilib
libgluegen-rt.so
libGlulogicMT.jnilib
libjogl.jnilib
libjogl.so
libjogl_awt.jnilib
libjogl_awt.so
libjogl_cg.so
ManyMouse.dll
ManyMouse.so
Win7Touch.dll
Win7Touch64.dll

Thursday, July 7, 2011

MT4j on Android Tablets

You'll need mt4j-core and mt4j-android from:

http://mt4j.googlecode.com/svn/branches/new/

There is also a test app.

To get it to run you will need to link to the Processing core library
for Android, which is here:

http://processing.googlecode.com/svn/trunk/processing/android/core/

You will need to modify the Processing core:

----- MODIFY ----

therion_> if you can try to set clearcolor to true in the
defaultsetttings() method in pgraphicsandroid3d
[5:54 PM] it didn't crash with an exception, though - the
bg flashed on and off really fast, on touch it would stay the bg
color, then on release it would flash
[5:54 PM] i mean clearColorBuffer
[5:55 PM] oh ok
[5:55 PM] but it didnt crash :p
[5:55 PM] trying clearColorBuffer = true; ...
[5:56 PM] it runs! :)

--- END MODIFY ---

http://wiki.processing.org/w/Android

Newsflash... Reddit is like 9 people

For some reason, it always seemed like Reddit had to be this huge company of programmers and systems administrators or something... it seemed that way in my mind. When I saw their new office space -- I realized I have more programmers sitting in MY office space.

http://blog.reddit.com/2011/07/its-time-for-us-to-pack-up-and-move-on.html

This is somehow empowering for me.