Showing posts with label jni. Show all posts
Showing posts with label jni. Show all posts

Monday, May 7, 2012

How to import a class from default package



Possible Duplicate: How to access java-classes in the default-package?






I am using Eclipse 3.5 and I have created a project with some package structure along with the default package. I have one class in default package - Calculations.java and I want to make the use of that class in any of the package (for instance in com.company.calc). When I try to make the use of the class which is default package, its giving me compile error. Its not able to recognise the class in default package. Where is a problem?

Monday, April 16, 2012

Use JNI instead of JNA to call native code?


JNA seems a fair bit easier to use to call native code compared to JNI. In what cases would you use JNI over JNA?

Pinning a Java application to the Windows 7 taskbar


Original question



I use Launch4j as a wrapper for my Java application under Windows 7, which, to my understanding, in essence forks an instance of javaw.exe that in turn interprets the Java code. As a result, when attempting to pin my application to the task bar, Windows instead pins javaw.exe . Without the required command line, my application will then not run.

Friday, February 10, 2012

JNI how get values updated to int and double fields


How do two values I pass into my JNI tossed down to C then C does its changes and updates the values. How do I get those two values(maxPower, index) and see then in Java? They always come back as zero.