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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:46:28+00:00 2026-06-01T04:46:28+00:00

To avoid the long class path issue in windows, i modified my build.xml like[1]

  • 0

To avoid the long class path issue in windows, i modified my build.xml like[1]
introduced a property called “temp” and referring that from “path location”
But now im getting “Class not found” exception[2].
How can i correct my script?

If i don’t use the “temp” property and try to read “temp.classpath” as my “javac” classpath” i get long classpath issue..(That is why i introduced that property and made “javac” path as “javac.classpath”)

[1]
<target name="init">
        <mkdir dir="${class.dir}"/>
        <mkdir dir="./../../work/temp/sampleClient"/>       
          <path id="temp.classpath">        
            <pathelement path="${class.dir}"/>
            <pathelement path="../../lib"/>         
            <fileset dir="../../repository/components/plugins">             
                <include name="*.jar"/>                 
            </fileset>>
            <fileset dir="../../lib">
                <include name="*.jar"/>
            </fileset>
            <fileset dir="../../lib/endorsed">
                <include name="*.jar"/>
            </fileset>
            <fileset dir="../../repository/components/extensions">
                <include name="*.jar"/>
            </fileset>
            <fileset dir="../../repository/components/lib">
                <include name="*.jar"/>
            </fileset>  
             </path>    
        <property name="temp" refid="temp.classpath" />
        <path id="javac.classpath"> 
            <pathelement location="${temp}"/>       
        </path>         
    </target>


[2]

init:

compile:

stockquote:
     [java] java.lang.NoClassDefFoundError: samples/userguide/StockQuoteClient
     [java] Caused by: java.lang.ClassNotFoundException: samples.userguide.StockQuoteClient
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
  • 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-01T04:46:29+00:00Added an answer on June 1, 2026 at 4:46 am

    In ANT to avoid long classpath issue there is ManifestClasspath task available ..I used that and now it is working properly in windows and linux..
    I have written a blog[1] entry here with the sample..If anyone find it useful..

    http://vvratha.blogspot.com/2012/04/avoiding-long-classpath-issue-in-ant.html

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

Sidebar

Related Questions

How do I avoid requiring code like this: public static class BusinessLogicAutomapper { public
I'm trying to avoid code like this when reusing the same ViewUserControl in ASP.NET
I've modified an object dumping method to avoid circual references causing a StackOverflow error.
public class Room { static belongsTo = [hotel:Hotel] Source source long sourceid RoomType type
look the UML image. I've got a generic class called BinaryProblem, this one receives
Let's say I have a class like so: class Gerbil{ int id; float x,y,z;
This might sound like a stupid problem but I wondered for a long time
I'm trying to build a smaller SQL, to avoid the select * from A
Is there any way to make a code like this work: public class Func2<A,
I have a bean with CommonsMultipartFile type field like so: public class Placement implements

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.