Hi Rick.

The classpath is often used as a way to find property files, using something
like:

  getClass().getClassLoader().getResourceAsStream( propertyFileName )

This will search the classpath for a non-class resource such as a property
file and open it for reading.  This is quite a common trick to avoid
hard-coding platform-specific file paths.

HTH,
Dan


> -----Original Message-----
> From: Vestal, Rick [mailto:[EMAIL PROTECTED]]
> Sent: 18 December 2001 12:40
> To: '[EMAIL PROTECTED]'
> Subject: RE: [Eap-list] non-jar files in classpath?
> 
> 
> Ok...thanks, that did take care of the issue (we've moving to 
> be compatible
> with Junit from our custom framework).  Now to figure out why code was
> examining the classpath for a properties file....
> 
> Thanks,
> 
> -- Rick
> 
> > -----Original Message-----
> > From: Jason Boehle [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, December 17, 2001 1:40 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: RE: [Eap-list] non-jar files in classpath?
> > 
> > 
> > You don't add files to the classpath, you never have.  Add 
> > the directory
> > that the file is in to the classpath, then Junit should be 
> > able to find it.
> > The only things you put on the classpath are directories and 
> > jar files.
> > 
> > Jason Boehle
> > [EMAIL PROTECTED]
> > 
> > 
> > -----Original Message-----
> > From: Vestal, Rick [mailto:[EMAIL PROTECTED]] 
> > Sent: Monday, December 17, 2001 1:08 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: [Eap-list] non-jar files in classpath?
> > 
> > 
> > I'd like to add a properties file to the classpath for a 
> > junit run.  This
> > doesn't seem possible with Idea.  I can't add it throught the 
> > dialog because
> > only directories and jar files are available for selection.  
> > If I add it to
> > the ipr file, the classpath dialog shows it as a file that 
> > doesn't exist.
> > 
> > Is it possible to get a non-jar file in the classpath?
> > 
> > Thanks,
> > 
> > -- Rick
> > 
> > _______________________________________________
> > Eap-list mailing list
> > [EMAIL PROTECTED] 
> > http://www.intellij.com/mailman/listinfo/eap-list
> > 
> > _______________________________________________
> > Eap-list mailing list
> > [EMAIL PROTECTED]
> > http://www.intellij.com/mailman/listinfo/eap-list
> > 
> 
> _______________________________________________
> Eap-list mailing list
> [EMAIL PROTECTED]
> http://www.intellij.com/mailman/listinfo/eap-list
> 


***************************************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error please notify [EMAIL PROTECTED] 
immediately.

This footnote also confirms that this email message has been swept for the 
presence of computer viruses.
***************************************************************************************

_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list

Reply via email to