wood burning stoves*
The moose likes IDEs, Version Control and other tools and the fly likes save export settings in eclipse? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "save export settings in eclipse?" Watch "save export settings in eclipse?" New topic
Author

save export settings in eclipse?

Ben David
Ranch Hand

Joined: Oct 01, 2010
Posts: 67
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?

Hauke Ingmar Schmidt
Rancher

Joined: Nov 18, 2008
Posts: 433
    
    2
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.
Ralf Schoenfeld
Greenhorn

Joined: Feb 04, 2011
Posts: 1
Hi Hauke Ingmar, you have a PM
Ben David
Ranch Hand

Joined: Oct 01, 2010
Posts: 67
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

BUILD FAILED
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?




Sunny Bhandari
Ranch Hand

Joined: Dec 06, 2010
Posts: 448

I will second the use of build tools!!!


Java Experience
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Looks like you need to install a JDK and set JAVA_HOME to point to it. Right now, JAVA_HOME is pointing only to a JRE, and the JRE doesn't include the compiler.


JBoss In Action
Ben David
Ranch Hand

Joined: Oct 01, 2010
Posts: 67
Peter Johnson wrote:Looks like you need to install a JDK and set JAVA_HOME to point to it. Right now, JAVA_HOME is pointing only to a JRE, and the JRE doesn't include the compiler.


I have JDK installed -- I have tried setting a "JAVA_HOME" variable to point it everywhere I can think of (in windows env variables, in eclipse in the ant build set up, etc)


I just need to know what JAVA_HOME variable ant is looking at -- because I can't seem to find it no matter where


[Thumbnail for ScreenClip.png]

Ben David
Ranch Hand

Joined: Oct 01, 2010
Posts: 67


I think I got it.

It appears eclipse has to be closed and reopened after the windows environment variable is changed.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: save export settings in eclipse?
 
Similar Threads
Eclipse Import/Export
NetBeans Project question
Any WAR utility in WSAD ?
how to create jar file in WSAD?
Export to war file in eclipse 3.1