Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

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 Rey
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)

A tiny monkey bit me and I got tiny ads:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic