Bug 92500 - Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException
Summary: Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/N...
Status: RESOLVED DUPLICATE of bug 92499
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.1.0   Edit
Hardware: PC Windows All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-23 16:35 EDT by Masroor Hussain CLA
Modified: 2005-04-26 08:27 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Masroor Hussain CLA 2005-04-23 16:35:45 EDT
Sample Hello.java File
public class Hello{

        public static void main (String []args)          {
                say ("Hello World");

        }
        public static void say (String arg)   
        {
                System.out.println  (arg);
        }
}

sample Manners.java
public aspect Manners
{
        pointcut callsay ():call (* Hello.say (..));
        before (): callsay ()
        {
                System.out.println ("Welecome");
        }

        after (): callsay ()
        {
                System.out.println ("Good bye");
        }
}
////

I am using AspectJ1.1 and jdk1.3.1, when i compile them with ajc Hello.java 
Manners.java, it successfully create respected class files. but when i execute 
java Hello.java. I prompts me following error:
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/aspectj/lang/NoAspectBoundException
at Hello.main(Hello.java:6)

Also I tried the same steps with AspectJ1.5 and it also prompts me said Error.
Comment 1 Andrew Clement CLA 2005-04-26 08:27:35 EDT

*** This bug has been marked as a duplicate of 92499 ***