• 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

java -> assembler

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i know java can embed c code, and c can embed assembler, but does that mean java can indirectly imbed assember? (just wondering, even though i can't imagine a practicle application for it)
 
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java cannot embed C code, not directly in line as many C compilers allow with assembly. Instead, to execute C code from a Java class you'd have to use the Java Native Interface (JNI).
JNI requires you to compile and link all of your C code separately and then hook it to your Java code. As such, anything your C compiler can do with that C code (including embedding assembly) is legal as far as JNI is concerned because that exact code will be run via a JNI call.
sev
 
reply
    Bookmark Topic Watch Topic
  • New Topic