Exception in thread “main” java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
at com.sun.jna.platform.win32.Shell32.(Shell32.java:32)
at com.sun.jna.platform.win32.Shell32Util.getSpecialFolderPath(Shell32Util.java:104)
at processing.app.platform.WindowsPlatform.getAppDataPath(WindowsPlatform.java:317)
at processing.app.platform.WindowsPlatform.getSettingsFolder(WindowsPlatform.java:263)
at processing.app.Platform.getSettingsFolder(Platform.java:109)
at processing.app.Base.getSettingsFolder(Base.java:1877)
at processing.app.Base.getSettingsFile(Base.java:1903)
at processing.app.Language.(Language.java:37)
at processing.app.Preferences.init(Preferences.java:82)
at processing.mode.java.Commander.(Commander.java:240)
at processing.mode.java.Commander.main(Commander.java:86)
Running processing-java without parameters works well.
Running the code within processing 3.3.7 works well.
System: win10 pro, java jre 1.71 32&64bit, processing 3.3.7.
I was wrong
I solve it on windows 7 (office pc).
On windows 10 it don’t works.
I think should be a problem with jna and some folders permission (temporary folder?).
I have a similar issue as the OP. I am trying to get processing-java for the command line to work on mac osx 10.13 to run Processing2 sketches from the terminal.
So after installing the Tools>Install processing-java in Processing2
when I type $ processing-java
in the terminal i get this response:
/usr/local/bin/processing-java: line 13: /Applications/Processing.app/Contents/PlugIns/jdk1.8.0_181.jdk/Contents/Home/jre/bin/java: No such file or directory
This used to work fine, but now it doesn’t anymore and I am getting quite clueless about this. Does anyone know which step I should take to fix this issue.
Just a guess (!), but it seems as if you installed processing-java from Processing 3, but your Processing app is Processing 2. Maybe fully uninstall processing-java and reinstall it using Processing 2?
If not, possibly check open issues relating to that jdk specifically…