Java 25 support
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 1.7k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
Java 25 is the latest LTS and was released a couple of months ago in Sep 2025: https://openjdk.org/projects/jdk/25/
~~If you need AOP support, version 7.0.0 doesn't currently work. A related issue has already been reported, but I think we should track Java 25 support independently.~~
https://github.com/google/guice/issues/1822
~~Workaround:~~
~~If you don't need AOP features, you can use:~~
```
com.google.inject
guice
7.0.0
no_aop
```
As pointed below, there's no `no_aop` anymore. The issue was resolved because of some dependency management declarations in the POM and is probably not a general issue.
The only issue I can now reproduce is the following warning:
```
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper (file:/home/bruno/.m2/repository/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
```
Running this code:
```
static class C1 {
private final String s1;
@Inject C1(String s) { s1 = s; }
public String getS1() { return s1; }
}
void main() {
var module = new AbstractModule() {
@Override
protected void configure() {
bind(String.class).toInstance("Hello, Guice!");
bind(C1.class);
bindInterceptor(Matchers.any(), Matchers.any(), new MethodInterceptor() {
@Override
public Object invoke(MethodInvocation methodInvocation) throws Throwable {
IO.println("Invoking " + methodInvocation.getMethod());
return methodInvocation.proceed();
}
});
}
};
var injector = Guice.createInjector(module);
var c1 = injector.getInstance(C1.class);
IO.println(c1.getS1());
}
```
Contributor guide
Assessment
This issue has not been assessed yet.