一周前,我所拥有的每个项目都正常工作,但当我将Eclipse更新为Oxygen版本并安装JDK-9时,事情变得异常奇怪。 当我尝试使用字符串时,经过一段时间(更像每次我保存项目),编译器会为我项目中的每个字符串抛出一个错误。
所以我尝试导入java.lang.String
以查看是否修复了错误:
它没有:(
我曾尝试在Google和SO上搜索这些消息,但我一无所获......
但是,在JDK 8中运行的代码似乎正常运行,请查看:
(代码在应用之前没有显示任何错误,因为我已经应用了,并再次为屏幕截图打开编译器首选项)
错误:在课程
me.mateusakino.ypul.yPuLTester
中找不到主要方法,请将主要方法定义为:
public static void main(String[] args)
或者JavaFX应用程序类必须扩展javafx.application.Application
!SESSION 2017-10-13 13:11:39.551 -----------------------------------------------
eclipse.buildId=4.7.1.M20171009-0410
java.version=9
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
This is a continuation of log file C:\Users\Home\Desktop\Developer Folders\Java\Oxygen Workspace\.metadata\.bak_0.log
Created Time: 2017-10-13 13:43:14.245
!ENTRY org.eclipse.core.resources 4 75 2017-10-13 13:43:14.245
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.jdt.core 4 75 2017-10-13 13:43:14.245
!MESSAGE Errors running builder 'Java Builder' on project 'yPuL'.
!STACK 0
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.ModuleBinding$UnNamedModule.canAccess(ModuleBinding.java:71)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:230)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Scope.java:2922)
at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:108)
at org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference.getTypeBinding(ArrayQualifiedTypeReference.java:93)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:495)
at org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference.internalResolveType(ArrayQualifiedTypeReference.java:107)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:586)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:582)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesWithSuspendedTempErrorHandlingPolicy(SourceTypeBinding.java:1932)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:1835)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:1525)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.internalFaultInTypeForFieldsAndMethods(SourceTypeBinding.java:907)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:902)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:514)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:882)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:141)
at java.base/java.lang.Thread.run(Thread.java:844)
!ENTRY org.eclipse.core.resources 4 2 2017-10-13 13:43:24.691
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
!ENTRY org.eclipse.core.resources 4 75 2017-10-13 13:43:24.695
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.jdt.core 4 75 2017-10-13 13:43:24.695
!MESSAGE Errors running builder 'Java Builder' on project 'yPuL'.
!STACK 0
java.lang.NullPointerException
!ENTRY org.eclipse.core.resources 4 2 2017-10-13 13:43:39.104
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
!ENTRY org.eclipse.core.resources 4 75 2017-10-13 13:43:39.110
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.jdt.core 4 75 2017-10-13 13:43:39.110
!MESSAGE Errors running builder 'Java Builder' on project 'yPuL'.
!STACK 0
java.lang.NullPointerException
!ENTRY org.eclipse.core.resources 4 2 2017-10-13 13:44:37.810
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.ModuleBinding$UnNamedModule.canAccess(ModuleBinding.java:71)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:230)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Scope.java:2922)
at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:108)
at org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference.getTypeBinding(ArrayQualifiedTypeReference.java:93)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:495)
at org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference.internalResolveType(ArrayQualifiedTypeReference.java:107)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:586)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:582)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesWithSuspendedTempErrorHandlingPolicy(SourceTypeBinding.java:1932)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:1835)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:1525)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.internalFaultInTypeForFieldsAndMethods(SourceTypeBinding.java:907)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:902)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:514)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:882)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:141)
at java.base/java.lang.Thread.run(Thread.java:844)
!ENTRY org.eclipse.core.resources 4 75 2017-10-13 13:44:37.814
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.jdt.core 4 75 2017-10-13 13:44:37.814
!MESSAGE Errors running builder 'Java Builder' on project 'yPuL'.
!STACK 0
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.ModuleBinding$UnNamedModule.canAccess(ModuleBinding.java:71)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:230)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Scope.java:2922)
at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:108)
at org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference.getTypeBinding(ArrayQualifiedTypeReference.java:93)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:495)
at org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference.internalResolveType(ArrayQualifiedTypeReference.java:107)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:586)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:582)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesWithSuspendedTempErrorHandlingPolicy(SourceTypeBinding.java:1932)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:1835)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:1525)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.internalFaultInTypeForFieldsAndMethods(SourceTypeBinding.java:907)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:902)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:514)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:882)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:141)
at java.base/java.lang.Thread.run(Thread.java:844)
!ENTRY org.eclipse.core.resources 4 2 2017-10-13 13:44:53.701
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.ModuleBinding$UnNamedModule.canAccess(ModuleBinding.java:71)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:230)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Scope.java:2922)
at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:108)
at org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference.getTypeBinding(ArrayQualifiedTypeReference.java:93)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:495)
at org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference.internalResolveType(ArrayQualifiedTypeReference.java:107)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:586)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:582)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesWithSuspendedTempErrorHandlingPolicy(SourceTypeBinding.java:1932)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:1835)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:1525)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.internalFaultInTypeForFieldsAndMethods(SourceTypeBinding.java:907)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:902)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:514)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:882)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:141)
at java.base/java.lang.Thread.run(Thread.java:844)
!ENTRY org.eclipse.core.resources 4 75 2017-10-13 13:44:53.706
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.jdt.core 4 75 2017-10-13 13:44:53.706
!MESSAGE Errors running builder 'Java Builder' on project 'yPuL'.
!STACK 0
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.lookup.ModuleBinding$UnNamedModule.canAccess(ModuleBinding.java:71)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:230)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Scope.java:2922)
at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:108)
at org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference.getTypeBinding(ArrayQualifiedTypeReference.java:93)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:495)
at org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference.internalResolveType(ArrayQualifiedTypeReference.java:107)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:586)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:582)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesWithSuspendedTempErrorHandlingPolicy(SourceTypeBinding.java:1932)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:1835)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:1525)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.internalFaultInTypeForFieldsAndMethods(SourceTypeBinding.java:907)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:902)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:514)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:882)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:141)
at java.base/java.lang.Thread.run(Thread.java:844)
!SESSION 2017-10-13 13:46:42.392 -----------------------------------------------
eclipse.buildId=4.7.1.M20171009-0410
java.version=9
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
!ENTRY org.eclipse.jface 2 0 2017-10-13 13:46:49.852
!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2017-10-13 13:46:49.852
!MESSAGE A conflict occurred for CTRL+TAB:
Binding(CTRL+TAB,
ParameterizedCommand(Command(org.eclipse.ui.window.nextEditor,Next Editor,
Switch to the next editor,
Category(org.eclipse.ui.category.window,Window,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@5e8359da,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
Binding(CTRL+TAB,
ParameterizedCommand(Command(org.eclipse.ui.window.nextEditor,Next Editor,
Switch to the next editor,
Category(org.eclipse.ui.category.window,Window,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@5e8359da,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
!SUBENTRY 1 org.eclipse.jface 2 0 2017-10-13 13:46:49.852
!MESSAGE A conflict occurred for CTRL+SHIFT+TAB:
Binding(CTRL+SHIFT+TAB,
ParameterizedCommand(Command(org.eclipse.ui.window.previousEditor,Previous Editor,
Switch to the previous editor,
Category(org.eclipse.ui.category.window,Window,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@36b6802f,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
Binding(CTRL+SHIFT+TAB,
ParameterizedCommand(Command(org.eclipse.ui.window.previousEditor,Previous Editor,
Switch to the previous editor,
Category(org.eclipse.ui.category.window,Window,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@36b6802f,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
!ENTRY com.vaadin.designer2 1 0 2017-10-13 13:47:00.882
!MESSAGE Schedule fetching all notifications
!ENTRY com.vaadin.designer2 1 0 2017-10-13 13:47:02.845
!MESSAGE Parse notifications
!ENTRY com.vaadin.designer2 1 0 2017-10-13 13:47:03.278
!MESSAGE Requesting user info (notification settings URL)
!ENTRY com.vaadin.designer2 1 0 2017-10-13 13:47:04.704
!MESSAGE HTTP Response code :200
!ENTRY org.eclipse.egit.ui 2 0 2017-10-13 13:47:06.014
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\Home'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
!ENTRY org.eclipse.dltk.core 4 0 2017-10-13 13:47:07.129
!MESSAGE Unable to find any indexer
!ENTRY org.apache.ivyde.eclipse 1 0 2017-10-13 13:48:10.554
!MESSAGE starting IvyDE plugin
!ENTRY org.apache.ivyde.eclipse 1 0 2017-10-13 13:48:10.571
!MESSAGE IvyDE plugin started
!ENTRY org.eclipse.ui 2 2 2017-10-13 13:48:12.395
!MESSAGE Invalid property category path: org.eclipse.cdt.managedbuilder.ui.properties.Page_head_build (bundle: org.eclipse.cdt.ui, propertyPage: org.eclipse.cdt.managedbuilder.ui.properties.BuildLogPreferencePage)
!ENTRY org.eclipse.jface 4 2 2017-10-13 13:48:45.611
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.IllegalArgumentException
at org.eclipse.core.resources.ProjectScope.<init>(ProjectScope.java:58)
at com.vaadin.designer2.eclipse.preferences.VisualDesignerPreferences.getProjectPreferences(VisualDesignerPreferences.java:680)
at com.vaadin.designer2.eclipse.preferences.VisualDesignerPreferences.getDefaultDesigner(VisualDesignerPreferences.java:245)
at com.vaadin.designer2.eclipse.preferences.DesignerProjectPreferencePage.createDesignerSelection(DesignerProjectPreferencePage.java:179)
at com.vaadin.designer2.eclipse.preferences.DesignerProjectPreferencePage.createContents(DesignerProjectPreferencePage.java:109)
at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:241)
at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1426)
at org.eclipse.jface.preference.PreferenceDialog$8.run(PreferenceDialog.java:1193)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1185)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:591)
at org.eclipse.jface.preference.PreferenceDialog$5.lambda$0(PreferenceDialog.java:657)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.preference.PreferenceDialog$5.selectionChanged(PreferenceDialog.java:654)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:872)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:869)
at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1238)
at org.eclipse.jface.viewers.StructuredViewer.lambda$0(StructuredViewer.java:1261)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:81)
at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:261)
at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:256)
at org.eclipse.jface.util.OpenStrategy$1.lambda$1(OpenStrategy.java:426)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4213)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
我可以reproduce在另一个工作区(Temp Workspace)中,这里是来自@howlger的.classpath
文件:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
https://bugs.eclipse.org/bugs/show_bug.cgi?id=526020
java.lang
&#39; s)。java.base
包(只有一个,来自jrt-fs.jar
)。New Java index
并重新重建:工作了大约3分钟,但随后出现了这个错误并且出现了故障再次回来:java.lang.ClassCastException建设时答案 0 :(得分:7)
在screenshot showing all installed Eclipse plug-ins中,我看到一些非常可疑的内容:您安装了两个相互矛盾的功能:
根据我对Eclipse中Patch功能的理解,第二个(较旧的)功能可能会覆盖前一个(较新的)功能的插件。这仍然意味着在更新到Oxygen.1a(支持Java 9的正式版本)之后,您有效地运行了几个星期的测试版。
要仔细检查,您可以切换到 Eclipse安装详细信息对话框的插件标签,然后搜索&#34; jdt&#34;。< / p>
这个观察结果可以很容易地解释为什么你仍然受到在发布之前已经修复的错误的影响。
解决方案:请尝试卸载修补程序功能(并查看配置
编辑:可以在compiler settings,合规性&#34; 9(BETA)&#34;清楚地表明您没有运行JDT的发行版本。
答案 1 :(得分:2)
对于Java 9支持,您需要:
Eclipse Oxygen.1a,可从https://www.eclipse.org/downloads/eclipse-packages/
获取或
选项1显然更简单,只要您可以控制安装和使用的Eclipse版本。
答案 2 :(得分:0)
对我来说,通过从Eclipse中删除项目(以及从磁盘中删除)来解决问题。然后git-clone并创建项目,问题就解决了。
答案 3 :(得分:0)
我在Eclipse Oxygen中遇到同样的问题,明确导入String包。更新eclipse并删除项目中使用的用户库后问题得到解决。
答案 4 :(得分:0)
Idk如果这有帮助,但我遇到了类似的问题:基本类无法识别。
我的混淆源于将rt.jar(和其他)捆绑成无扩展“模块”文件的新Java惯例---改变了一个十年前的类参考策略。
使用JDK-10(或JDK-9)编译Eclipse需要做一些事情:
注意:除非您执行了#2,否则上述#3是不可能的,因为在您提高编译器合规性级别(在#2中)之前,Eclipse不会引入“Modulepath”选项(在#3中)。
不可否认,这对大多数人来说可能是显而易见的......唉,我并不是最重要的。