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
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(
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
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
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).

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