Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] HELP: LTW: -javaagent=aspectjweaver.jar or -javaagent:aspectjweaver?

The documentation on this standardized option is there
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/instrument/package-summary.html

Alex

On 7/28/05, Guofeng Zhang <guofeng@xxxxxxxxxxxxx> wrote:
>  
>  
> 
> Hi, 
> 
>   
> 
> I am studying the load-time weaving. 
> 
>   
> 
> If I use "-javaagent=aspectjweaver.jar", I got "Unrecognized option:
> -javaagent=aspectjweaver.jar". 
> 
>   
> 
> If I use "-javaagent:aspectjweaver.jar" in the following command line: 
> 
> D:\workdir>D:\workdir\platform\jdk1.5.0\bin\java -cp
> aspectjsamplesw.jar;aspectjsamples.jar;aspectjweaver.jar;aspectjrt.jar
> -javaagent:aspectjweaver.jar helloworld.Hello 
> 
> Exception in thread "main"
> java.lang.ClassNotFoundException: aspectjweaver.jar 
> 
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200) 
> 
>         at
> java.security.AccessController.doPrivileged(Native Method) 
> 
>         at
> java.net.URLClassLoader.findClass(URLClassLoader.java:188) 
> 
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:290) 
> 
>         at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:279)
> 
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:236) 
> 
>         at
> sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:165)
> 
> FATAL ERROR in native method: processing of -javaagent failed 
> 
>   
> 
> Can anyone kindly help me what's wrong with the above line? 
> 
>   
> 
> aspectjsamplesw.jar contains the aspects, and aspectjsamples.jar is a java
> application that want to be woven by aspectjsamplesw.jar. 
> 
>   
> 
> Thanks 
> 
>   
> 
> Guofeng 
> 
>   
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
> 
>


Back to the top