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 8160793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:21:28+00:00 2026-06-06T18:21:28+00:00

I am using a X.jar and adding to my AspectJ project(in eclipse). I have

  • 0

I am using a X.jar and adding to my AspectJ project(in eclipse). I have written pointcut and advice for a method myMethod() inside X.jar.

But aspectj is not intercepting this method call.

How can I tell aspectj to intercept method calls on external jars.Or is it not possible?

Thanks

  • 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-06-06T18:21:29+00:00Added an answer on June 6, 2026 at 6:21 pm

    There are two options:

    a) compile the aspects into the JAR
    b) use load time weaving (I’d go with that one)

    Both of these are advanced topics, I’d suggest you read AspectJ in Action (2nd Ed) by Ramnivas Laddad to learn more.

    To clarify: there are different types of pointcuts. If your code calls the library’s methods, you can of course intercept these calls, as they happen in your code. So call() pointcuts will work, but execute() (and many other) pointcuts won’t because they change the executing method, which is not in your code base. So you have to either change the byte code of the library (option a) or change how it is loaded into your application (option b).

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

Sidebar

Related Questions

I need to create a jar file using eclipse IDE. But I am facing
I use eclipse sometimes to build my android project(Using ADT 19). If i have
I have a jar file and I invoke the jar using java -jar myjar.jar
I am using eclipse. When I add an external jar (import it.sauronsoftware.ftp4j.*;) it seems
I've created a GWT project using Eclipse which was working perfectly (I was able
I am using Netbeans to build a Maven project, and have the JTidy java
I'm trying to migrate an existing eclipse web project (wtp) to maven, using m2e.
I have a program which I wrote in Java using Eclipse and then put
using jar on the windows command prompt, how can I add foo.class to a
I'm currently using the jar-with-dependencies assembly to create such a jar. However, the name

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.