Processing-java error

I got the following error when running this processing-java command:

processing-java --sketch="C://PDE3/max/button" --output="C://PDE3/max/button/output" --force --run

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.

Can you help me?
Thanks

Either work:

$> processing-java --force --sketch=C:\Users\C\button --output=C:\Users\C\button\out --run
Finished.

$> processing-java --force --sketch="c:/Users/C/button" --output="c:/Users/C/button/out" --run
Finished.

where the button pde has an empty setup and draw.

Kf

1 Like

@kfrajer
Thanks !!!
The problem was the double quotes.
I change it from “ to " and all works well.
cameyo

I was wrong :frowning:
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?).

Partial solution:

  1. create o batch file with the processing-java command
  2. run this batch file as Administrator

p.s. all works well until last win 10 update

Final workaround:
run notepad++ or Visual Studio Code as Administrator :slight_smile:

Hello everyone,

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.

Many thanks.

Wim

Interesting. If you

cd /Applications/Processing.app/Contents/

Are the referenced files there? Different version / path? Wrong permissions?

Hello Jeremy,

Indeed, a different version.
I looked into that directory and this is what i found:

 /Applications/Processing.app/Contents/PlugIns/jdk1.7.0_55.jdk/Contents/Home/jre/bin/java

So, as far as i can tell, processing-java is looking for jdk 1.8 instead of 1.7 ?
Do you know how to fix this?

Wim

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…

Thanks,

I removed processing-java so when I do :

$ which processing-java

it returns nothing.

next thing I did:

  • uninstalling processing2
  • reinstalling processing2
  • installing processing-java by tools > install “processing-java”

but, now when i type in terminal :

$ processing-java

I get this in return :

-bash: processing-java: command not found

Thanks,
wim

Strange. Does anybody currently using Processing 2 have any suggestions for wimbr?