4

This is my first time using JNA, and its been hard but great at the same.

Trying to follow this code example How to get the x and y of a program window in Java?

I imported:

import com.sun.jna.*;
import com.sun.jna.platform.win32.WinDef.HWND;
import com.sun.jna.win32.*;

Which I need for this part of the code

HWND FindWindow(String lpClassName, String lpWindowName);
int GetWindowRect(HWND handle, int[] rect);

Problem is the second import is not found, and I have not been able to find a reason. I am using Netbeans, incase it matters.

Note: I downloaded latest version of JNA.jar and if you do edit my question please let me know what you edit to fix it myself next time.

Community
  • 1
  • 1
Juan
  • 521
  • 1
  • 11
  • 28

1 Answers1

7

Go to the GitHub's JNA page again, and download platform.jar also. and add it to the library.. :)

Asif
  • 4,980
  • 8
  • 38
  • 53
  • Better step is to go to link provided by Asif, and type ctrl + f and into the find window you type: platform.jar and search until you find the independent download link for platform. It should be named platform-versionnumber.jar – Hesein Burg Jul 05 '16 at 20:43