I've been tasked to help manage an older java spring repository using java 10. Since java 10 are no longer supported I've been unable to use it on my laptop.
I use IntelliJ IDEA as my IDE and have downloaded the JDK from OpenJDK Archive. Since I am using ubuntu i also follow this answer to install it.
Somehow, when I tried to connect the JDK to my IDE gradle shows this error:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/7.4/userguide/gradle_daemon.html
Process command line: /home/bbr/Downloads/jdk-10.0.2/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /home/bbr/.gradle/wrapper/dists/gradle-7.4-bin/c0gwcg53nkjbqw7r0h0umtfvt/gradle-7.4/lib/gradle-launcher-7.4.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 7.4
Please read the following process output to find out more:
-----------------------
java.lang.Error: java.net.URISyntaxException: Ill_______________- 7.4/lib/gradle-launcher-7.4.jar
at java.base/java.io.File.toURI(File.java:738)
at org.gradle.internal.classloader.ClassLoaderVisitor.extractJava9Classpath(ClassLoaderVisitor.java:74)
at org.gradle.internal.classloader.ClassLoaderVisitor.visit(ClassLoaderVisitor.java:51)
at org.gradle.internal.classloader.ClasspathUtil.collectClasspathOf(ClasspathUtil.java:77)
at org.gradle.internal.classloader.ClasspathUtil.getClasspath(ClasspathUtil.java:59)
at org.gradle.api.internal.classpath.EffectiveClassPath.findAvailableClasspathFiles(EffectiveClassPath.java:36)
at org.gradle.api.internal.classpath.EffectiveClassPath.<init>(EffectiveClassPath.java:32)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.<init>(DefaultModuleRegistry.java:70)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.<init>(DefaultModuleRegistry.java:64)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.<init>(DefaultModuleRegistry.java:60)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:46)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
at org.gradle.launcher.daemon.bootstrap.GradleDaemon.main(GradleDaemon.java:22)
Caused by: java.net.URISyntaxException: Illegal character in path at index 32: file:/home/bbr/.gradle/wrapp w7r0h0umtfvt/gradle-7.4/lib/gradle-launcher-7.4.jar
at java.base/java.net.URI$Parser.fail(URI.java:2915)
at java.base/java.net.URI$Parser.checkChars(URI.java:3086)
at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3168)
at java.base/java.net.URI$Parser.parse(URI.java:3116)
at java.base/java.net.URI.<init>(URI.java:685)
at java.base/java.net.URI.<init>(URI.java:786)
at java.base/java.io.File.toURI(File.java:736)
... 12 more
After checking around I also found that javac output this error when I type javac
on the terminal:
Usage: javac <options> <source files>
where possible options include:
optiile
-Akey[=value] Options to pass to annotation processors
--add-modules <module>(,<module>)*
Root modules to resolve in addition to the initial modules, or all modules
on the module path if <module> is ALL-MODULE-PATH.
--boot-class-path <path>, -bootclasspath <path>
Override location of bootstrap class files
--class-path <path>, -classpath <path>, -cp <path>
Specify where to find user class files and annotation processors
-d <directory> Specify where to place generated class files
-deprecation
Output source locations where deprecated APIs are used
-encoding <encoding> Specify character encoding used by source files
-endorseddirs <dirs> Override location of endorsed standards path
-extdirs <dirs> Override location of installed extensions
-g Generate all debugging info
-g:{lines,vars,source} Generate only some debugging info
-g:none Generate no debugging info
-h <directory>
Specify where to place generated native header files
--help, -help Print this help message
--help-extra, -X Print help on extra options
-implicit:{none,class}
Specify whether or not to generate class files for implicitly referenced files
-J<flag> Pass <flag> directly to the runtime system
--limit-modules <module>(,<module>)*
Limit the universe of observable modules
--module <module-name>, -m <module-name>
Compile only the specified module, check timestamps
--module-path <path>, -p <path>
Specify where to find application modules
--module-source-path <module-source-path>
Specify where to find input source files for multiple modules
--module-version <version>
Specify version of modules that are being compiled
-nowarn Generate no warnings
-parameters
Generate metadata for reflection on method parameters
-proc:{none,only}
Control whether annotation processing and/or compilation is done.
-processor <class1>[,<class2>,<class3>...]
Names of the annotation processors to run; bypasses default discovery process
--processor-module-path <path>
Specify a module path where to find annotation processors
--processor-path <path>, -processorpath <path>
Specify where to find annotation processors
-profile <profile>
Check that API used is available in the specified profile
Exception in thread "main" java.util.ServiceConfigurationErm.Plaed
at java.base/java.util.ServiceL1)
at java.base/java.util.ServiceLoader.access$100(ServiceLoader.java:390)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:803)
at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:721)
at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1394)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at jdk.compiler/com.sun.tools.javac.main.Option$14.help(Option.java:317)
at jdk.compiler/com.sun.tools.javac.main.Option.lambda$showHelp$1(Option.java:965)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1378)
at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395)
at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.base/java.util.stream.Aeline.java:485)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at jdk.compiler/com.sun.tools.javac.main.Option.showHelp(Option.java:964)
at jdk.compiler/com.sun.tools.javac.main.Option.access$300(Option.java:86)
at jdk.compiler/com.sun.tools.javac.main.Option$18.process(Option.java:369)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:202)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:165)
at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
Caused by: java.lang.ExceptionInInitializerError
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:779)
... 28 more
Caused by: java.lang.IllegalArgumentException: Illegal character in path at index 32: jrt:/java.base/META-INF/servicesvider
at java.base/java.net.URI.create(URI.java:883)
at java.base/jdk.internal.module.SystemModuleFinders$SystemModuleReader.find(SystemModuleFinders.java:439)
at java.base/jdk.internal.loader.BuiltinClassLoader$2.run(BuiltinClassLoader.java:408)
at java.base/jdk.internal.loader.BuiltinClassLoader$2.run(BuiltinClassLoader.java:403)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/jdk.internal.loader.BuiltinClassLoader.findMiscResource(BuiltinClassLoader.java:402)
at java.base/jdk.internal.loader.BuiltinClassLoader.findResources(BuiltinClassLoader.java:333)
at java.base/jdk.internal.loader.BootLoader.findResources(BootLoader.java:161)
at java.base/java.lang.ClassLoader.getResources(ClassLoader.java:1457)
at java.base/java.lang.ClassLoader.getResources(ClassLoader.java:1455)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1195)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1220)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
at java.base/java.nio.file.spi.FileSystemProvider.loadInstalledProviders(FileSystemProvider.java:119)
at java.base/java.nio.file.spi.FileSystemProvider.access$000(FileSystemProvider.java:77)
at java.base/java.nio.file.spi.FileSystemProvider$1.run(FileSystemProvider.java:169)
at java.base/java.nio.file.spi.FileSystemProvider$1.run(FileSystemProvider.java:166)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.nio.file.spi.FileSystemProvider.installedProviders(FileSystemProvider.java:166)
at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:411)
at jdk.compiler/com.sun.tools.javac.platform.JDKPlatformProvider.<clinit>(JDKPlatformProvider.java:97)
... 33 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 32: jrt:/java.base/META-INF/servicesvider
at java.base/java.net.URI$Parser.fail(URI.java:2915)
at java.base/java.net.URI$Parser.checkChars(URI.java:3086)
at java.base/java.net.URI$Parser.parseHierarchical(URI.java:3168)
at java.base/java.net.URI$Parser.parse(URI.java:3116)
at java.base/java.net.URI.<init>(URI.java:600)
at java.base/java.net.URI.create(URI.java:881)
... 55 more
I have used other jdk for example by installing it from sdkman and it still output the same error. I have no idea why this happens and when I tried it on my friends computer (running manjaro) it works out just fine.
Can anyone help me with this?
Sorry for the bad grammar since english is not my first language.
Edit:
I use the manual installation since the ppa no longer supports java 10.
I have selected jdk 10 in IDEA both in
Project Settings > Project > SDK
and in
Gradle > Gradle JVM
Edit 2:
- I am using Intel based system.
- The result of
javac 2>error.txt
shows a possibility of encoding error as shown in the image here: Gedit Screenshot
I have tried using UTF-8 and ISO-8859-15 encoding and both have shown the same character error \00\
multiple times.
- The result of
alias
is shown below and does not show any information about java.
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto