Kompato

Perforce plugin for NetBeans 6.x

Last night I installed NetBeans to explore its potential use as a PHP IDE.  So far I'm impressed.  The only major struggle came when I tried to get NetBeans working with Perforce this evening.

Gregg Wonderly was kind enough to develop the Perforce plugin I'm using.  The plugin provides basic add/edit/submit/diff functionality, which is really all I need at the moment.  It's tremendously easy to install via NetBeans' plugin architecture.

The gist of the problem is that, at least on OS X Snow Leopard, NetBeans (or the Java runtime) doesn't appear to have knowledge of environment variables.  Nothing from /etc/profile or ~/.profile is visible to the Runtime.getRuntime().exec() call that the Perforce plugin performs.  NetBeans also doesn't appear to have any place to specify environment variables.

The workaround that I'm currently using is to launch NetBeans from a bash prompt with:

/Applications/NetBeans/NetBeans\ 6.7.1.app/Contents/MacOS/netbeans 

The plugin now works, since my path and Perforce environment variables are visible to the exec() call.

If anyone with more familiarity with Java or NetBeans has any other ideas, please share them!  Barring any other solutions, I'll just use Platypus to create an app stub that automatically launches the shell and then NetBeans.

2009-09-17 UPDATE: NetBeans is a very impressive PHP IDE.  Its command completion, PHPDoc and PHPUnit support, along with excellent debugging once xdebug is installed, is top notch.  I highly recommend checking it out if you're in the market for a PHP development environment.
Filed under: development php technology
1 comments
Mar 10, 2010
I have a great respect for the work that Greg has done. Even if I don't try to minimize the work of him, I think a better solution is to use PerforceNB plugin which I develop. You can take a look on that on http://kenai.com/projects/perforcenb/pages/Home

Leave a comment...

To Posterous, Love Metalab