Code Monkey home page Code Monkey logo

Comments (14)

henm avatar henm commented on June 8, 2024 2

I would also like to use Java 22 with proguard, so I created a PR similar to the one for Java 21 mentioned above: Guardsquare/proguard-core#127

Thanks!

from proguard.

mipastgt avatar mipastgt commented on June 8, 2024 1

The changes made by @henm have been merged already. Can we also expect a release in the near future :-? That would be great.

from proguard.

eduveks avatar eduveks commented on June 8, 2024 1

The support to Java 22 urges!

Caused by: java.lang.UnsupportedOperationException: Unsupported version number [66.0] (maximum 65.65535, Java null)

Please as soon as possible! We need 🚀

Thank you 🙌

from proguard.

mrjameshamilton avatar mrjameshamilton commented on June 8, 2024

It looks like none of the features or changes in Java 22 require any special handling by ProGuard beyond the version number (e.g. no new attributes, bytecode instructions).

Could you make a PR with the required changes, similar to the changes made for Java 21? Guardsquare/proguard-core#92

from proguard.

xberkhout avatar xberkhout commented on June 8, 2024

I do not understand. You say it is very easy and you ask me to make a Pull Request? I am not familiar with the code and GitHub policies, so for me it is a lot of work finding out what you mean and how to do that. I can wait, but I would hope there is an update when JDK 22 releases on March 19. I am not requesting special favors only that Proguard is compatible with the current JDK and maybe even with the EA when there is a release candidate.

from proguard.

lordarnoud avatar lordarnoud commented on June 8, 2024

Came here as well to look for a release date on the Java 22 support in maven! I am currently migrating the application from Java 8 to 22 and found out it uses proguard and now I am stuck on the final step before being able to release :(

from proguard.

eduveks avatar eduveks commented on June 8, 2024

@lordarnoud to bypass this issue and not delay the releases, what I made was compile with Java 21 and then flawless run with Java 22.

It is not how we like to work, but until the new Proguard comes out, the only way to run with Java 22 is by compiling to Java 21.

Of course, it is very bad for us programmers because we are unable to use in the source code any new feature of Java 22 yet... 😭

But at least in production, we can benefit from Java 22! 🚀

from proguard.

xxDark avatar xxDark commented on June 8, 2024

I just stumbled across the same problem. I made a tool that can change classfile version in one go in directories/zip archives/single files.
It only changes version of the class, no actual backporting is done.
The command line syntax is ... majorVersionFrom majorVersionTo file1 file2 file3 "file4"
(majorVersion is the JDK version, not classfile version)
Example use is as follows (Change version in shadow jar, from 22 to 21):

val changeVersion = tasks.register<JavaExec>("changeVersion") {
    javaLauncher.set(javaToolchains.launcherFor {
        languageVersion.set(JavaLanguageVersion.of(17))
    })
    classpath(project.file("versionchanger.jar"))
    mainClass.set("dev.xdark.versionchanger.CLI")

    args(
        listOf("22", "21") + listOf(project1, project2, project3)
                .map { it.tasks.shadowJar.get().archiveFile.get().asFile.absolutePath }
    )
}

Hope someone finds this useful.

from proguard.

mipastgt avatar mipastgt commented on June 8, 2024

@xxDark What makes you think that an incompatible class file gets compatible by just changing a number in it? This may just lead to difficult to trace crashes.

from proguard.

xxDark avatar xxDark commented on June 8, 2024

@xxDark What makes you think that an incompatible class file gets compatible by just changing a number in it? This may just lead to difficult to trace crashes.

Nothing makes me think that. That is why I put the text in bold.
JDK 22 classfile format did not change (correct me if I'm wrong), and I needed to use Proguard with it. It did not work, so I made that fast tool to change all classfile versions for me.
I'm well aware that classfiles don't get compatible by just changing their major version.

from proguard.

lordarnoud avatar lordarnoud commented on June 8, 2024

Is there a release date in sight for this? :) Or any updates on it?

from proguard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.