Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

Question in C

How can i run a executable file(other than c file ) such as a .class file
from a c program ??
0
yammanur
Asked:
yammanur
  • 3
1 Solution
 
dmaguilloCommented:
All you need is execute from your command prompt (for a java .class):

   java mainfile.class (main application)
   appletviewer miapplet.class

You must specify this command lines in your c function for execute programs from command prompt.

Bye... :)
0
 
nietodCommented:
Is a .class file executable?   I've never heard of it.

You can run any executable program (anything you can run from a command line) using the system() command.  Like

system("C:\PROGRAMMS\\WINWORD.EXE");

will run the WINWORD.EXE program.

In addition, there may be other ways to run programs on your operating system.  But since you didn't say what operating system you are using so we can't suggest any.
0
 
nietodCommented:
What is going on here?  Why did you reject my answer?
0
 
nietodCommented:
You don't have to accept it if it doesn't help you, but you do need to explain why it didn't help you.   When you reject and answer with no comment, it is not clear what was wrong so no one knows what to help you.  Also it looks like you might be cheating the system--rejecting a correct answer so you don't have to pay for it.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now