Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't process class [module-info.class] (Unsupported version number [67.0] (maximum 65.65535, Java null)) #382

Open
kyxhik opened this issue Dec 10, 2024 · 3 comments

Comments

@kyxhik
Copy link

kyxhik commented Dec 10, 2024

Hello, I am trying to obfuscate my maven project. Below is the section that I added proguard to my pom.xml

`
com.github.wvengen
proguard-maven-plugin

            <executions>
               <execution>
                   <phase>package</phase>
                   <goals><goal>proguard</goal></goals>
               </execution>
            </executions>
            <configuration>
                <obfuscate>true</obfuscate>
                <injar>${project.build.finalName}.jar</injar>
                <outjar>${project.build.finalName}-final.jar</outjar>
                <inLibFilter>!module-info.class</inLibFilter>
                <outputDirectory>${project.build.directory}</outputDirectory>
                <proguardInclude>${basedir}/proguard.conf</proguardInclude>
                <libs>
					
				    <lib>${java.home}/jmods/java.base.jmod</lib>
				    <lib>${java.home}/jmods/java.logging.jmod</lib>
				    <lib>${java.home}/jmods/java.sql.jmod</lib>
				  </libs>
                <options>
                   
                    <option>
						

                        -keep class org.cytoscape.CytoCopasi.CyActivator
                        
                    </option>
                   
                </options>
            </configuration>
        </plugin>`

But I am getting the error: Can't process class [module-info.class] (Unsupported version number [67.0] (maximum 65.65535, Java null))

When I try to exclude module-info.class as follows: ${java.home}/jmods/java.base.jmod(!**.jar;!module-info.class) in lib, it perceives that as the full file path.

I also tried the following : !module-info.class, but to no avail.

I am not sure what I am missing. Could you please assist?

using proguard version 7.4.1
java version is jdk-23

Thanks in advance

@lasselindqvist
Copy link
Collaborator

You need to make sure you use Proguard that supports the Java version your class files use. What are the supported Java class file versions for 7.4.1?

@mickaelBree
Copy link

I've encountered the same error by building my app with java 22. It seems the Proguard version which is used in the 2.6.2-SNAPSHOT of this maven plugin would solved the issue.

Any ideas when it will be release ?

Thanks a lot.

@lasselindqvist
Copy link
Collaborator

You can use whatever Proguard you wish by changing the dependencies of the plugin in your pom.xml. So no need to wait for the plugin releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants