Funny Bone

John: "Why do people feel stronger on Sundays?"

Jack: "Because all the other days are week days."


Never tell a lie

Boss: "We are very particular about cleanliness. Did you wipe your feet on the mat as you entered?"

New Employee: "Yes sir."

Boss:
"We are very particular that our employees speak the truth. There is no mat."

Chapter 2 The .EXE Solution

The sprintf() method is used to send formatted output to a string.

sprintf(cmdline, "java.exe -jar %s", MAIN_CLASS );

The system() method invokes the DOS command interpreter file from inside an executing C program to execute a DOS command, batch file, or other program named by the string "command".

system( cmdline );

The free() method deallocates a memory block allocated by a previous call to calloc, malloc, or realloc.

free (cmdline);

Compile "Execute.cpp" using a C\C++ compiler. Use the make command to create the "Execute.exe". For execution of this application "MyFrame.jar" and "Execute.exe" must be in the same directory.


Under windows, the JRE is installed in the following directory:
Program Files\JavaSoft\JRE\bin
You must set your path to include the "bin" directory.

 

Contents         Top                              Move to the preceding page Move to the next page
© 2001 www.universalteacher.com. All rights reserved