• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant CLASSPATH Question

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Trying to set up an ANT build for a project and am having some CLASSPATH issues.

Java File Located Here: c:\<MYPATH>\src\com\defenseknife\server\DnServer.java

I tried setting classpath in build.xml as specified in FAQ.

Here is the output ...

$ ant compile
Buildfile: build.xml

init:

compile:
[javac] Compiling 1 source file to c:\java\moteng\build
[javac] c:\java\moteng\src\com\defenseknife\server\DnServer.java:
3: package com.defenseknife.tools does not exist
[javac] import com.defenseknife.tools.*;
[javac] ^
[javac] 1 error

BUILD FAILED
c:\java\moteng\build.xml:22: Compile failed; see the compiler error output for d
etails.

Total time: 1 second

I am only getting this error when import statement is present.

If I set classpath through shell and do a straight javac, everything works.

Here is my build.xml ...



Any help is greatly appreciated!

Happy new year ...

-Qaz
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Qazzi",
Please check your private messages.
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy "Qazzi",

Welcome to JavaRanch

As one of our moderators (Jeanne) asked, please change your display name according to ranch's naming policy.

Everything looks fine. Where does your build.xml reside?
 
Aryeh Golob
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Happy New Year Raghavan!

Just figured it out.

I had the following import statement in DnServer.java

import com.defenseknife.tools.*;

As tools directory was empty, I could not compile even though directory existed.

Thanks a lot!

-Aryeh
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's great. Thank you
 
reply
    Bookmark Topic Watch Topic
  • New Topic