• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

MIDI error

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this error in a MIDI code
Jun 22, 2019 9:27:23 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.

The code is
 
Saloon Keeper
Posts: 21137
134
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This looks like a null pointer exception in Windows native code. I'm not even sure if it's related to MIDI, since apparently at this point the native module seems to be simply checking the Windows Registry for something.

You may need to do some sort of Registry setup to make this work, although if that's the case, I'd say there's a bug in the native code for not telling you about it.

We might be able to help more if you pasted in the stack trace and told us which line of your example it died on.
 
Saloon Keeper
Posts: 2723
355
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like bug: [JDK-8139507] WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs

It looks like this has been resolved in Java 9 and higher, and back-ported to in version 8u202 or newer of Java 8.

A work-around would be to use regedit (or other tool/method) to manually create the HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs key in the registry.
 
Ron McLeod
Saloon Keeper
Posts: 2723
355
Android Eclipse IDE Angular Framework MySQL Database TypeScript Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW - I tried your app on my Windows 10 workstation and it ran fine.  I have attached a audio clip of the output.
Filename: jr7811813.mp3
Description: Audio output from MIDI app
File size: 109 Kbytes
 
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!