Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Question in C

Posted on 2000-03-08
4
Medium Priority
?
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 285 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

636 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