eclipse-jdt / eclipse-jdt/eclipse.jdt.core

Compile error with level 11 not with 8

Open
#279 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
237
Forks
195
Avg merge
1d 12h
Merged PRs (30d)
47

Description

So I have a program that uses jdt to compile java files programatically

```
org.eclipse.jdt
org.eclipse.jdt.core
3.30.0
```
In the end the code passes through org.eclipse.jdt.internal.compiler.batch.Main.compile

with these arguments

```
0 = "-encoding"
1 = "UTF-8"
2 = "-cp"
3 = "/tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/libs/timber-4.7.1.aar.jar:/tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/libs/drawerlayout-1.1.1.aar.jar:/tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/libs/okay-root-detector-0.0.2.jar:/tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/libs/psa-dex-common.jar:/tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/libs/fragment-1.3.6.aar.jar:/tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/libs/core-1.6.0.aar.jar:/tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/libs/androidprocesses-library.jar:/tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/libs/play-services-tasks-18.0.1.aar.jar:/tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/libs/okay-emulator-detector-1.0.1.jar:/tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/libs/tracing-1.0.0.aar.jar:/tmp/junit152"
4 = "-d"
5 = "/tmp/junit15207897193845956912/junit4999128491980564402"
6 = "-11"
7 = "-proc:none"
8 = "-preserveAllLocals"
9 = "-noExit"
10 = "-enableJavadoc"
11 = "/tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/sources/com/protectoria/psa/dex/auth/core/ui/pages/BaseDynamicPageFactory.java"
```

and fails with the following error

` Type java.lang.Object is indirectly referenced from required .class files but cannot be resolved since the declaring package java.lang exported from module java.base conflicts with a package accessible from module at //tmp/junit15207897193845956912/f231d0d6-8614-4de7-9f54-bbf90ce1bd31/sources/com/protectoria/psa/dex/auth/core/ui/pages/BaseDynamicPageFactory.java:1 `

Program compiles as expected using level 8, parameter as 6 = "-8"

Also note, I'm using java JDK 11 on my local machine

Any help is appreciated!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.