• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Classpath and folders

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I would like it so that when I go to run a Java application (or unit test) from within WebSphere, the directory MyProject/lib is already (by default) on the classpath. This lib directory contains properties files (for log4j) that the applications require to run succesfully.

Now I can achieve this by going into the Run... dialog, selecting the Classpath tag, unchecking "Use default class path" and adding the lib folder. But since this is required for a medium sized development team involving, it would be much more convenient if the lib directory was there by default. Also by unticking the "Use default class path" check-box, any further changes that are made to the project are not picked up when the Run configuration is re-invoked.

The classpath that is specified by default, is I assume, derived from the build-path of the project. However I see no way to add a non Java source folder to the build path (indeed, why would a java compiler require this!). Does anyone know how websphere derives the default class-path and if a non java source folder can be added?

There is also a tag on the Run... dialog which specifies the "bootstrap classes". Does anyone know how this can be modified so I could add the folder?

Thanks in advance,
David
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
David,
We work around this by putting our property files in a separate java project that is just for resources and not code. In WSAD 4, you were able to refer to a non-java project. Hopefully, they will put this functionality back in RAD 6.
 
David Edds
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanne,

Yes that has worked for me. I created a Java WSAD project (a simple project seemed not to work) called "Resources" and put my .proeprties file in there. Putting a dependency on the other projects so they referred to the "Resources" project puts the project on the classpath by default and the .properties file is picked up by default.

I also put all of the dependant .jar files in "Resources" too, so it's starting to become a little large, but at least everything is located in one central location.

Thanks for the advice. It's worked in exactly the way I wanted.
David
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic