Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Running C++ exe files

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to run c++ exe files using the runtime environment. Its giving an error :
c:\windows\system32\ntvdm.exe
Error in setting up runtime environment
Plz help me if you can any 1.
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do you invoke the command?

BTW: It's maximum an intermediate question.
My question is: How do you know ntvdm.exe is build from c++, and why is this important?
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, welcome to the ranch!

Can you post some code around the way you launch your programs? I guess System.runtime.exec( something )?

Do you know where that message comes from? Is it something in your C++ program?

See if ProcessBuilder gives you an easier way to configure and start your other programs.
 
sarin kane
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
See i have a c++ prog. exe that i want to run in java . The error message which i am getting has nothing to do with my c++ program.
the java prog i have written is:
try{
Runtime r = Runtime.getRuntime();
Process p = r.exec("Myprog.exe"); /*Myprog is exe of my c++ prog */
}catch(Exception e1) { System.out.println(e1); }

when i run this java prog im getting this error :
"Error in setting up environment for the application "
Please Help me !!!
 
sarin kane
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the code that i have written above is corect or not?
Plz help me its urgent !!
i have tried using :
String temp = "cmd /k java -cp \"A:\MyDirectory\"MyApplication";
Process proc = rt.exec(temp);
But it doesnt work !!!
Is it possible to do it using a BAT file

Plz reply !!!
 
Stefan Wagner
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read this:

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?

I would first try to use the whole path to ntvdm.exe.
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Usually when I Google an error message I get right to some explanation. I get no hits at all on this: "Error in setting up environment for the application" It's not often I get no hits on Google. Is that it word for word??

Try the full path to your program. Your program will not inherit any environment variables, but you can use ProcessBuilder to set some up if you need.
[ June 15, 2006: Message edited by: Stan James ]
 
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic