combine with applet

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

combine with applet

Postby jerbluba » Sun May 26, 2013 4:40 am

I write a test applet that call JIntellitype but I have questions to access it.

First I tried to call the absolute path in mine computer and have "Could not load JIntellitype.dll from local file system or from inside JAR"

I confirm the absolute path is right since the log show me it exists.

Second I tried to call them in my google drive and show me "access denied (java.util.PropertyPermission user.dir read)"

OK,maybe google drive only allow me to read.

The .jar I uploaded is acturally certificated ,but why it can't call .dll from every where?
jerbluba
 
Posts: 4
Joined: Wed May 01, 2013 1:06 am

Re: combine with applet

Postby Melloware » Sun May 26, 2013 9:12 am

Under the covers it is using WINAPI calls to the load the DLL. It sounds like the error code is actually coming from Windows not allowing the DLL to be loaded from that location.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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: combine with applet

Postby jerbluba » Sun May 26, 2013 9:56 am

So the information is not enough?

I show my test code under the following:

import com.melloware.jintellitype.HotkeyListener;
import com.melloware.jintellitype.JIntellitype;
import java.applet.Applet;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

/**
*
* @author jerjerjer
*/
public class TestApplet extends Applet{


/**
* @param args the command line arguments
*/
private testFrame x=null;

private static String xx=The absolute path;←Try your path
@Override
public void init() {
x=new testFrame();
File temp=new File(xx);
JOptionPane.showMessageDialog(JOptionPane.getRootFrame(), temp.exists());
x.addSystemHotKey(temp);
}
class testFrame extends JFrame{
public void addSystemHotKey(File temp) {
if(JIntellitype.isJIntellitypeSupported()){
JIntellitype.setLibraryLocation(xx+"\\JIntellitype.dll");
}else{
JIntellitype.setLibraryLocation(xx+"\\JIntellitype64.dll");
}
try{
JIntellitype.getInstance();
JOptionPane.showMessageDialog(JOptionPane.getRootFrame(), "setOK");
}catch(Exception e){
}

if(JIntellitype.checkInstanceAlreadyRunning("mouseForGame")) {
System.err.println("An instance of this application is already running");
System.exit(1);
}
JIntellitype.getInstance().registerHotKey(1, JIntellitype.MOD_CONTROL, KeyEvent.VK_F3);
JIntellitype.getInstance().addHotKeyListener(new HotkeyListener() {
public void onHotKey(int identifier) {
}
});
}





}
}
jerbluba
 
Posts: 4
Joined: Wed May 01, 2013 1:06 am

Re: combine with applet

Postby Melloware » Sun May 26, 2013 10:01 am

I would start by getting this EXAMPLE working...

https://code.google.com/p/jintellitype/downloads/list

Second i think the issue might be you are trying to use it in an Applet in a browser correct? I don't think that will work because the Applet is "sandboxed" security model not allowing access to things like the OS and file system.

Plus what if someone hit your application from a browser in Linux or MacOSX the Applet would not be able to use the Windows API.

Maybe I should take a step back and ask you what is your goal of using Jintellitype in a browser applet?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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: combine with applet

Postby jerbluba » Sun May 26, 2013 10:28 am

I try to make a Game Plug-in that control the mouse to auto-run game

but I don't want to let players direct downloading my program

so I think may I exchange it as an applet

(Before that I tried asp.net or servlet,but I am noob I afraid for security risk.)

I forget your last line

Because I need JIntellitype to stop this program

I will try your example tomorrow morning thank you.
jerbluba
 
Posts: 4
Joined: Wed May 01, 2013 1:06 am

Re: combine with applet

Postby Melloware » Mon May 27, 2013 7:39 am

Yeah I just don't think it will work as an applet.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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