Compiling Java into native Object Code

Posts 1–11 of 11 · Page 1 of 1
Compiling Java into native Object Code
Has anyone ever done it with their projects? Instead of compiling it into bytecode, have it compiled into object code and execute with out a JIT compiler or the JRE?

I was thinking about doing this with JevaEngine for security, and later when a more expensive obfuscater can be purchased, possibly use that as an alternative.

What I might do, is have a Java application act as a downloader\updater(which will be multi-platform) then have the updater download the JevaEngine corresponding to the Machine OS\Processor, etc..

Opinions?
Doesn't the compiler make it into bytecode and JRE just interprets it? So JRE reads bytecode, so I doubt there is any other way.
Java in to binary, possibly, might need a different compiler for it. Google it, I haven't done it before.
Would it even be considered Java anymore? XD
@XORxHACK java's compile once, run everywhere idea has failed. No one has the JRE installed anymore.

I know such a method exists Why Compile Java Into Native Code and there is one. I'll look for a link. It only makes sense though, I mean, if a JIT compiler is possible, then an AOT compiler is too.

Only problem occurs when one needs to load other classes into the project dynamically. I wonder if they could be compiled into DLLs. I know some of the object code compilers statically link a java interpreter for loading of class files. But, it would be ugly to have the whole thing in one executable and would call for long downloads to single-component updates.

If worst comes to worst, conversion between Java and C# will be a walk in the park. There are many C# applications out there that make C# multi-platform, and there are probably more users with the .Net framework then there are with the JRE. Even at THAT I can get .net applications running on a client's computer without the .NET framework installed(although it's not significant in size, and I can just have JevaEngine's installer carry around the .Net framework with it.)

But if I convert it to C# it ruins one of the primary purposes of JevaEngine, which is for my Java Programming Course I'm taking next year :|.
This seems like a lot of trouble for not much benefit... Just make it a normal class file. If you really need to perhaps there is a way to obfuscate the bytecode, but is it that big a deal o_O?
I'm converting it to C#. Shouldn't take longer then a week to do(infact it should just take a couple of days.) But even then, I should apply some obfuscation on it.

What'eve. If I use C#, I can introduce XNA or DirectX for rendering which is more efficient then what I'm using now, I could also add some 3D aspects without worrying about performance issues.
You know man whatever, but I thought it was supposed to be a Java engine... =/
Well, depending on the amount of work required to translate, I may maintain both versions. I'm finding though there are some syntax similarities, the frameworks are completely different.
Quote Originally Posted by radnomguywfq3 View Post
Well, depending on the amount of work required to translate, I may maintain both versions. I'm finding though there are some syntax similarities, the frameworks are completely different.
You never finish anything, it will fail.
Quote Originally Posted by Obama View Post
You never finish anything, it will fail.
Lets see

Scripting engine -- finished.
Filesystem -- finished
Networking System -- finished
GUI -- finished
custom UI components & script bound components -- finished.

A game engine has a lot of components that can be reused sir. In that sense, I've finished many modules working on JevaEngine alone.

Also, if you look around, AndrewThomas(my alternative) has release several finished modules. What about the HTTP server I wrote?

Don't troll me if you haven't the slightest clue what you're talking about.

@Dave: Technically everything is binary. I think you mean bytecode(which is interpreted by the JVM, or compiled into objectcode by the JIT) to objectcode.
Posts 1–11 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us