Solved

Question in C

Posted on 2000-03-08
4
198 Views
Last Modified: 2010-04-02
How can i run a executable file(other than c file ) such as a .class file
from a c program ??
0
Comment
Question by:yammanur
  • 3
4 Comments
 
LVL 1

Expert Comment

by:dmaguillo
ID: 2595545
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
 
LVL 22

Expert Comment

by:nietod
ID: 2595610
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
 
LVL 22

Accepted Solution

by:
nietod earned 95 total points
ID: 2600155
What is going on here?  Why did you reject my answer?
0
 
LVL 22

Expert Comment

by:nietod
ID: 2604212
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now