Issue with every Contributed Libraries! Other ERROR and (Target VM failed to initialize)

Today I have discovered that my Processing not working so well with my Windows 10 on every sound libraries and I still can’t get gif animation to play.

At first, I thought I only have an issue to be solved with …(Target VM failed to initialize).//// so I moved on to other parts of my project that requires me to play some audio. And I found out that either the Sound Library of Processing, Minim or any contributed library will missing something and so I can’t run the sketch. I have tried these library just to test : Beads and ComposingForEveryone. So basically 4 libraries on audio work and 1 image animation.

I have tried fixing my issue based on what I found Googling but most of them is in 2018-2020
Here are what I have done:

  • Download PDE Version 4.3, 4.1.2, and 3.5.4 to try out Not Working
  • Searching for other libraries as I mentioned above to try out Not Working [gifAnimaiton, Minim, Sound, Beads, and ComposingForEveryone ]
  • Download 32-bit Version of PDF Not Working
  • Checking if my NVIDIA has the same model and version with other people who had the same problem years back NO {But some aren’t clear what NVIDIA they used}
  • Check if I can update NVIDIA It’s up-to-date already.

Here are what my machine is on:

  • Windows 10 Education OSbuild 19043.1682
  • 11th Gen Intel(R) Core™ i7-11700 @ 2.50GHz 2.50 GHz
  • 16.0 GB (15.6 GB usable)
  • 64-bit operating system, x64-based processor
  • NVIDIA Geforce RTX 3060
  • Intel(R) UHD Graphics 750

And, here are two examples of errors I got:
The "java.lang.NoClassDefFoundError: ddf/minim/Minim

at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
	at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
	at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
	at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
	at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
	at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
	at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.ClassNotFoundException: ddf.minim.Minim
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 14 more
RuntimeException: java.lang.NoClassDefFoundError: ddf/minim/Minim

And the " (Target VM failed to initialize)."


java.lang.NoClassDefFoundError: gifAnimation/Gif
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
	at java.lang.Class.getConstructor0(Class.java:3075)
	at java.lang.Class.getDeclaredConstructor(Class.java:2178)
	at processing.core.PApplet.runSketch(PApplet.java:10846)
	at processing.core.PApplet.main(PApplet.java:10620)
Caused by: java.lang.ClassNotFoundException: gifAnimation.Gif
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 6 more
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help ? Troubleshooting.

Do I have to find the location and put some lib inside a folder or something?
Do I have to update my Windows to 11?
Is it because I install every PDF wrong somehow?

I am very frustrated now because I can’t work on anything. Please me know if you have even any little clue and hint! Thanks a lot.

Hi @teemee,

It sound to me that your sketchbook/libraries dir is not accessable as expected. Did you accidentally renamed stuff inside your sketchbook folder or configured a wrong sketchbook path maybe?

Cheers
— mnse

PS: all errors listed above says that the libraries are not in the classpath…
PPS: your system configuration above seems to be well for running processing…

I don’t recall rename anything but let say if that is the case my classpath is wrong. What should I do to make it right? Should I completely deinstall everything and reinstall them?

On Windows, currently, processing app every version is in the C drive. And, the lib and example folder is in the “document” folder. I think this is how it all starts first time I install PDE onto this computer. I install the contributed lib through the PDE function so it put it that document/processing/lib folder. But, the sound library (main lib of Processing) I can’t get it to install through the original path in the IDE so i manually do it and put it in there like the others.

I usually use Mac and Processing kind of puts everything in places for me.

BTW, the PDE Beta 4.0 on Mac also does not install “sound” lib for me too.

Hi @teemee

That is the same way on windows…

It’s hard to say what exactly is the issue on your side as I can’t look at it… :slight_smile:

I would recommend a procedure to start over…

The steps are …

  • Open processing and go to the File->Preferences and notice your sketchbook path on the top and your preferences path on the bottom. Open or write down for later, and close processing
  • rename the two folders, ie by adding a suffix _bak and also rename the installed processing folder that way.
  • make sure to download the latest release of processing for your OS and extract it.
  • open processing and install your required libraries from contribution manager.
  • start a test sketch and tell how it works…

Hope that helps …

Cheers
— mnse

Hey Thanks for the quick reply. However, I have a confusion on the bullet says: rename the two folders, ie by adding a suffix _bak and also rename the installed processing folder that way. Could you please explain this part?

Anyhow, I have look into the path as you suggested what may cause the issue. So here are screenshot and what think might be involve with the issue??

.-.-.-.-.-.-.

I’m on the school’s computer so the folder has linked with Onedrive and shows in Thai somehow although every settings has been set to English (USA). The PDE 3 and PDE 4 has show file path differently. While PDE 3 can read Thai and has no problem getting the “sketch folder” to open any Example file, PDE 4 cannot.


You can see here that Thai language displays as squares in the “Sketch folder” input.

Next, I looked into the preferences.txt.
I have tried changing the word เอกสาร to Documents. Then, restart PDE, it does not work. the program rewrite the preferences saying it needs to do to open sketch.
I also have tried changing Microsoft 360 Office (not Onedrive but it linked) to English but, as I see here it is all in ENG already.

I’ll restart my computer and maybe disconnect Onedrive but I wonder if the language of a file path even is the real problem. Anyway, the contributed library on this line of text say NULL after eveny lib I have installed so I guess the program really is can’t find the folder.

Hi @teemee,

By renaming the two folders
D:\OneDrive…\Processing → D:\OneDrive…\Processing_bak
C:.…\Roaming\Processing → C:.…\Roaming\Processing_bak
processing thinks on start, that it is its first start and newly creates and setup the sketchbook folder structure and as well the preferences…


Ok! The issue is indeed based on the internationalization, resp. the thai named folder.
I was able to reproduce it by creating a portable processing4 installation which sketch folder points to (X:.…\OneDrive\เอกสาร\Processing). In general, processing can work with this path, ie. re-create sketchbook structure, load and save sketches, even install contributed libraries, but struggle on startup a sketch which uses the contributed library from that non utf-8 path. So, I running into the same issue you are describing, ie (Class not found).
On starting the sketch processing will create a java call which used paths like:
X:\...\OneDrive\??????\Processing\
means, it runs into trouble to interpret the path correct for thai characters.

I also searched jdk bugs history and it looks like that it is a long time issue since jdk11, but seems finally fixed by jdk19.
https://bugs.openjdk.org/browse/JDK-8272352
Nevertheless, processing4 is based on jdk17, though.

So only quick solution I see, is to set the sketchbook Path to a utf-8 conform path, like.
X:.…OneDrive\Processing.

Cheers
— mnse

PS: You should report an issue on processing github here .

2 Likes

Hey thanks so much for the lead you provided. After, I posted that latest reply I did restart and disconnected Onedrive. I put everything out and mess around to get rid of Thai language in the path. I can’t recall how but I get “Documents” title back.

So after that I reinstall PDE and I selected the latest version, one shown on the official page. And…ta-da!! it works!!

Also, yes… I’ll try reporting this on github thanks for the suggestion.

1 Like