[vox-tech] Compiling C into Java bytecode?

Michael Wenk vox-tech@lists.lugod.org
Sun, 29 Jun 2003 13:07:24 -0700


On Sunday 29 June 2003 02:32 am, Bill Kendrick wrote:
> Okay, just out of curiosity.  Say one wanted to create a 'Java application'
> (e.g., something that runs in a web browser, cell phone or PDA JVM),
> but they wanted to write the application using the C /language/.
>
> This is possible, is it not?  If so, are there some tools for this
> under Linux?  (I see "gjc", the Java compiler from GNU, as well as
> "gij", the Java bytecode interpreter from GNU; but nothing for
> taking code in other programming languages and turning them into Java
> bytecode)
>
> Thx!
>
> -bill!

The biggest problem would be language features.  C allows you to many things 
java does not.  You'd probably spend more time trying to debug your 
javabytecodes on whatever system you're developing than you would learning 
java syntax.  Also, even if you wanted to use C, you would still have to 
learn the Java API(or write your own, which would be difficult to do), and 
how to call API classes from within the language.  


Mike

-- 
wenk@praxis.homedns.org
Mike Wenk