
My father said to me, "Put your head in the oven for five minutes." I
said, "Why should I do that?" He replied, "Because you've got too many
half-baked ideas."

Two rich women were boasting about their wealth. One of them said,
"My husband purchased a bed that belonged to the Maharaja of Patiala."
"Oh really!" said the other one with disdain, "So you buy second
furniture."
|
|
|
Using javaw.exe
Listing 2.2 Execute1.cpp
(Complete code)
//The #include directive treats
//text in the file specified by
//filename as if it appeared in the
//current file.
#include <alloc.h>
#include <process.h>
#include <stdio.h>
//The #define directive defines a macro.
#define MAIN_CLASS "MyFrame.jar"
int main()
{
//malloc() allocates a block of size
//bytes from the memory heap.
char* cmdline = (char*)malloc(1024 );
//sends formatted output to a string
sprintf( cmdline, "javaw.exe -jar %s", MAIN_CLASS );
//system() invokes the
//DOS command interpreter
system( cmdline );
//deallocate the memory
//block.
free (cmdline);
return 0;
}
|