w7 x64, jvm x64

Feature Requests, Comments, Bugs, and Suggestions on the JIntellitype Java API.

w7 x64, jvm x64

Postby styrr » Sun Mar 27, 2011 2:38 am

i have troubles to execute the sample program. i have imported the project into eclipse, replaced the Intellitype.dll file with JIntellitype64.dll and run it:

03/27/2011 09:23:31 INFO - [JIntellitypeTester.main:86] JIntellitype Tester
03/27/2011 09:23:31 INFO - [JIntellitype.checkInstanceAlreadyRunning:284] checkInstanceAlreadyRunning JIntellitype Test Application
03/27/2011 09:23:31 INFO - [JIntellitype.<init>:94] Loading JIntellitype DLL
03/27/2011 09:23:31 INFO - [JIntellitype.<init>:97] Initializing JIntellitype library
03/27/2011 09:23:31 INFO - [JIntellitype.isJIntellitypeSupported:302] isJIntellitypeSupported checking for Windows and DLL in path
03/27/2011 09:23:31 INFO - [JIntellitype.isJIntellitypeSupported:326] isJIntellitypeSupported = false
03/27/2011 09:23:31 ERROR - [JIntellitypeTester.main:97] JIntellitype.DLL is not found in the path or this is not Windows 32bit OS.

So the error message that it isn't windows 32bit is correct, but how can I tell that it is windows x64?
styrr
 
Posts: 4
Joined: Sun Mar 27, 2011 2:33 am

Re: w7 x64, jvm x64

Postby Melloware » Sun Mar 27, 2011 7:33 am

It only matters if your Java JDK is 64 bit and not your OS.

Put the Jintellitype.dll back and I bet it works!

Your JRE must be 32 bit.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11031
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: w7 x64, jvm x64

Postby styrr » Sun Mar 27, 2011 2:12 pm

If I try to run the example with the 32bit JIntellitype.dll I get:

03/27/2011 21:09:39 INFO - [JIntellitypeTester.main:86] JIntellitype Tester
03/27/2011 21:09:39 INFO - [JIntellitype.checkInstanceAlreadyRunning:284] checkInstanceAlreadyRunning JIntellitype Test Application
03/27/2011 21:09:39 INFO - [JIntellitype.<init>:94] Loading JIntellitype DLL
Exception in thread "main" com.melloware.jintellitype.JIntellitypeException: java.lang.UnsatisfiedLinkError: C:\...\jintellitype-example\JIntellitype.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at com.melloware.jintellitype.JIntellitype.<init>(JIntellitype.java:100)
at com.melloware.jintellitype.JIntellitype.getInstance(JIntellitype.java:122)
at com.melloware.jintellitype.JIntellitype.checkInstanceAlreadyRunning(JIntellitype.java:286)
at com.melloware.JIntellitypeTester.main(JIntellitypeTester.java:89)
Caused by: java.lang.UnsatisfiedLinkError: C:\Users\reinhard\eclipse\java\jintellitype-example\JIntellitype.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at com.melloware.jintellitype.JIntellitype.<init>(JIntellitype.java:95)
... 3 more
styrr
 
Posts: 4
Joined: Sun Mar 27, 2011 2:33 am

Re: w7 x64, jvm x64

Postby Melloware » Mon Mar 28, 2011 5:43 am

Interesting. So it thinks its 64 bit OS and 64 bit JRE.

What JRE version are you using? You can look in Eclipse or you can type "java -version" at the command line.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11031
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: w7 x64, jvm x64

Postby styrr » Mon Mar 28, 2011 5:59 am

yeah, it's quite strange :/

>java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
styrr
 
Posts: 4
Joined: Sun Mar 27, 2011 2:33 am

Re: w7 x64, jvm x64

Postby Melloware » Mon Mar 28, 2011 7:28 am

OK so that means you are running the latest Jav 1.6 64 bit edition.

So you will definitely need to use Jintellitype64.dll. Now what it is not finding it in the path is a mystery to me.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11031
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: w7 x64, jvm x64

Postby styrr » Mon Mar 28, 2011 3:07 pm

ok, thank you for trying.
i hate mysterious bugs...
styrr
 
Posts: 4
Joined: Sun Mar 27, 2011 2:33 am

Re: w7 x64, jvm x64

Postby Annoyer » Tue Sep 06, 2011 2:09 pm

Know this post is kinda old, but I just had the exact same problem.
Was totally mad that Java did not have any way to do this so very happy you made one (;
Could not get the example to work either (have 64bit evrything) but could make my own program work though.
This is just a class im testing it with:
Code: Select all
import com.melloware.jintellitype.HotkeyListener;
import com.melloware.jintellitype.IntellitypeListener;
import com.melloware.jintellitype.JIntellitype;
import java.awt.event.KeyEvent;

/**
*
* @author Sune
*/
public class JIntellitypeManager implements HotkeyListener, IntellitypeListener {

    public JIntellitypeManager() {
        if (!JIntellitype.isJIntellitypeSupported()) {
            System.out.println("JIntellitype not supported");
        }
       
        JIntellitype.getInstance();
        JIntellitype.getInstance().addHotKeyListener(this);
        JIntellitype.getInstance().addIntellitypeListener(this);
        registerHotkey();
    }
    private final int ALT_A = 88;

    public void onHotKey(int i) {
        System.out.println("KEYPRESSED");
        switch (i) {
            case ALT_A:
                System.out.println("Ctrl Pressed");
        }
    }

    public void onIntellitype(int i) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void registerHotkey() {
        System.out.println("Registrerer hotkey");
        JIntellitype.getInstance().registerHotKey(ALT_A, JIntellitype.MOD_ALT, KeyEvent.VK_A);
    }
}

This was able to register the keypress (: I do ofc have the 64ddl in my system folder.

GL to anyone having the same problem
Annoyer
 
Posts: 1
Joined: Tue Sep 06, 2011 2:04 pm

Re: w7 x64, jvm x64

Postby Melloware » Tue Sep 06, 2011 6:53 pm

Thanks for posting!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11031
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA


Return to JIntellitype

Who is online

Users browsing this forum: No registered users and 1 guest

cron