Bug 128744 - LTW doesn't work using JRE1.4 in Eclipse
Summary: LTW doesn't work using JRE1.4 in Eclipse
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 1.3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Sian January CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-20 23:38 EST by liu wen zhong CLA
Modified: 2012-04-03 14:26 EDT (History)
0 users

See Also:


Attachments
my test application (2.93 KB, text/plain)
2006-02-21 05:31 EST, liu wen zhong CLA
no flags Details
executed result snapshot (105.58 KB, text/plain)
2006-02-21 05:34 EST, liu wen zhong CLA
no flags Details
Launch configuration (1.92 KB, text/plain)
2006-02-21 09:19 EST, Sian January CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description liu wen zhong CLA 2006-02-20 23:38:48 EST
LTW doesn't work using JRE1.4 in Eclipse

now I want to support JRE1.4 when LTW.
I defined a aop.xml file in application META-INF path, it works fine using JRE1.4 in command-line, aop.xml file is used when LTW, the command as below:

"D:\work\BTM\eclipse 3.1.1\eclipse-SDK-3.1.1-win32\eclipse-1.4.2\jre\bin\java" -classpath "C:\aspectj1.5\lib\aspectjweaver.jar" "-Djava.system.class.loader=org.aspectj.weaver.loadtime.WeavingURLClassLoader" "-Daj.class.path=D:\work\BTM\eclipse 3.1.1\jre1.4.2\myTest;C:\aspectj1.5\doc\examples\armtest\jar\btm-deps-e3.1.jar;C:\aspectj1.5\doc\examples\armtest\jar\btm-rt.jar" Hello


but it doesn't work in Eclipse, I added upper command to VM arguments, it can't find aop.xml, because if I changed aop.xml to be wrong, there is no any error when execute the application in Eclipse , but there will be error when execute it in command-line, based on this point, I think that aop.xml didn't be used in Eclipse, I also tried to add "-Daj.aspect.path=D:\work\BTM\eclipse 3.1.1\jre1.4.2\myTest", but it is still. so I want to confirm if AspectJ only supports command-line for JRE1.4? doesn't support Eclipse for JRE1.4?

BTW, my Eclipse env: eclipse 3.1.1 + ajdt_1.3_for_eclipse_3.1 + Sun JDK 1.4.2.
I also tried to use eclipse 3.1.2, but this problem is still existed.
Comment 1 liu wen zhong CLA 2006-02-21 05:31:29 EST
Created attachment 35059 [details]
my test application

the attached file Test.jar(only 3KB) is my test application, which includes four files: Hello.java, World.aj, run.bat and aop.xml in META-INF, Hello.java only prints "Hello", and World.aj and aop.xml will print "World". if I execute run.bat, there will print "Hello" and "World". but I run the class Hello in Eclipse, there is only print "Hello". snapshot.doc is my executed result in my env, you can refer to it.
Comment 2 liu wen zhong CLA 2006-02-21 05:34:04 EST
Created attachment 35060 [details]
executed result snapshot
Comment 3 Sian January CLA 2006-02-21 09:18:44 EST
I think you just need to adjust your launch configuration slightly.  Could you try this one that I'm about to attach?  Put it in your project and then right click > Run As > Run.. and select "Hello".
Comment 4 Sian January CLA 2006-02-21 09:19:34 EST
Created attachment 35067 [details]
Launch configuration
Comment 5 liu wen zhong CLA 2006-02-22 02:50:37 EST
Based on you attached file , I fixed this problem, the cause is to must add aspectjweaver.jar to User Entries even if already added it to Java Build Path, and remove current project in User Entries in run Classpath tab,  Thanks for you helps