Under Window Seven, the following command displays a dialog box then terminates without any other action, why?
The expected effect is launching the associated program Notepad++
or at least Notepad
RUNDLL32.EXE SHELL32.DLL,OpenAs_RunDLL D:\doc\toto.txt
The solution is very simple: cmde.exe start
Here is the Java code which embed the command:
private void open( File file ) {
try {
final String cmd =
String.format( "cmd.exe /C start %s", file.getAbsolutePath());
Runtime.getRuntime().exec( cmd );
}
catch( final Throwable t ) {
t.printStackTrace();
}
}
When .project
is selected the following dialog is shown:
and when the radio button at the bottom is chosen the following dialog is shown:
That's exactly what I want.