Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7905861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:39:57+00:00 2026-06-03T10:39:57+00:00

I’m using java with eclipse on windows 7, and I’m trying to build a

  • 0

I’m using java with eclipse on windows 7, and I’m trying to build a server program that will run on another (ubuntu) machine on my network.

How can I get eclipse to save the built class files into an external location (I have a drive mapped, or it could even be over ssh/sftp/whatever)?

I have created a git repository on that machine, so the class files are saved in there, however the external libraries that I’m using (which are on the build path) are not being saved as part of the repository. Ideally I would like to have eclipse copy the built classes and libraries used into another directory automatically (and even more ideally get it to run/kill the program automatically when I click on “run”, although I suspect that might be being a little too optimistic).

I think ant which I believe is installed with eclipse can do this, but I’m not sure how to make it happen.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:39:59+00:00Added an answer on June 3, 2026 at 10:39 am

    You mentioned jar files, and they are actually dependencies. You may want to take a look at some dependency management system like Ivy, or switch to Maven, if you really don’t want to include those jar files in your repository.

    And alternatively, you are always able to copy the dependencies with Ant’s build “scripts” (although they are XMLs, not really “scripts”).

    How can I get eclipse to save the built class files into an external location (I have a drive mapped, or it could even be over ssh/sftp/whatever)?

    It’s hard to think of a way to solve “how to save them into an external location”. However, you can just write a target, using <scp> task (based on ssh) or <ftp> task, to copy the files after running the standard building.

    Ideally I would like to have eclipse copy the built classes and libraries used into another directory automatically.

    Eclipse has built-in support for Ant. I don’t use Eclipse, but I use Netbeans. In Netbeans, a project is actually built with the Ant build file generated by Netbeans. And, you can customize the build file, add your own targets, and then, you can run your own target inside the IDE.

    For example, you have a build target, a deploy target, a run target. The first is generated by Eclipse and you don’t need to care about it, while the latter two are written by you. Just write another target, say all, and use <antcall> to run the three targets above one after another. And then, in Eclipse, you can directly run all target to get all the things handled by Ant.

    even more ideally get it to run/kill the program automatically when I click on “run”, although I suspect that might be being a little too optimistic.

    The target machine is a Linux machine, so you can install SSH server easily with apt-get on it. Write two targets in your ant build file, one is run, and the other is kill.

    Inside the run target, you can use <sshexec> to run your app. The only thing you need to take care is the environment varibles defined on that machine may not be available in ssh session. But that’s just a configuration problem. At least you can put the varibles in /etc/environment, although that’s not the best practice.

    The kill target may be a little more complicated. However, in my opinion, if you can write a startup.sh to start an app, you can always write a stop.sh to close it (take a look at Tomcat’s catalina.sh).

    And also, the kill target can be called inside your Eclipse.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to
I'm trying to create an if statement in PHP that prevents a single post
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.