Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 8th, 2007, 9:15 AM   #1
DESERVE
Newbie
 
Join Date: Nov 2007
Posts: 2
Rep Power: 0 DESERVE is an unknown quantity at this point
Java without runtime?

Is it possible to just write a Java program without using the Runtime behind it?

I.E. compile it straight to Machine Code like you would a C++ program?
_________________
Black Box Products Distributor How to trace a telephone number
DESERVE is offline   Reply With Quote
Old Nov 8th, 2007, 9:18 AM   #2
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 3 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
Re: Java without runtime?

GNU developed something called GCJ. It compiles to either byte or machine code. Haven't used it myself but I have it installed just in case I ever wanted to play around with it.

Check it out.
http://gcc.gnu.org/java/
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Nov 9th, 2007, 1:17 AM   #3
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 742
Rep Power: 3 Jimbo is on a distinguished road
Re: Java without runtime?

Yeah, I've heard about some Java to native compilers but I don't remember hearing much of anything good about them.
__________________
<insert disclaimer here>
<insert shameless plug for Visual Studio here>
Jimbo is offline   Reply With Quote
Old Nov 9th, 2007, 5:26 AM   #4
Grich
Hobbyist Programmer
 
Grich's Avatar
 
Join Date: Sep 2007
Location: Sydney - Australia
Posts: 148
Rep Power: 1 Grich is on a distinguished road
Re: Java without runtime?

Quote:
Originally Posted by ReggaetonKing View Post
GNU developed something called GCJ.URL]
I've used it once. It's like any other compiler. It does compile to machine code. I have heard from others that it does have some limits.
__________________
SYNTAX ERROR ...
Grich is offline   Reply With Quote
Old Nov 9th, 2007, 5:39 AM   #5
mrynit
Hobbyist Programmer
 
mrynit's Avatar
 
Join Date: Mar 2006
Location: olympia,WA
Posts: 332
Rep Power: 3 mrynit is on a distinguished road
Send a message via AIM to mrynit Send a message via MSN to mrynit Send a message via Yahoo to mrynit Send a message via Skype™ to mrynit
Re: Java without runtime?

you could try looking at this http://mcujavasource.sourceforge.net/index.xhtml
__________________
i dont know much about programming but i try to help
mrynit is offline   Reply With Quote
Old Nov 13th, 2007, 2:02 AM   #6
Harakim
Hobbyist Programmer
 
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3 Harakim is on a distinguished road
Re: Java without runtime?

They are also working on a Java Kernel that will interpret Java applications, but will be rolled into an executable with your class files. It is supposed to add about as much overhead as a windows executable. We will see how this ends up when Java 7 comes out.
Harakim is offline   Reply With Quote
Old Nov 13th, 2007, 4:09 AM   #7
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Wet west coast of Canada
Posts: 895
Rep Power: 4 lectricpharaoh will become famous soon enough
Re: Java without runtime?

Quote:
Originally Posted by Harakim
They are also working on a Java Kernel that will interpret Java applications, but will be rolled into an executable with your class files. It is supposed to add about as much overhead as a windows executable. We will see how this ends up when Java 7 comes out.
Sounds promising, except that much of the overhead probably from the necessary classes that need to be included from the Java libraries. Since there is likely to be a lot of duplicate class usage across applications- for example, two different applications using Swing will each have their own copy of the classes- this will be a lot of wasted space. It's one of the big reasons dynamic linking can be an advantage. The way around this, of course, is to have everyone download a set of Java classes, but then we're back to square one. It also assumes that the Java classes themselves are platform independent, and I'm not sure they are; it's only the interface that's guaranteed to be consistent.
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp
lectricpharaoh is offline   Reply With Quote
Old Nov 14th, 2007, 2:10 AM   #8
Harakim
Hobbyist Programmer
 
Join Date: May 2006
Location: West Jordan, Utah, United States
Posts: 176
Rep Power: 3 Harakim is on a distinguished road
Re: Java without runtime?

Most of the java classes are cross-platform. They have made a movement towards this recently. However, some classes must be implemented for a native operating system (sockets and windows come to mind). On the other hand, if you are distributing an executable, it isn't going to be cross platform anyway.
Harakim is offline   Reply With Quote
Old Nov 21st, 2007, 9:05 PM   #9
null_ptr0
11 years old
 
Join Date: Nov 2007
Posts: 79
Rep Power: 1 null_ptr0 is on a distinguished road
Re: Java without runtime?

The GCC, GNU Compiler Collection, contains a java compiler, that has the ability to compile java source files into executable files containing the bytes of assembler instructions; or 'machine code'.
null_ptr0 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming with Java: Tutorial ReggaetonKing Java 7 May 20th, 2008 10:58 AM
Special browser in Java (Project) stalefish Java 3 Feb 9th, 2008 4:22 PM
First Java Program duale2005 Java 3 May 22nd, 2006 5:17 PM
Java IDEs and other newbiness -IK- Java 24 Jan 4th, 2006 11:05 PM
Java programmers, game developers, artists, be ware! RPG game team is recruiting! atcomputers.us Paid Job Offers 7 Sep 25th, 2005 7:25 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:20 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC