I have a Java jar file which contains a program I wish to run. However, I want to make a simple bootstrap program in C to get it running without the need to open up the console.
Originally, I just had some jazz along the line of
#include ...
int main() {
system("java -jar myjar.jar");
return 0;
}
But the windows console appears (albiet blank). My question is how to I get rid of the console entirely? I thought that maybe if I switch it over to a WinMain, Windows would interpret this as meaning my program is a windowed application, but alas, it still shows the console:
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
system("java -jar myjar.jar");
return 0;
}
So how do I write this simple "launcher" program without opening a new console?