amiga.org
     
iconAll times are GMT -6. The time now is 05:50 AM. | Welcome to Forum, please register to access all of our features.

Amiga.org The "Not Quite Amiga but still computer related category" Alternative Operating Systems Open Source Java

Alternative Operating Systems This forum is dedicated to discussions of alternatives to the Commodore Amiga Platform, such as Linux distributions, FreeBSD, OpenBSD, and others.

Reply
 
Thread Tools Display Modes
Old 10-28-2006, 12:55 PM   #21
smithy
Cult Member
Points: 7,413, Level: 57 Points: 7,413, Level: 57 Points: 7,413, Level: 57
Activity: 19% Activity: 19% Activity: 19%
 
Join Date: Mar 2002
Posts: 511
Default Re: Open Source Java

Quote:
SamuraiCrow wrote:
That's just the point. It WON'T likely be completely open-source. Only the VM itself will be open-source.
From what I've read it's not clear what they intend to open source.

Quote:
This is just an attempt by Sun to disarm the advantages of GCJ over its own JIT.
How would Sun's open source JVM impact somebody else's open source Java compiler? I can't see any affect on GCJ if Sun only opene-sourced their JVM.

smithy is offline   Reply With Quote
Old 10-28-2006, 01:07 PM   #22
Karlos
Sockologist
Points: 50,827, Level: 100 Points: 50,827, Level: 100 Points: 50,827, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: Barishabaad, Sardistan
Posts: 16,670
Blog Entries: 18
Default Re: Open Source Java

@Smithy

JIT versus statically compiled code becomes an important consideration for people implementing server applications and things of that nature.

Statically compiled code, although often better than JIT initially (and certainly an order of magnitude faster than interpreted) soon ages. When you upgrade your hardware you don't always get the full benefit without recompiling. Therefore, for peak performance you need to keep rebuilding your code whenever you upgrade. That's a headache for most people.

A JIT however, you can just replace with a version that's optimized for your target platform. All the code running on it gets the benefit of the improvements without any additional maintenance. If there's a problem, rolling back is also a trivial matter. This is quite a selling point for most organisations.

Why would they opt to use a third party compiler when they can get the performance advantage from the opened up JIT?
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 10-28-2006, 01:13 PM   #23
smithy
Cult Member
Points: 7,413, Level: 57 Points: 7,413, Level: 57 Points: 7,413, Level: 57
Activity: 19% Activity: 19% Activity: 19%
 
Join Date: Mar 2002
Posts: 511
Default Re: Open Source Java

Quote:
SamuraiCrow wrote:
@Karlos

GCJ is based on GCC so it generates code just as well as the C++ that CCJ uses as an intermediate code. Likewise, AFAIK, GNU ClassPath is implemented in C++ rather than Java.
It can't be written in C++ because the JVM wouldn't be able to execute it. You could have a proxy class written in Java which then called the corresponding native Classpath class but seems unnecessarily convoluted in return for no advantages.

Even if they did do that, they'd likely hit interoperability problems with third party software... for example JDBC and security providers and JAXP implementations.

smithy is offline   Reply With Quote
Old 10-28-2006, 01:18 PM   #24
Karlos
Sockologist
Points: 50,827, Level: 100 Points: 50,827, Level: 100 Points: 50,827, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: Barishabaad, Sardistan
Posts: 16,670
Blog Entries: 18
Default Re: Open Source Java

Quote:
smithy wrote:
GCJ is based on GCC so it generates code just as well as the C++ that CCJ uses as an intermediate code. Likewise, AFAIK, GNU ClassPath is implemented in C++ rather than Java.
It can't be written in C++ because the JVM wouldn't be able to execute it.

[/quote]

Surely that depends on the JVM implementation? I mean, a modified classloader could handle the loading and linking native object code and java bytecode seperately without any one java class knowing if the thing it's calling is native or not.
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 10-28-2006, 01:25 PM   #25
smithy
Cult Member
Points: 7,413, Level: 57 Points: 7,413, Level: 57 Points: 7,413, Level: 57
Activity: 19% Activity: 19% Activity: 19%
 
Join Date: Mar 2002
Posts: 511
Default Re: Open Source Java

