mahen
mahen

Reputation: 175

Exception found java "java.awt.AWTError:Assistive Technology not found"

My application running on JRE-6 64-bit. I enable Java's assistive technology using:

assistive_technologies=com.sun.java.accessibility.AccessBridge 

But the files for JavaAccessBridge-64.dll, JAWTAccessBridge-64.dll, and WindowsAccessBridge-64.dll are not present in JRE 6 path.

I try to customize "java.library.path" path ,i download java access bridge and append folder path in "java.library.path".

I write below code ,

static Toolkit tk ;
static long eventMask = AWTEvent.MOUSE_MOTION_EVENT_MASK + AWTEvent.MOUSE_EVENT_MASK + AWTEvent.KEY_EVENT_MASK;

public static void main(String[] args) 
{
    try {       
        String te=  "D:\\AccessBridge" + File.pathSeparator + System.getProperty("java.library.path");
        System.setProperty("java.library.path",te);         
        String library =System.getProperty("java.library.path");
        tk = Toolkit.getDefaultToolkit();
    } catch (Exception e1) {            
        e1.printStackTrace();
    }    
    tk.addAWTEventListener(new AWTEventListener()
    {
        @Override
        public void eventDispatched(AWTEvent e) 
        {
            System.out.println(e.getID() + ", " + e);
        }
    }, eventMask);
}

Found a below exception.

Exception in thread "main" java.awt.AWTError: Assistive Technology not found: com.sun.java.accessibility.AccessBridge at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:773) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:872) at Automation.MyToolKit.main(MyToolKit.java:73)

Is it possible load this dll from different location instead of copy in to JRE folder?

Upvotes: 2

Views: 1818

Answers (0)

Related Questions