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.

1
  • 1
    did you download platform.jar? Commented Jun 2, 2012 at 10:08

1 Answer 1

7

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

Sign up to request clarification or add additional context in comments.

1 Comment

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.