Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

How to run a java application from VC++?

Thread view: 
Allen - 31 Aug 2006 14:06 GMT
I have a java application named mmi.jar. There is an environment
variable, i.e. MYJAVA_HOME which is my java home path.

With Windows cmd, it can run using the following commnad line:
> %MYJAVA_HOME%\bin\java mmi.SetupCapture

Can I run this java application from VC++?
Pls help me. Thank you!
Oliver Wong - 31 Aug 2006 14:42 GMT
>I have a java application named mmi.jar. There is an environment
> variable, i.e. MYJAVA_HOME which is my java home path.
[quoted text clipped - 4 lines]
> Can I run this java application from VC++?
> Pls help me. Thank you!

   Sounds like what you need to do is have your VC++ application execute
the above mentioned command line. The details of how to do this are specific
to VC++ and are off topic in a Java newsgroup.

   - Oliver
Allen - 01 Sep 2006 01:33 GMT
I work it out.
First, get environment variable using getenv("MYJAVA_HOME").
Then invoke the java application with CreateProcess(NULL, lpszCmdLine,
...).
If want to redirect input, output and error streams, you can use
CreateProcess to
set these streams.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.