facebook

Setting execution classpath for JUnit Tests

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #278435 Reply

    intelliobjects
    Participant

    To run a specific JUnit test I have to add specific jars (ex. log4j.jar) to the classpath tab associated with the the ‘Run As’ -> ‘Open Run Dialog’ operation associated with each JUnit class which is very tedious. When running the same project in MyEclipse 5.5 I did not have to do this.

    Is there a way to add these jars to that they will automatically be associated with the classpath of every JUnit test I execute within the IDE? Since the jars are on the project classpath I thought MyEclipse would have found the jar files.

    Any pointers appreciated.

    #278457

    Loyal Water
    Member

    You can attach the jars to the project build path. Right Click on the project and go to > Build Path > Add Libraries > JUnit to add the JUnit libraries.

    To add other jars like the log4j.jar, you can create a User Library with these jars and add them to your project build path by right clicking on the project and going to Build Path > Add Libraries > User Libraries.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Setting execution classpath for JUnit Tests

You must be logged in to post in the forum log in