Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Path setting problem in java task

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi i am using the following code



and my javac target is



I get the message that path variable org.compile.classpath is not set when i try to run this. Can you please point out what is the mistake.
 
Bartender
Posts: 4107
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch

There are many ways to do this, one way would be to refer the path to jar files in classpath of the javac task.

Then use this as a refid to the classpath
 
J J Singh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You , classpath is working now.

I have following problem further.

I am using Ant 1.8.2 and Junit 4.8

My build file is



When i run this from Eclipse it runs fine.

When i try to run it using Ant outside eclipse it gives error as Failed

The targets are clean , init ,compile.org , compile.test , testing.junit

When i run clean , init , compile.org and comiple.test from ant it runs fine. But when i run the testing.junit inside ant it gives error as




My code for Calculator.java and its test class CalculatorTest.java is




CalculatorTest.java





Thanks once again in advance
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you figure this out ? I have the same issue.
 
You can thank my dental hygienist for my untimely aliveness. So tiny:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic