• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

bundling C and Java together

 
Ranch Hand
Posts: 407
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe instead of class path he means system path or the java.library.path?
reply
    Bookmark Topic Watch Topic
  • New Topic