How We Can Run The Program Of C++ In Java....?
If we make the program in c++ and we want execute it in java.so what's the logic of executing c++ program in java?
1 Answer - Sort by: Date | Rating
Any executable file can be run from a Java program using the following code :-
Process p = Runtime.getRuntime() .exec("rundll32 url.dll,FileProtocolHandler filename");
p.waitFor();
Here the waitFor is to wait till the exe files exits.This execution using rundll is used in windows.
Instead of filename,write your location of the file(like "C:sample.exe").
Process p = Runtime.getRuntime() .exec("rundll32 url.dll,FileProtocolHandler filename");
p.waitFor();
Here the waitFor is to wait till the exe files exits.This execution using rundll is used in windows.
Instead of filename,write your location of the file(like "C:sample.exe").
0
0
Hey can i put a class or method in the c++ program to make it a java program.?pls help
- How Can I Use Dmp File In Java?
- Can You Write A Program Called InheritanceTest.java To Support An Inheritance Hierarchy For Class Point–Square–Cube?
- Why We Use This Method In Java?
- Why Java Not Supports Multiple Inheritence?
- A Java Program To Get Sports Marks In Student Package And Print Total Marks Of Student?
- The Project Aims To Implement A JAVA Parser? 1- Classes And Functions 2- Arithmetic/logic Expressions 3- If Statement
- How To Get Java On My Lg 260?
- Write A Java Program To Store A Number Find If It Is Positive Or A Negative Number If Positive Print I Am The First?
- How To Update The Sim 3 Expansion?
- What Is An Attribute In Java?
- Do I Have To Write A Main Method In Every Class I Create?
- What How The Step For Make Library Management?
- In Which Process We Can Start Java?
- Define The Concept Of Java Byte Code?
- How To Run Remote Method Invocation In More Machine?
- How To Run Java Remote Method Invocation In More Machine?
- How To Make A Java Program That Will Ask The User To Input A Number And Display All The Even Number And The Sum Of All Even Numbers Based On The Inputted/ Given Numbers?
- Is A Static Variable An Instance?
- What Does Literati-on Mean?
- What Is Abstract Class In Details?
- What Is Meant By Remote Method Invocation In Java?
- What Is Latest Technologies In Java?
- Write A Program Using Do…..while Loop To Calculate And Print The First M Fibonacci Numbers?
- What Is The Difference Between Reference &instance Variable?
- Why Java Is Slow?
- How To Compile And Run The Java Program?
- How Do You Run A RMI Program In Java Application?
- How Can I Run A C,C++ & JAVA Program From The Command Prompt?
- What Is The Coding To Run The Frame Program In Java?
- Who We Run Java Program When Extends Frame?
- Can A Java Program Run Without A Main Method?
- How Can We Run Java Program By Using Command Prompt?
- Can A Java Program Can Run Without Main Program? If Not Solve Me This Problem?
- How Can I Write A Program In Java And Make It Run Like A .exe?
- How Can We Run Java Program By Command Prompt? Give Answer In Steps Please?
- What's The Best Way For Java To Run On Vista?

New Comment - Comments are editable for 5 min.