Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

help in setting classpath in ant

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am using windows2000 and have installed ant in D Drive.
My directory structure is something like

D:\ant\source\src\com\pack1\pack2 (com\pack1\pack2 are packages)
D:\ant\source\conf.jar
D:\ant\source\datasocket.jar
D:\ant\source\thirdparty\xercesImpl.jar

and I have created the follwoing build.xml

<?xml version="1.0"?>

<project name="Proj" default="compile" basedir=".">
<property name="name" value="Proj" />
<property name="build" value="${basedir}\build" />
<property name="source" value="${basedir}\source" />
<property name="baselib" value="\source" />

<target name="compile">
<javac srcdir="${source}" destdir="${build}">
<classpath>

<pathelement location="${baselib}\mysql-connector-java-3.0.6-stable-bin.jar" />
<pathelement location="${baselib}\photos.jar" />
<pathelement location="${baselib}\conf.jar" />
<pathelement location="${baselib}\jh.jar" />
<pathelement location="${baselib}\jhall.jar" />
<pathelement location="${baselib}\jhbasic.jar" />
<pathelement location="${baselib}\jhsearch.jar" />
<pathelement location="${baselib}\datasocket.jar" />
<pathelement location="${baselib}\log4j-1.2.7.jar" />
<pathelement location="${baselib}\thirdparty\xercesImpl.jar" />
<pathelement location="${baselib}\thirdparty\xmlParserAPIs.jar" />


</classpath>
</javac>
</target>

</project>

But when i try to execute it, i get errors which indicate that java files cannot find the jar files that is some problem with the classpath.

[javac] D:\ant\source\src\com\pack1\pack2\Test.java
143: cannot resolve symbol
[javac] symbol : class Logger
[javac] location: class com\pack1\pack2\Test.java
[javac] private Logger logger = Logger.getLogger(Test.class);
...
[ August 15, 2004: Message edited by: Thomas Greene ]
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Specify your file paths using a forward slash (/).
You have used an absolute path for ${baselib}.

Execute with the -v option and you will see where you have gone wrong with the verbose output.
 
Thomas Greene
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tried changing slashes doesn't help.
With -v option I am only getting file does not exist
 
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic