Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Program accessing Windows-DLL with JNI. Running in Netbeans but not with java.exe  RSS feed

 
Andre Rey
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I run the program in Netbeans, everything works perfectly.
However when I run it with java.exe then the program crashes.
The program can call the DLL-Methods but it crashes after a few calls
with a jvm error. The console displays a lot of information about the error,
however there are no java-exception or error. It seems the virtual machine
has a problem. Some kind of hex-dump is displayed?

Does Netbeans run a java program different then running it with java.exe?

Best regards
Andre
 
Andre Rey
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally I found it out myself.

The problem had nothing to do with JNI.

It seems to be a java but.

The following line causes the problem:

Calendar cal = new GregorianCalendar(1899, Calendar.DECEMBER, 30);

My Env.:
Windows 7 Enterprise 32bit
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!