|
|
|
|
Re: error in running gradle based project with java9+ modules [message #1823539 is a reply to message #1823535] |
Sat, 28 March 2020 15:23 |
hossein mahdavipour Messages: 9 Registered: December 2017 |
Junior Member |
|
|
how to check "Is modular"? in the project properties in java build path(as the picture i showed earlier) if I expand the jar node it is written: Is modular - not modifiable.
the "commons-math3...jar" is not a modular jar it should be added as an automatic module.
and the run config:
Quote:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<stringAttribute key="bad_container_name" value="/mymodule/qq.txt"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/mymodule/src/main/java/mymodule/Library.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE" value="true"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="mymodule.Library"/>
<listAttribute key="org.eclipse.jdt.launching.MODULEPATH">
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry path="4" projectName="mymodule" type="1"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry containerPath="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-13/" path="4" type="4"/>
"/>
<listEntry value="<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<runtimeClasspathEntry containerPath="org.eclipse.buildship.core.gradleclasspathcontainer" javaProject="mymodule" path="4" type="4"/>
"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="mymodule"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="mymodule"/>
</launchConfiguration>
and thank you for your help. I have struggling on this for about two weeks.
[Updated on: Sat, 28 March 2020 15:26] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
Re: error in running gradle based project with java9+ modules [message #1823569 is a reply to message #1823550] |
Sun, 29 March 2020 08:54 |
hossein mahdavipour Messages: 9 Registered: December 2017 |
Junior Member |
|
|
I change the gradle settings and now the jars in java build path are "Is modular" but still I get the same error.
what I added to build.gradle:
Quote:
eclipse {
classpath {
file {
whenMerged {
entries.findAll { it.properties.kind.equals('lib') }.each {
it.entryAttributes['module'] = 'true'
}
entries.findAll { isModule(it) }.each { //(1)
it.entryAttributes['module'] = 'true'
}
entries.findAll { isSource(it) && isTestScope(it) }.each {
it.entryAttributes['test'] = 'true'
}
entries.findAll { isLibrary(it) && isTestScope(it) }.each {
it.entryAttributes['test'] = 'true'
}
}
}
}
}
[Updated on: Sun, 29 March 2020 08:54] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03939 seconds