This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes IDEs, Version Control and other tools and the fly likes IDEA 7, classpath in JUnit configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "IDEA 7, classpath in JUnit configuration" Watch "IDEA 7, classpath in JUnit configuration" New topic
Author

IDEA 7, classpath in JUnit configuration

Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

This is something I was trying to find out a while ago.
Is it possible to set a custom classpath in JUnit configuration i.e. different from the classpath in the module(s)?


The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
Dmitry Jemerov
author
Ranch Hand

Joined: Nov 24, 2006
Posts: 120
Hello Sonny,

It is not currently possible to set a classpath directly, but you can define an empty module with the necessary set of dependencies in a classpath and select it in "Use classpath and JDK of module" setting of your JUnit run configuration.


Dmitry Jemerov<br />Development Lead<br />JetBrains, Inc.<br /><a href="http://www.jetbrains.com/" target="_blank" rel="nofollow">http://www.jetbrains.com/</a><br />"Develop with Pleasure"
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

Ahh..good suggestion.
Why didn't I think of that!

Thanks, Dmitry.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: IDEA 7, classpath in JUnit configuration