I have a project and everytime I want to make a jar, I have to select export, and then manually uncheck everything but the src folder before I click finish. How can I save settings to that I can build the project with (more or less) 1 click?
Use a build tool. Maven and Ant are the most common in the Java ecosphere, both have fine integrations into Eclipse. For Maven you need to install a plugin via the marketplace, Ant integration ships with Eclipse.
Hauke Ingmar Schmidt wrote:Use a build tool. Maven and Ant are the most common in the Java ecosphere, both have fine integrations into Eclipse. For Maven you need to install a plugin via the marketplace, Ant integration ships with Eclipse.
trying to use ant now. I get the following error
C:\Users\bbeetle\Documents\workspace\com.brightsoftware.opinionaccess\build.xml:54: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre6"
I cant seem to figure out where it is definine "JAVA_HOME" -- where is that coming from? How do I change it?
One thing that can get you into trouble in Windows is having spaces in the directory path name ("Program Files").
When you change environment variables using the Control Panel, existing "DOS" command windows will not be updated. Newly-opened windows will reflect the changes, however. For existing windows, just use a SET command. SET doesn't apply to other windows, though - only the window that the command was issued in.
Finally, I believe that if you use the built-in Ant in Eclipse, you can set its Java compiler path as part of the run setup dialog. So you only need JAVA_HOME and ANT_HOME when you're running Ant straight from the command line without Eclipse.
An IDE is no substitute for an Intelligent Developer.