Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 555753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:50:51+00:00 2026-05-13T11:50:51+00:00

When I run javadoc on my java source code, I get this error for

  • 0

When I run javadoc on my java source code, I get this error for th Junit test class:

[javadoc] /mypath/TestStuff.class: warning: Cannot find annotation method 'expected()' in type 'org.junit.Test': class file for org.junit.Test not found

The problem appears with junit version 4 with this type of annotation:

@Test(expected=Exception.class)

Obvisouly, it sounds like javadoc cannot find org.junit.Test but why would it need it in the 1st place ? How do I fix that ?

Cheers
David


UPDATE:

the junit jar is not on my project classpath but is in $ANT_HOME/lib. This way, I don’t have to add it to my project lib folder and the junit ant target works fine.

It sounds like the javadoc target in ant doesn’t use the $ANT_HOME/lib to look for jars

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:50:51+00:00Added an answer on May 13, 2026 at 11:50 am

    org.junit.Test is the class defining the @Test annotation that you’re using. Sounds like you need to add the junit jar to the classpath.

    EDIT: I set up projects with ant to use 2 classpaths, one for regular classes and one for test-only stuff, and I add junit to the test-only classpath.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run ant task, however I get the following error: [javadoc]
run(/test.js) in mongo shell. i always get error run(/test.js) shell: started program /test.js sh2516|
I run this code here <html> <script type=text/javascript src=lib/jquery-ui-1.8.21.custom.min.js></script> <script src=http://127.0.0.1:5984/_utils/script/jquery.couch.js></script> <!--<script type=text/javascript src=lib/jquery-1.7.2.js></script>-->
I run the following code from command line: public class MemoryTest { public static
Here is my problem: This piece of code throws a java.util.ConcurrentModificationException , because the
I'm learning these days how to use ant to run automated test folowing this
The javadoc about the class java.lang.ThreadLocal is making me confused. They are saying that
I run command: sudo apt-get install phpmyadmin to install phpMyAdmin. Then I enter address:
I run into this problem. I have a textarea which I only want to
My goal is to understand every single bit of the following example: http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.