Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant CLASSPATH Question

 
Aryeh Golob
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • 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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Qazzi",
Please check your private messages.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
  • 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: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's great. Thank you
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic