1,609 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
3
votes
1
answer
182
views
Cannot resolve symbol 'ProcessHandle' on Android Studio
For some strange reason, I cannot make ProcessHandle be resolved in my Android Studio environment:
Android Studio Koala | 2024年1月1日 Patch 1
Build #AI-241.18034.62.2411.12071903, built on July 11, 2024
...
0
votes
0
answers
70
views
Why ServiceLoader.load(...) runs ok, but fails my tests?
I have a Spring Boot project with 2 jigsaw modules (java 21).
Inner module with only one public package with interfaces and DTOs; also it provides an implementation for UseCase service:
module com....
0
votes
0
answers
54
views
Having trouble setting up Maven on MAC OS
I have been trying for the past week to set up maven on my MacBook Pro. I have looked through this forum and tried different solutions however I am still stuck and that is why I am compelled to post ...
2
votes
0
answers
159
views
Unable to fine related module of `javax.ws.rs.core.MediaType` class
I am applying java 9 modules to my java application. In my java
application it contains import statement import javax.ws.rs.core.MediaType.
When I add module-info.java file, that statement provides ...
0
votes
1
answer
763
views
Java 9 Modules & IntelliJ: how to configure multiple modules
I am trying to create a very simple java modules project in IntelliJ with multiple modules.
Accordingly documentation in https://openjdk.org/projects/jigsaw/quick-start#multimodulecompile inside src ...
2
votes
1
answer
753
views
Error message mentions Java 9 even though I am using Java 11
I have a Java 11 Gradle project for work. I am using IntelliJ Idea. I have some test errors, so I'm trying to debug. The error message I'm asking about appears to be unrelated to the test errors, but ...
0
votes
0
answers
59
views
Are there any solutions available that would eliminate the need to add `jvm` options when using Java 9 modules?
I am new to using Java 9 modules.
I am aware that there are different types of Java 9 modules such as Automatic modules and Unnamed modules.
I am curious why I am able to use third-party dependencies ...
0
votes
0
answers
537
views
Mockito cannot mock this class - Caused by: NoClassDefFoundError: sun/misc/ObjectInputFilter$FilterInfo
While executing JUnits with OpenJdk-11, Mockito-3.12.4 and powermock-2.0.9 getting below error. Also, I am using third party library (pcm.jar) which is compiled by Java 1.8.
Error is -
...
-1
votes
1
answer
217
views
Java9 'asIterator' equivalent implementation in Java8 [duplicate]
Below piece of code is using asIterator() method from Java 9 can someone please help me to convert below code compatible with Java 8?
private static Function<ClassLoader, Stream<URL>> ...
1
vote
0
answers
79
views
Is android system support multi-release jar?
I included a multi-release jar into app.libs and call the api in the jar(the api simply print current jdk version). But it didn't work.
Will multi-release jar work in android? How to make it work?
0
votes
0
answers
75
views
Vaadin 14, production build and java version 9 not working
I need some of features of java 9 and I have vaadin 14 app. When I changed java.version in the pom.xml to the java version 9, app. is not running in Tomcat server (production build). Tomcat only show ...
0
votes
0
answers
81
views
Java module system: how to avoid leaking all packages of transitive modules
In java module system, we can have:
module hellomodule {
exports com.name.hello;
requires transitive greetings;
}
by doing this the packages exposed by greetings module will effectively ...
0
votes
1
answer
417
views
Cannot access 'java.lang.Object' error with new Android Studio Electric Eel
I just installed the new Electric Eel Android Studio stable version, but I am getting the following error messages below although the project builds without errors. The errors are happening in the ...
3
votes
0
answers
77
views
Distinguish empty Stream, Stream of empty Optionals only, Stream with at least one non-empty Optional [duplicate]
I have a Stream<Optional<T>>.
I want to use the findFirst()/findAny() methods to return a value. However I want to throw different exceptions depending on the Stream being empty or not.
...
2
votes
0
answers
117
views
How to configure java 9 module with many shared java 8 dependencies?
I have a project where dependencies were designed based on java 8, I'm using java 9 modules. I keep getting errors related to multiple exports.
java: java.lang.reflect.InvocationTargetException
...