-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sloeber does not work with Java 16 or higher #1339
Comments
I guess something went wrong when downloading the file https://raw.githubusercontent.com/jantje/hardware/master/package_jantje_index.json Don't close this issue as this exception should be caught and handled properly |
So i restartet the IDE and now there are additional packages failing like that: The path fot the packages the ide is searching for is at: C:\eclipse\arduinoPlugin
I can´t find file nr. 3 in the directory and had to download it from your source. |
I guess looking at the content of the files will give you a clue why they are corrupt. |
I did a online json validator on all 3 files, but the format of the json files are valid. |
Did you upgrade your java version recently? |
Hello, Same kind of issue.
installed Apr 24th After downloading Sloeber (plugin), it returns Java error immediately, I tried too ad the json link for STM32duino and same. Here is a screen copy. |
Hello again, my problem is solved by downgrade Java in eclipse.ini file and using the JRE version 15 Now it doesn't compile properly, but this is another story :) |
Great thanks. Now we know java 16 or higher is a no go for now. |
I can confirm. I downgraded to java 16, reinstalled the plugin and all errors were gone. Thanks! |
Open JDK |
I reopen this issue as people do not search for closed issues |
Closing this as it is a known limitation and known limitations should be closed |
Reopening as we will need to find a fix given the changes in java management in eclipse |
to workaround this issue, add the following line to your eclipse.ini or sloeber.ini |
Also used the versionNumber class to store versions
Basically platformtree was about the same thing as what was read by Gson As I added the GSon read classes to the api there was no more need for platformtree The same goes for internalPackageManager
still need to do the install part removed the ([index name]) from the library name and added the indexname to the tooltip Added a (can update) tag when a newer version is available
still need to do the install part removed the ([index name]) from the library name and added the indexname to the tooltip Added a (can update) tag when a newer version is available
Now needed as there was no platform but only platform version
This was caused by asking the platformPath instead of the latest installed platformVersion Path
due to removal of referenced.core.path which is actually the same as runtime.platform.path While investigating I also found code that was only partially updated
follow up on this chage is lots of problems with tool versions in the environment variables.
Hi. I just switched to Java 17 and here we go again... It crashes even with the workaround given at the beginning. So I leave here the workaround for Java 17 until a new version of Sloeber is out. Add the following line to sloeber.ini or eclipse.ini: |
Can you test with the latest nightly? |
Hello. The nightly eclipse plugin works with the workaround removed. I had only time to test my old faithful serial blinker and it compiled ok, uploaded ok and then blinked and was able to write and read the serial port. So far no issues. |
Thanks for the feedback |
I use Opensuse 15.2 with OpenJDK 11. The product Sloeber 4.4.1.202201020122 ends with error: where Eclipse is installed in /opt/eclipse.2021.12 and SLOEBER_HOME is ~/ |
Thanks for the confirmation |
Should we add this to the ini? |
I don't think so as I implemented json readers for all json files. |
to workaround this issue, add the following line to your eclipse.ini or sloeber.ini
--illegal-access=permit
Describe the bug
I am trying to get ready with arduino on eclipse but when i hit "upload" the example code to the esp8266 it says:
"Please wait for the 'arduino installer job' to finish. Look at right bottom of the eclipse window to see if it is still running."
error log says:
Failed to parse json file "C:\eclipse\arduinoPlugin\package_jantje_index.json"
java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @4fd74814
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
at com.google.gson.internal.reflect.UnsafeReflectionAccessor.makeAccessible(UnsafeReflectionAccessor.java:44)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:159)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
at com.google.gson.Gson.getAdapter(Gson.java:458)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
at com.google.gson.Gson.getAdapter(Gson.java:458)
at com.google.gson.Gson.fromJson(Gson.java:931)
at com.google.gson.Gson.fromJson(Gson.java:870)
at io.sloeber.core.api.PackageManager.loadPackage(PackageManager.java:685)
at io.sloeber.core.api.PackageManager.loadJson(PackageManager.java:673)
at io.sloeber.core.api.PackageManager.loadJsons(PackageManager.java:645)
at io.sloeber.core.api.PackageManager.setJsonURLs(PackageManager.java:847)
at io.sloeber.ui.preferences.ThirdPartyHardwareSelectionPage.performOk(ThirdPartyHardwareSelectionPage.java:42)
at org.eclipse.jface.preference.PreferenceDialog$7.run(PreferenceDialog.java:905)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.preference.PreferenceDialog.okPressed(PreferenceDialog.java:889)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.okPressed(FilteredPreferenceDialog.java:461)
at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:233)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4209)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1043)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4026)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3626)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:66)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4209)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1043)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4026)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3626)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
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: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:78)
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:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1461)
provide the name of the board and the platform version you are using.
Provide the json url and a screenshot of project properties->arduino
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: