• Post Reply Bookmark Topic Watch Topic
  • New Topic

bundling C and Java together

 
jay vas
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys : I wanted to bundle some C code with a Java Application. I know that compiled Jar files will run on any machine that has java installed.

However, Im a hardcore java guy so Im not sure what people need to do when building executable C programs. Can Somebody clue me in ?

I dont need the code to be interfaced via JNI or CORBA - I simply run the C programs by using the java Runtime.exec(...) utilities.

So I need the C code compiled on to the system class path .

Can somebody help get me started ?

Thanks.
Jay
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I need the C code compiled on to the system class path .

I'm not sure what you mean by that - C has no concept of class paths.

If you include your C code as an executable, then Runtime.exec can just execute it. What problem are you facing in particular?
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe instead of class path he means system path or the java.library.path?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!