Wednesday, January 20, 2010

Something messed up my classpath in Netbeans 6.8

I was working with a Twitter Java app in NetBeans, and suddenly I couldn't run my project from NetBeans 6.8. The strange thing was that I could compile it on NetBeans and then run the jar file on a terminal window!  After two stinking hours of struggling with my project configuration, I found out it was a problem with the classpath, thanks to the tips I found on http://en.allexperts.com/q/Java-1046/main-class.htm.

So, basically, if suddenly you cannot run projects on NetBeans, try fixing up your classpath, and maybe your problem will be solved.

On Windows, type
 set CLASSPATH=.;%CLASSPATH%
on a Command Prompt window.

On Linux, type

CLASSPATH=.:$CLASSPATH
export CLASSPATH

On a terminal window.

Posted via email from alromero's posterous

No comments:

Post a Comment