When compiling your project with JDK 5, you might get the following compilation failure:
[INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Compilation failure ... class file has wrong version 50.0, should be 49.0
The class file version 50.0 is used by Java 6.0, and 49.0 is used by Java 5.0.
Querydsl is tested against JDK 6.0 only, as we use APT extensively, which is available only since JDK 6.0.
If you want to use it with JDK 5.0 you might want to try to compile Querydsl yourself.
To use Querydsl with JDK 5.0 you also need to exclude querydsl-hql-apt and include querydsl-apt-jdk5 like this :
<dependency> <groupId>com.mysema.querydsl</groupId> <artifactId>querydsl-hql</artifactId> <version>0.4.4</version> <exclusions> <exclusion> <groupId>com.mysema.querydsl</groupId> <artifactId>querydsl-hql-apt</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.mysema.querydsl</groupId> <artifactId>querydsl-apt-jdk5</artifactId> <version>0.4.4</version> <scope>provided</scope> </dependency>