• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

save export settings in eclipse?

 
Ranch Hand
Posts: 67
  • 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?

 
Rancher
Posts: 436
2
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hauke Ingmar, you have a PM
 
Ben David
Ranch Hand
Posts: 67
  • 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?




 
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will second the use of build tools!!!
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • 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
  • 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
  • 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.

 
Saloon Keeper
Posts: 22483
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • 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.
    Bookmark Topic Watch Topic
  • New Topic