Archived

This topic is now archived and is closed to further replies.

j/direct question

This topic is 5016 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hmmm, I thought that was the syntax used by the MS Java to import libraries actually

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites