Results 1 to 2 of 2

Thread: [Java] Target Window JNA or JNI or ?

  1. #1
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default [Java] Target Window JNA or JNI or ?

    I am looking to replicate the SCAR/Simba Target Window function in Java so I can create a more dynamic but static coordinate system and canvas. Currently I drag my game client to a certain location and set the client to a certain size and make a bunch of jwindow boxes for determining appropriate mouse zones. This means if my client location or size changed, my coordinates are off.

    Research in getting local machine running process information has pointed me towards using JNA or JNI, with more opinions weighted towards JNA. Others have suggested java.lang.Process aswell.

    Does anyone have experience in either or perhaps a different method before I commit to learning one? If I read a process, can that process know I accessed that information? This will be my first step in to learning about processes.

    Thanks

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

  2. #2
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Use JNA if at all possible. It is the easiest way to adapt an existing system API. Later you can create a set of coherent classes that use JNI. Sometimes people will avoid both and make the native code into a server that the Java application communicates with.

    I don't especially recommend the last method. There are people who suggest never using JNI; unfortunately Java was designed around JNI. Languages like C# have first class support for object file imports.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •