Advanced Processing in Eclipse

Published on Mar. 24, 2009
by Kyle

Processing is an excellent framework and is at the top of my list of recommendations when it comes to tools for development, close to it is Eclipse (a very powerful coding IDE). One of the most beneficial assets to Processing is its learning curve. It takes seconds for someone with no programming experience to create their first “sketch” and advanced users tend to segway into more direct java programming. Because Processing was built as a learning tool the IDE leaves something to be desired for advanced users; my biggest complaint is the inability of creating reusable classes without having multiple copies. This is where Eclipse allows you to really take your development to another level.

Eclipse is an extendable IDE, developed in Java, originally for Java. I use Eclipse for nearly every development task; of course I use it for all Java/Processing work, I use a plugin called FDT for my ActionScript programming, PHPEclipse for any PHP and adobe even has a nice JavaScript editor for Eclipse. The Eclipse environment offers plenty of great features, that I now dread working without, but for most, it is not a user-friendly learning process. The incredible Daniel Shiffman has posted an excellent tutorial on getting Processing in Eclipse. It covers most of what is needed to know, but its never as easy as it looks so I thought I would mention some things you are likely to run into.

  • In Processing, number datatypes are usually just int or float, it is important to know that in Java double is another datatype (similar to a float) that is very common, you may find yourself casting between these frequently. Secondly when entering values expecting a floating-point number add a lowercase ‘f’ to the end (i.e. 1.52f) to make sure the value is read as a float and not a double.
  • Make sure you are using Eclipse Ganymede, if you are not you must install FatJar. GanyMede has FatJar built-in, but previous versions of Eclipse would not export working applications, the Processing libraries would not be included in the jar file, it would test fine but never export correctly.
  • Getting JOGL (Java OpenGL) to work can be tricky. First make sure you are passing OPENGL in as the third parameter in your size() call. In the end, I got it working by adding jogl.jar and and gluegen-rt.jar from Processing/libraries/opengl/library folder. Then the least obvious part: In your “Run Configuration” for your project, click on arguments, where it says “VM Arguments” write “-Djava.library.path=/documents/Processing/libraries/opengl/library” where the path is your correct path to your opengl library directory. This will make Eclipse see the .dll files in this directory and add them to its libary path, at this point you should be able to compile successfully.

I also found this great hack for using pure JOGL hacks: pure-jogl

UPDATE: – after writing this I still ran into some difficulty getting applications to launch after they were exported as a runnable jar. I found this http://www.rednoise.org/EclipseP5Exporter/ and it solved my problem and brought a familiar Processing-style export to Eclipse that I really appreciate.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Leave a response
Trackback URL: Advanced Processing in Eclipse.

Proposal for a more-private Facebook “Like”

The Facebook “Like” button is a bit cruel. It tracks every site you go to and stores that information on their servers. They use that information to target you and your friends with advertising. To many, this is an un-ethical practice, but site owners have a reliance on it for generating traffic. The same sites [...]

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Fullscreen Solutions for Processing

In many scenarios, I want my final Processing application to launch in fullscreen when I have completed it. I usually don’t want any visibility of an operating system or any other process during an installation, performance or otherwise. From my experience with Processing, I have noticed the solution is often different than the last, its [...]

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Toxiclibs.js gets VerletPhysics2D

It’s been four months since I initially started creating Toxiclibs.js a JavaScript version of toxiclibs. So far, over 65 ‘classes’ have been written. These classes cover a wide spectrum of functionality that I believe can be helpful on any web project. There are currently 18 examples on the site, most of which have focused on [...]

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Toxiclibs.js – open-source computational design

I have initiated a new open-source project titled Toxiclibs.js. Toxiclibs.js is a JavaScript port of Karsten Schmidt‘s expansive toxiclibs library. Contributed libraries are an excellent perk of using Processing, and to me there is no library that stands as strong as Karsten’s. Toxiclibs encapsulates a lot of the complexity involved with common computational design problems [...]

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Indexical Architecture @ Spark Festival

My project, Indexical Architecture, commissioned by Northern Lights Foundation as part of the Art(ists) on the Verge 2 Fellowship is currently installed as a part of Minneapolis’ annual Spark Festival on display through October 3rd.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

The Simple Solution

In 2007, I completed a fun project that I call Social Murmurs. The project required sensing when people sat on a bench, but at the time I had limited electronics experience, so I found the simplest solution I could.

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter

Phase Shifts

My recent past has been full of transition and I’m very excited to announce the recent changes in my life. Recently… I participated in the Twin Cities Maker Minne-Faire; I stayed up for more than 24 hours straight with a group of talented friends building a website for Child Protection International (new site not up [...]

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Twitter