This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Maybe it's too late, maybe it's not want you want, but...
Posted by Gabriel on July 27, 2001 at 10:17 AM
> Can anyone tell me, how to Start a Windows EXE-File from a Java-Applikation for example by pressing a button in the Java-Apllikation.
> Please mail, if u have the answer.
try with native method and use c++;
public native void myBrowse();
and then you need an cpp header file:
try: javah -jni Program.java
in c++ copy the header method somethink like that;
JNIEXPORT void JNICALL Java_Program_myBrowse(JNIEnv *env, jobject canvas)
and make an dll
cl -Id:\jdk1.3\include -Id:\jdk1.3\include\win32 -LD Program.cpp -Fe Program.dll -link D:\jdk1.3\jre\lib\jawt.lib
and another lib
now run java aplication java Program