Possible Duplicate:
How to run build using graphics drivers by using optirun (Bumblebee) from IDE (Netbeans, Eclipse)?
I am running Ubuntu 11.10 with Bumblebee for the nvidia optimus graphics card. Everything works fine so far, so when I type optirun glxspheres
the graphics card fires up fine.
The problem I am having is with Eclipse when I build a Libgdx Desktop project it uses the old graphics card. I run eclipse using optirun ./eclipse
but for some reason when I build the project it still runs using the old graphics card.
Any ideas, why this might be happening or how I might be able to fix it?