title: How do I make Linux run a foreign program (almost) as if native
body: <p>I read, some years ago, that you could get linux to invoke the <code>java</code> command to run java programs by adding a bit of linux magic, but I can't remember how to do it or where I read it.</p>
  
  <p>Back then I got it working and, if I recall correctly, it was fairly easy to do; just tell linux to use <code>java</code> to run <code>.jar</code> or similar files. I believe I also got it to run powerpc binaries, through qemu, using the same technique. Naturally, you would still have to mark them as exeutable.</p>
  
  <p>I am not talking running <code>java java_program_to_run</code> or using some shell script that will, essentially, just call the same command. Nor am I asking for a way to convert a java program to an x86 binary for any particular operating system.</p>
  
  <p>It was a technique that would allow Linux to deal with exectuables that wheren't native to the system, almost, as if they where native (some simulation required).</p>