File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Languages and the fly likes compile c and cpp program from java code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "compile c and cpp program from java code" Watch "compile c and cpp program from java code" New topic
Author

compile c and cpp program from java code

t sathya narayana
Greenhorn

Joined: Jan 23, 2014
Posts: 20
Requirement:
Our Program should

be able to compile source codes in at least three different kinds of programming languages (C, CPP, Java, .net) and provide some errors while compiling if there is any error.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
So your "program" is a cross-compiler? What do you mean by "call" in the subject of your post?


Ping & DNS - my free Android networking tools app
t sathya narayana
Greenhorn

Joined: Jan 23, 2014
Posts: 20
Ulf Dittmer wrote:So your "program" is a cross-compiler? What do you mean by "call" in the subject of your post?

my program is like compiler to show some errors if there is?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
OK. So what is your exact question?
t sathya narayana
Greenhorn

Joined: Jan 23, 2014
Posts: 20
Ulf Dittmer wrote:OK. So what is your exact question?


our program should be able to compile at least 3 programming languages.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
That's quite a task! So what do you have so far, and where are you stuck making progress?
t sathya narayana
Greenhorn

Joined: Jan 23, 2014
Posts: 20
Ulf Dittmer wrote:That's quite a task! So what do you have so far, and where are you stuck making progress?

first of all i dn't know how to start and which concept here i need to use.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
Are you familiar with compiler technology? Lexers, parsers, ASTs, code generation, etc.? If not, start by reading something like https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools; that should give you some grounding so you know what you're getting into. http://www.ethoberon.ethz.ch/WirthPubl/CBEAll.pdf is a somewhat shorter starting point.

Would this tool also generate actual code? Or should it just point out the syntax errors? Generating code adds a bunch of complexity; creating ready-to-run executables even more so. If that is part of it, I'd estimate that you have no chance of finishing within the next 12 months. If not, you may be able to get something useful out within a couple of months.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: compile c and cpp program from java code