Quote:
Karlos wrote:
@Smity

JIT versus statically compiled code becomes an important consideration for people implementing server applications and things of that nature.

Statically compiled code, although often better than JIT initially (and certainly an order of magnitude faster than interpreted) soon ages. When you upgrade your hardware you don't always get the full benefit without recompiling. Therefore, for peak performance you need to keep rebuilding your code whenever you upgrade. That's a headache for most people.

A JIT however, you can just replace with a version that's optimized for your target platform. All the code running on it gets the benefit of the improvements without any additional maintenance. If there's a problem, rolling back is also a trivial matter. This is quite a selling point for most organisations.

Why would they opt to use a third party compiler when they can get the performance advantage from the opened up JIT?
You are talking about the difference between using a JIT JVM and a non-JIT JVM. But this has nothing to do at all with GCJ because GCJ is just a compiler - it compiles Java source code into bytecode. It doesn't attempt to run it, so no JIT is involved or needed.

You can run bytecode created by GCJ on any compliant JVM, JIT or not. There is no need to recompile it based on whether you use a JIT JVM.

So static or dynamic compilation doesn't really apply here, because one, or both can be done, it's up to you.

My original question was, how does Sun's decision to open up it's JVM impact GCJ, a source-compiler?


smithy is offline   Reply With Quote
Old 10-28-2006, 01:32 PM   #26
Karlos
Sockologist
Points: 50,827, Level: 100 Points: 50,827, Level: 100 Points: 50,827, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: Barishabaad, Sardistan
Posts: 16,670
Blog Entries: 18
Default Re: Open Source Java

@Smithy

I think you misunderstood me. Basically, I am asking, who would use a static compiler for their java application deployment if a JIT is able to deliver similar performance without ever having to recompile the application should the hardware get updated?

The main reasons for using a compiler are to get speed on systems where a JIT is not available (for whatever reason) or for protecting your code (bytecode is pretty easy to decompile). The latter isnt much of a problem for a server application however, so the main reason for using a compiler would be the former. If you were running a server, would you prefer to just update the JVM itself whenver you needed to upgrade, or recompile all your code?

Opening up the JIT like this basically kicks out one of the legs from under using a compiler on any given platform, performance is no longer an issue.
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 10-28-2006, 01:45 PM   #27
smithy
Cult Member
Points: 7,413, Level: 57 Points: 7,413, Level: 57 Points: 7,413, Level: 57
Activity: 19% Activity: 19% Activity: 19%
 
Join Date: Mar 2002
Posts: 511
Default Re: Open Source Java

Quote:
Karlos wrote:
Surely that depends on the JVM implementation? I mean, a modified classloader could handle the loading and linking native object code and java bytecode seperately without any one java class knowing if the thing it's calling is native or not.
Even if you could change the bootstrap classloader on every JVM (not even sure if you can on Sun's), then you still have the problem of applications that use their own classloaders. If I wrote a trivial, but badly behaved classloader that didn't delegate to the parent (and I have seen this) and I did:

Code:
myloader.loadClass("java.lang.Vector");
Then it would fail because my classloader isn't aware that java.lang.Vector has been compiled to machine code and lives in a DLL somewhere.

The problem here is that while it could theoretically work, it will break lots of applications. I've never seen the GNU Classpath source code but I'd bet a lot of money that it's written in Java (unless they went with the Java proxy -> native class that I mentioned earlier).

smithy is offline   Reply With Quote
Old 10-28-2006, 01:49 PM   #28
Karlos
Sockologist
Points: 50,827, Level: 100 Points: 50,827, Level: 100 Points: 50,827, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: Barishabaad, Sardistan
Posts: 16,670
Blog Entries: 18
Default Re: Open Source Java

I wasn't aware you had any control over the internal operation of ClassLoader ? I thought all the low level stuff was private and final?

-edit-

Never mind. I'm getting a bit OT
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 10-28-2006, 02:01 PM   #29
smithy
Cult Member
Points: 7,413, Level: 57 Points: 7,413, Level: 57 Points: 7,413, Level: 57
Activity: 19% Activity: 19% Activity: 19%
 
Join Date: Mar 2002
Posts: 511
Default Re: Open Source Java

Quote:
Karlos wrote:
@Smithy

I think you misunderstood me. Basically, I am asking, who would use a static compiler for their java application deployment if a JIT is able to deliver similar performance without ever having to recompile the application should the hardware get updated?
When you say static compiler, do you mean compile to machine code rather than byte code? I still don't think this has any impact on GCJ. If you use GCJ rather than Sun's "javac" tool, then it means you are probably an open-source, er, "believer", shall we say? In which case, you'll probably also be using one of the many open source JIT JVMs anyway.

Quote:
The main reasons for using a compiler are to get speed on systems where a JIT is not available (for whatever reason) or for protecting your code (bytecode is pretty easy to decompile).
Compiling to binary, like you say, might be mainly to protect your source code. But you won't be doing it because you don't have an open source JIT JVM (there are plenty of them) in which case an open source Sun JIT VM isn't going to help you.

Quote:
The latter isnt much of a problem for a server application however, so the main reason for using a compiler would be the former. If you were running a server, would you prefer to just update the JVM itself whenver you needed to upgrade, or recompile all your code?
If I was using Java on the server then I'd be using J2EE, of which every implementation has JIT (even the open source JBoss has JIT - you'd have to look hard to find a server JVM without JIT). There is no prospect of using any native code with J2EE. But then, if I was really interested in performance, and I mean really, because JIT Java is fast - native will not improve your execution speeds much, then I'd not use Java in the first place!

