File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

save export settings in eclipse?

 
Ben David
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 436
2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hauke Ingmar, you have a PM
 
Ben David
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will second the use of build tools!!!
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ben David
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
ScreenClip.png
[Thumbnail for ScreenClip.png]
 
Ben David
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Pie
Posts: 17628
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic