The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

*moon* (2) [Avatar] Offline
#1
Hi folks,

I have a problem and hope you can help me!
I just start with AspectJ and AOP in general and coded a really simple example. When I run it, I get the following error message:

java.lang.UnsupportedClassVersionError: HelloAOP (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Exception in thread "main"

I assume it has to do with an incompatibility between my Java, Eclipse and AspectJ versions...
I use the following:
- Java 1.4.2 (Is a must, because the customer needs 1.4.2)
- Eclipse 3.2.0
- AspectJ Development Tools 1.4.1

Which Eclipse and AJDT do I have to use to geht AspectJ going with my Java 1.4.2 ?

Thanks for your help!
ramnivas (171) [Avatar] Offline
#2
Re: Version problems using AspectJ, Eclipse, Java
You are running HelloAOP compiled in Java 5.0 on a Java 1.4 JVM. Try running on a Java 5 JVM. Alternatively, set "compiler compliance level" to 1.4 (Project->Java Compiler page in Eclipse).

-Ramnivas
*moon* (2) [Avatar] Offline
#3
Re: Version problems using AspectJ, Eclipse, Java
ramnivas - many many thanks smilie