OnJava8-Examples icon indicating copy to clipboard operation
OnJava8-Examples copied to clipboard

Project setup

Open RedemptionC opened this issue 2 years ago • 1 comments

I'm confused about the setup. in Readme, it states that we should use JDK 8, I installed JDK 8 (Corretto), but in the repo, it clearly used some features introduced in more recent Java versions, such as Var and record

Also, there seems to be a mismatch between package name and project structure: for example the file CompletableUtilities.java is in .../OnJava8-Examples/concurrent/CompletableUtilities.java, but the package name declared in it is onjava, the compiler complains: Package name 'onjava' does not correspond to the file path

I tried to use a workaround adding the project's root directory into the dependency in Jetbrains Idea's IDE setting (Project structure -> modules -> dependencies -> add JAR or directories) It seemed to solve the mismatch issue, but then there're other weird problems, such as on @Override: Method does not override method from its superclass

at last, in the readme, when referring to the right Java version, it points to Oracle's JDK 8, what's wrong with OpenJDK? @BruceEckel

RedemptionC avatar Nov 07 '23 12:11 RedemptionC

Also, when trying to build this project ( in Idea), it shows error like this: A problem occurred evaluating root project 'OnJava8-Examples'.

Failed to apply plugin 'com.mindviewinc.tagging'. Cannot add task 'Applicator' as a task with that name already exists.

RedemptionC avatar Nov 07 '23 13:11 RedemptionC