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 8542985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:11:50+00:00 2026-06-11T12:11:50+00:00

Please notice first: I don’t need to include .jar files! I want to include

  • 0

Please notice first: I don’t need to include .jar files!

I want to include .java files from another java project with ant. But I don’t know how and google has also no idea.
My build.xml looks like this:

<project>

    <!-- Main properties -->
    <property name="projectname"    value="rasco" />
    <property name="mainclass"      value="de.beyermatthias.rasco.Rasco" />
    <property name="lib.dir"        value="./lib/java-speech-api/src/" />

    <path id="classpath">
            <pathelement path="${lib.dir}"/>
    </path>

    <!-- Tasks -->
    <!-- Clean Task -->
    <target name="clean">
            <delete dir="build" />
    </target>

    <!-- Compile Task -->
    <target name="compile" depends="clean" >
            <mkdir dir="build/classes" />
            <javac srcdir="src" destdir="build/classes/">
            </javac>
    </target>

    <!-- Jar Task -->
    <target name="jar" depends="compile" >
            <mkdir dir="build/jar" />
            <jar destfile="build/jar/${projectname}.jar" basedir="build/classes/">
                    <manifest>
                            <attribute name="Main-Class" value="${mainclass}" />
                    </manifest>
            </jar>
    </target>

    <!-- Run Task -->
    <target name="run">
            <java jar="build/jar/${projectname}.jar" fork="true" />
    </target>
</project>

My project hierarchy like this:

 .
 ├── build
 │   └── classes
 ├── build.xml
 ├── lib
 │   └── java-speech-api
 │       ├── CHANGELOG.markdown
 │       ├── CREDITS.markdown
 │       ├── java-speech-api.iml
 │       ├── README.markdown
 │       └── src
 │           ├── com
 │           │   └── darkprograms
 │           │       └── speech
 │           │           ├── microphone
 │           │           │   └── Microphone.java
 │           │           ├── recognizer
 │           │           │   ├── FlacEncoder.java
 │           │           │   ├── GoogleResponse.java
 │           │           │   └── Recognizer.java
 │           │           └── synthesiser
 │           │               └── Synthesiser.java
 │           └── META-INF
 │               └── MANIFEST.MF
 └── src
     └── de
         └── beyermatthias
             └── rasco
                 └── Rasco.java

Most tutorials talk about including .jar files in the classpath, but I need to include the .java files, as you can see. I hope you can help me.

  • 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-11T12:11:51+00:00Added an answer on June 11, 2026 at 12:11 pm

    You can include folders of compiled .class files, but not .java source files.

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

Sidebar

Related Questions

please go to www.espacioasir.com first and notice how the second article has been 'crushed'
I first want to get a list of files stored in an FTP directory
Please check out http://rainsongmanchesters.net/news.htm and notice the black strip above the header image. Now
I'm a novice, so please don't be too hard on me. The concept is
please have a look at the following code import java.util.ArrayList; import java.util.List; public class
Please i need help, this code below works fine on my localhost, php5.3+ but
Please look the following query: SELECT ID, START, END FROM TABLEA the result is:
I'm migrating to C++ from C and the very first thing I've noticed is
First question on SOF, please be gentle if this may be a stupid question.
NOTICE This is a rather large question, so please bear with me and I

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.