smithy is offline   Reply With Quote
Old 10-28-2006, 02:05 PM   #30
smithy
Cult Member
Points: 7,413, Level: 57 Points: 7,413, Level: 57 Points: 7,413, Level: 57
Activity: 19% Activity: 19% Activity: 19%
 
Join Date: Mar 2002
Posts: 511
Default Re: Open Source Java

Quote:
Karlos wrote:
I wasn't aware you had any control over the internal operation of ClassLoader ? I thought all the low level stuff was private and final?
You can write your own classloaders and override the system's.

Quote:
Never mind. I'm getting a bit OT
Not at all OT! These are all issues that I'm sure the ClassPath team went through during their design process.
:-)

smithy is offline   Reply With Quote
Old 10-28-2006, 02:05 PM   #31
Karlos
Sockologist
Points: 50,827, Level: 100 Points: 50,827, Level: 100 Points: 50,827, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: Barishabaad, Sardistan
Posts: 16,670
Blog Entries: 18
Default Re: Open Source Java

Quote:
When you say static compiler, do you mean compile to machine code rather than byte code?
Aye, the creation of native object code, rather than bytecode. I guess I could have been clearer about that :-D

Regarding the "not using java" for performance reasons, you might not have the luxury depending on what technologies you were using.

Anyway, it's a moot point. The easiest thing to do is look at the ClassPath sources and see what they did :-D
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 10-28-2006, 02:08 PM   #32
Karlos
Sockologist
Points: 50,827, Level: 100 Points: 50,827, Level: 100 Points: 50,827, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: Barishabaad, Sardistan
Posts: 16,670
Blog Entries: 18
Default Re: Open Source Java

Quote:
You can write your own classloaders and override the system's.
Interesting. Are there any practical examples of why and how you'd do this?
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 10-28-2006, 02:27 PM   #33
smithy
Cult Member
Points: 7,413, Level: 57 Points: 7,413, Level: 57 Points: 7,413, Level: 57
Activity: 19% Activity: 19% Activity: 19%
 
Join Date: Mar 2002
Posts: 511
Default Re: Open Source Java

Quote:
Karlos wrote:
Quote:
You can write your own classloaders and override the system's.
Interesting. Are there any practical examples of why and how you'd do this?
I've never had the need to do it myself, so I don't know all the ins and outs, but it's a useful abstraction layer.

If you want to store your .class files somewhere else that a default classloader could never find, on a database say, or a on particular place on your network.. your custom classloader might handle the connection and issue SQL, or look in that place on the network.

Or you could support unloading classes that might only be used a few times (depends on your application needs).

