j/direct question

Started by
2 comments, last by Metal Typhoon 20 years ago
i''ve looked all over to find how to get the counter''s frequency and ticks using java. When i somehow came across j/direct ... i still dont know what it is .. is it a package ? do i need to download something in order to use it ?? so far i know that i need this.. /** dll.import ("KERNEL32") */ private static native int QueryPerformanceFrequency (int ticks); and then just call the function ? .. by the way .. QueryPerformanceFrequency uses a LARGE_INTEGER.. what would be the conversion of java ?? thx a lot
Metal Typhoon
Advertisement
See how it says native? That just means it was coded in a native language. The comment above is just a JavaDoc comment (which I don''t know if it''ll compile right).

I''ve never worked with native methods, so sorry I can''t be of much help.

PS - Your Java application will no longer be portable since this method is native (specific to the OS).
Hmmm, I thought that was the syntax used by the MS Java to import libraries actually
quote:Original post by yaroslavd
See how it says native? That just means it was coded in a native language. The comment above is just a JavaDoc comment (which I don''t know if it''ll compile right).

I''ve never worked with native methods, so sorry I can''t be of much help.

PS - Your Java application will no longer be portable since this method is native (specific to the OS).


it compiles right.. just with the first two lines.. if u call the function.. it will give an error
Metal Typhoon

This topic is closed to new replies.

Advertisement