the console always appears......
Hi, I try to run a java application by exe file.....
Here's the code:
Code:
#include <stdio.h>
#include <process.h>
int main(void)
{
char *my_args[4];
my_args[0] = "jre1.5.0\\bin\\java.exe";
my_args[1] = "-jar";
my_args[2] = "SBD.jar";
my_args[3] = NULL;
spawnv( P_NOWAIT, "jre1.5.0\\bin\\java.exe", my_args);
return 0;
}
The code works....... But if I click the exe file ( that is run.exe ) from Windows Explorer, the console appears first, then my java application appear..... damn the console does not want to disappear.......
How do I make the condition that when I double click the exe file ( that is run.exe ), my java application appears but the console does not appear......
What code do I have to put?????
The second question ( not related with c++ anyway ) : How do I change the appearance of this exe file in Windows explorer??? To make it clear.... I installed Adobe Reader 6 and the exe file is different with mine. The Adobe one has the icon. Mine has no icon. Mine looks like a rectangular white box with blue menubar.
Dev-Cpp 4.9.... Windows XP.....
Thank you......