smithy is offline   Reply With Quote
Old 10-28-2006, 02:36 PM   #34
Karlos
Sockologist
Points: 50,827, Level: 100 Points: 50,827, Level: 100 Points: 50,827, Level: 100
Activity: 8% Activity: 8% Activity: 8%
 
Karlos's Avatar
 
Join Date: Nov 2002
Location: Barishabaad, Sardistan
Posts: 16,670
Blog Entries: 18
Default Re: Open Source Java

Ok, I can see that you can control where a class is loaded from and how, but going back to the earlier point, unless you have control over the physical inspection of the bytecode and it's runtime linkage, surely some inaccessible implemententation part of the main ClassLoader is invoked to do the real work once you have a handle on the file?

What I'm saying is, that implementation detail might be able to differentiate between native and bytecode implemented classes and you yourself would never know (or need to know) if it was native or not. Just musing :-D
__________________
OCA
This isn't SCSI... This is SATA!!!
I have CDO. It's like OCD except all the letters are in ascending order. The way they should be.
Core2 Quad Q9450 2.66GHz / X48T / 4GB DDR3 / nVidia GTX275 / Linux x64, AROS, Win64
A1XE 800MHz / 512MB / Radeon 9200 / OS4.1
A1200T BPPC 240MHz / 256MB / Permedia 2 / OS 3.1 - OS3.9, OS4
A1200T Apollo 1240 28MHz / 32MB / Mediator1200 / Voodoo 3000 / OS3.9
A1200D Apollo 1240 25MHz (ejector seat ROM edition) / 32MB
Karlos is offline   Reply With Quote
Old 10-28-2006, 08:26 PM   #35
Tomas
Kindred of Babble-on
Points: 13,331, Level: 75 Points: 13,331, Level: 75 Points: 13,331, Level: 75
Activity: 2% Activity: 2% Activity: 2%
 
Join Date: Feb 2002
Posts: 2,828
Default Re: Open Source Java

Quote:
Piru wrote:
@Tomas
Quote:
Is the solaris license even compitable with the linux license?
GPL does not require that applications running on top of GPL operating system are GPL aswell. Read the license.
I am no GPL expert, but i know most linux distros refuse to bundle certain OSS with the distro because of license not being compitable.
Tomas is offline   Reply With Quote
Old 10-28-2006, 09:40 PM   #36
SamuraiCrow
Premium Member
Points: 14,573, Level: 78 Points: 14,573, Level: 78 Points: 14,573, Level: 78
Activity: 8% Activity: 8% Activity: 8%
 
SamuraiCrow's Avatar
 
Join Date: Feb 2002
Location: Colorado, USA
Posts: 2,115
Blog Entries: 2
Send a message via Yahoo to SamuraiCrow Send a message via Skype™ to SamuraiCrow
Default Re: Open Source Java

Quote:
smithy wrote:

You are talking about the difference between using a JIT JVM and a non-JIT JVM. But this has nothing to do at all with GCJ because GCJ is just a compiler - it compiles Java source code into bytecode. It doesn't attempt to run it, so no JIT is involved or needed.

You can run bytecode created by GCJ on any compliant JVM, JIT or not. There is no need to recompile it based on whether you use a JIT JVM.

So static or dynamic compilation doesn't really apply here, because one, or both can be done, it's up to you.

My original question was, how does Sun's decision to open up it's JVM impact GCJ, a source-compiler?
The difference is that GCJ can compile bytecode into native binary. It can also compile source into native binary. It is a static compiler based on GCC and, as such, is GPL so no Linux distro would need to do without it for reasons of licence incompatibiltiy.
SamuraiCrow is offline   Reply With Quote
Reply

Bookmarks

Tags
java , open , source

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
Open Source VHDL ? OSS542 Amiga Software Issues and Discussion 4 10-13-2008 09:15 AM
Open-source 68k assembler for *nix? skurk Amiga OS -- Development 3 05-14-2007 06:20 AM
Sun offers its Java source code free on Internet redrumloa Amiga Software Issues and Discussion 5 11-13-2006 05:00 PM
Open Source Beer Red_Melons CH / General 3 08-22-2005 11:35 AM
Yet more Open Source (Solaris) Plaz General chat about Amiga topics 1 01-26-2005 05:52 AM