The Artima Developer Community
Sponsored Link

Java Buzz Forum
Making sure classes are in your project CLASSPATH via ant

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Making sure classes are in your project CLASSPATH via ant Posted: Aug 5, 2004 1:32 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Making sure classes are in your project CLASSPATH via ant
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement
javap is one of those nice command line tools that you can use to print out info on a given class. I sometimes run into problems in a project where the right jars may not all be in my lib directories (see last post ;). I use a simple ant task to give me a sanity check (outside of my IDE of course, as that may be setup differently). I run: % ant find-class -Dclass.name=java.lang.String and the simple task is... <!-- =================================================================== --> <!-- Find the class in the classpath --> <!-- =================================================================== --> <target name="find-class" description="Find the class in the classpath"> <fail unless="class.name" message="You must pass a class name in via -Dclass.name=package.class"/> <echo message="Finding class: ${class.name}"/> <exec executable="javap"> <arg line="-classpath ${project.classpath} ${class.name}"/> </exec> </target> I am always surprised that I can't find a <javap> ant task too.

Read: Making sure classes are in your project CLASSPATH via ant

Topic: Matter and Anti-Matter Previous Topic   Next Topic Topic: Just installed IntelliJ IDEA 4.5

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use