Я попытался запустить проект карты java, включая расширенный файл CAP. Он содержит 1 основной пакет и еще 2 дополнительных пакета.
Когда я запускаю его, в консоли симулятора возникает ошибка, как показано ниже.
Launching run configuration...
Launch failed: class org.eclipse.core.internal.resources.Project cannot be cast to class org.eclipse.jdt.core.IJavaElement (org.eclipse.core.internal.resources.Project is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @31ceba99; org.eclipse.jdt.core.IJavaElement is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @3881b884)
Please be sure to use Package Explorer for launching.
И журналы ошибок находятся здесь.
Message : Unhandled event loop exception
java.lang.ClassCastException: class org.eclipse.core.internal.resources.Project cannot be cast to class org.eclipse.jdt.core.IJavaElement (org.eclipse.core.internal.resources.Project is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @31ceba99; org.eclipse.jdt.core.IJavaElement is in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @3881b884)
at com.oracle.javacard.jcdk.launch.runconfiguration.AppletRunShortcut.findTypes(AppletRunShortcut.java:76)
at org.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchShortcut.searchAndLaunch(JavaLaunchShortcut.java:115)
at org.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchShortcut.launch(JavaLaunchShortcut.java:281)
at com.oracle.javacard.jcdk.launch.runconfiguration.AppletRunShortcut.launch(AppletRunShortcut.java:132)
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:430)
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runInternal(LaunchShortcutAction.java:88)
at org.eclipse.debug.internal.ui.actions.LaunchShortcutAction.runWithEvent(LaunchShortcutAction.java:135)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:579)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:413)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1046)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:760)
at org.eclipse.jface.action.ActionContributionItem.lambda$8(ActionContributionItem.java:1247)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4213)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4030)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3630)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1158)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1047)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:658)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:557)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:154)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:150)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
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:567)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
Может кто-нибудь объяснить мне, как это решить? Пожалуйста, дайте мне знать об этом. Большое спасибо!