Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how can i compile c/c++ code with java?  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to use java for compiling c/c++ code,and the compiled infomation should be caught,e.g overflow...Is there a way to carry out this?I used getRuntime().exec("gcc .c -o .exe"),on this condition there was no information from compiling time.

How can i use java to control that one executable program(e.g .exe) not to access the files out of this folder/directory,and assure the program not
to performance anything in high-risk command like system("reboot") or while(1) fork();Is that possible for java?

If c/c++ could be better to do this,welcome as well.


thanks so much!!!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!