• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)

 
reply
    Bookmark Topic Watch Topic
  • New Topic