2

I have the same question related to this: aop.xml name and location?

In the answers, it says:

use the system property: -D org.aspectj.weaver.loadtime.configuration=META-INF/myaop.xml

What does "use the system property" mean?

create a aop.properties file? Or, write in the vm option?

kriegaex
  • 63,017
  • 15
  • 111
  • 202

1 Answers1

3

AFAIK there is no such thing as aop.properties. Have you just made this up? The hint means you should specify the property as a JVM command line parameter like this, if the given path can be resolved as a Java resource path/URL:

java ... -Dorg.aspectj.weaver.loadtime.configuration=META-INF/myaop.xml ...

If you explicitly want to point to the file system, you have to precede the path by file:, e.g.

java ... -Dorg.aspectj.weaver.loadtime.configuration=file:META-INF/myaop.xml ...

or

java ... -Dorg.aspectj.weaver.loadtime.configuration=file:c:\my\path\META-INF\myaop.xml ...

Attention: no white space between -D and the property name!


Update:

What does "use the system property" mean?

Your favourite search engine will lead you to pages like:

  • Oracle Java tutorial
  • System Javadoc, specifically methods
    • getProperties(),
    • getProperty(String),
    • getProperty(String, String),
    • setProperties(Properties),
    • setProperty(String, String),
    • clearProperty()
kriegaex
  • 63,017
  • 15
  • 111
  • 202
  • FYI, I just updated this old answer after it got some new attention (upvote) after many years and still the answer has not been accepted. As it is the OP's first and only question here for 6 years, probably he will never check back on it, but maybe the answer helps others with the same question. – kriegaex Oct 09 '20 at 00:39