Il y a une semaine, chacun de mes projets fonctionnait normalement, mais lorsque j'ai mis à jour Eclipse vers la version Oxygen et installé JDK-9, les choses sont devenues étranges. Lorsque j'essaie d'utiliser des chaînes, après un certain temps (plus comme à chaque fois que je sauvegarde le projet), le compilateur me renvoie une erreur pour chaque chaîne de mon projet.
J'ai donc essayé d'importer Java.lang.String
pour voir si cela corrige l'erreur:
"Le package Java.lang est accessible à partir de plusieurs modules: Java.base, Java.base"
Ce n'est pas :(
J'ai essayé de rechercher ces messages sur Google et SO mais je n'ai rien trouvé ...
Cependant, le code dans JDK 8 semble fonctionner normalement, vérifiez-le:
(Le code ne montre aucune erreur avant l'application parce que j'ai appliqué et ouvre à nouveau les préférences du compilateur pour la capture d'écran)
Erreur: Méthode principale introuvable dans la classe
me.mateusakino.ypul.yPuLTester
, définissez la méthode principale comme suit:public static void main(String[] args)
ou une classe d'application JavaFX doit étendrejavafx.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)
Je pourrais le reproduire dans un autre espace de travail (Espace de travail temporaire), et voici le fichier .classpath
demandé à @howlger:
<?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
).Java.base
(il n'y en avait qu'un, parmi jrt-fs.jar
).New Java index
et reconstruction à nouveau: travail pendant environ 3 minutes, mais cette erreur est apparue et les problèmes sont revenus: Java.lang.ClassCastException en construisantDans le capture d'écran montrant tous les plug-ins Eclipse installés }, je vois quelque chose de très louche: vous avez installé deux fonctionnalités en conflit:
D'après ma compréhension des fonctionnalités de correctif dans Eclipse, la deuxième fonctionnalité (la plus ancienne) pourrait éventuellement remplacer les plug-ins de l'ancienne (la plus récente). Cela signifie que, même après la mise à jour vers Oxygen.1a (la version officielle avec prise en charge de Java 9), vous exécutez une version bêta de plusieurs semaines.
Pour vérifier, vous pouvez basculer vers le Plug-ins onglet du Détails de l'installation Eclipse et rechercher "jdt".
Cette observation pourrait facilement expliquer pourquoi vous êtes toujours affecté par des bogues corrigés bien avant la publication.
Solution: Veuillez essayer désinstaller la fonction de correctif (et repasser la configuration
EDIT: Davantage de preuves sont visibles dans les paramètres du compilateur _, conformité " 9 (BETA) " indique clairement que vous n'exécutez pas la version. version de JDT.
Pour le support Java 9, vous avez besoin des éléments suivants:
Eclipse Oxygen.1a, disponible à partir de https://www.Eclipse.org/downloads/Eclipse-packages/
ou
Configurez manuellement votre support Eclipse pre-Oxygen.1a avec Java 9, selon https://wiki.Eclipse.org/Configure_Eclipse_for_Java_9
L'option 1 est clairement la plus simple, tant que vous avez le contrôle sur la version d'Eclipse que vous installez et utilisez.
J'ai eu le même problème dans Eclipse Oxygen pour importer le paquet String explicitement. Le problème a été résolu après la mise à jour de Eclipse et la suppression de la bibliothèque utilisateur utilisée dans le projet.
Idk si cela aide mais j'ai rencontré un problème similaire: les classes de base n'étaient pas reconnues.
Ma confusion est née de la nouvelle convention Java consistant à regrouper rt.jar (et autres) dans un fichier "modules" sans extension - changeant une stratégie de référence de classe vieille de dix ans.
Obtenir la compilation d’Eclipse avec JDK-10 (ou JDK-9) a donc nécessité quelques choses:
Remarque: le n ° 3 ci-dessus n'est possible que si vous avez exécuté le n ° 2 car Eclipse n'introduira pas l'option "Modulepath" (en n ° 3) tant que vous n'avez pas augmenté votre niveau de conformité du compilateur (en n ° 2).
Certes, cela était probablement évident pour la plupart des gens ... hélas, je n'étais pas le plus.
Pour moi, le problème a été résolu en supprimant le projet d’Eclipse (et en le supprimant du disque). Ensuite, git-clone et créer un projet et le problème a été résolu.