Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Java
Expertise: Intermediate
Mar 15, 2000



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Using Names for Java Methods that Differ from the Name the DLL Uses

You can use a name for a Java method that is different from the name the DLL uses when it exports the function. For example. you may need to conform to naming conventions prescribed by your own site. In that case, just use the @dll.import directive along with the entrypoint modifier.

For example. if you wanted to use the GetSysColor function, but wanted to change the first letter to lowercase, you would include the following:

/**@dll.import ("USER32",entrypoint="GetSysColor") */
  static native int getSysColor(int nIndex); 
The entrypoint modifier has now set up the aliasing for you.
Manoj K.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date