Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Junit question.

  • 31-12-2001 9:58am
    #1
    Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭


    If I create a jar of my classes and add it to the classpath I can get junit tests I make to run, however if they are laid out flat it doesn't work?

    anyone know why?


Comments

  • Registered Users, Registered Users 2 Posts: 391 ✭✭dragonkin


    Whats the stack trace?
    Probably a classpath problem is the code directory added ?

    DK


  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    Are you using the fully qualified package name? Are the class files in their appropriate directories?


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Originally posted by Enygma
    Are you using the fully qualified package name? Are the class files in their appropriate directories?

    *smack* :) More fool me for expecting it to do more then it should.

    Working fine now. thanks.


  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    Had a feeling it would be, I've seen hardened pros making the same mistake time after time. :)
    Wonder why?


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    well I was running the Junit from the directory of the class, which wasn't working but if say did the following.

    cd \junit3.7
    java -cp junit.jar junit.samples.AllTests

    That worked (from memory, but you get the jist).


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 16,414 ✭✭✭✭Trojan


    Originally posted by Enygma
    I've seen hardened pros making the same mistake time after time. :)
    Wonder why?

    cos they're hardened pros, dont expect to make those mistakes, so get out of the habit of checking for them (as they make them so rarely).

    Such is life :)

    Al.


Advertisement