[英]how to configure JDDE library (java dynamic data exchange) with eclipse java?
I want to use DDE communication with java and java eclipse editor to run some simple code. 我想与Java和Java eclipse编辑器一起使用DDE通信来运行一些简单的代码。 I imported the called library pretty-tools-JDDE-2.0.3.jar to my project but in vain - DDEClient and other DDE type not recognized.
我将名为library -tools-JDDE-2.0.3.jar的库导入到我的项目中,但没有成功-无法识别DDEClient和其他DDE类型。 Here is the code :
这是代码:
public class Testdde {
public static void main(String[] args) {
DDEClient client;
Conversation url = null;
client = DDEClient.getInstance();
try {
url = client.connect("Iexplore", "WWW_OpenURL");
} catch (DDEException e) {
System.out.println("No running instance of Internet Explorer is found. Stopping.");
e.printStackTrace();
client.close();
return;
}
System.out.println("Connected to Internet Explorer");
System.out.println("Opening \"http://www.java.com/\" in a new window");
try {
url.request("http://www.java.com/,,0");
} catch(DDEException e) {
e.printStackTrace();
}
try {url.close();} catch (Exception ignore) {}
client.close();
}
}
Without any error message it's hard to tell what you are asking, but this sounds like you need to put the jdde jar into the build path. 没有任何错误消息,很难说出您的要求,但这听起来像您需要将jdde jar放入构建路径。
This should make the classes in the jdde jar available both during the development and during the execution. 这应该使jdde jar中的类在开发和执行期间均可用。
Further research shows us this: http://jdde.pretty-tools.com/en/examples/unsatisfiedlinkerror.htm 进一步的研究向我们显示了这一点: http : //jdde.pretty-tools.com/en/examples/unsatisfiedlinkerror.htm
尝试将DDEClient类更改为DDEClientConversation
I think I had same issue on Windows and Netbeans. 我想我在Windows和Netbeans上也有同样的问题。 You need to copy and paste the .dll file (64 or 32 depending of your OS) into the Java class path (check java class path location in System=> environment variables).
您需要将.dll文件(取决于您的操作系统,是64还是32)复制并粘贴到Java类路径中(在System =>环境变量中检查Java类路径位置)。 my path was: C:\\ProgramData\\Oracle\\Java\\javapath and i copied JavaDDEx64.dll.
我的路径是:C:\\ ProgramData \\ Oracle \\ Java \\ javapath,我复制了JavaDDEx64.dll。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.