Broadening the reach and appeal of Java is at the top of Sun Microsystems Inc.’s list for the next major release of the platform, code-named Tiger, next year, although developers may not be ready to jump in. Read it at eWeek.
Broadening the reach and appeal of Java is at the top of Sun Microsystems Inc.’s list for the next major release of the platform, code-named Tiger, next year, although developers may not be ready to jump in. Read it at eWeek.
A big problem with Java VMs is that they don’t share instances. Right now, each Java program you run will run in its own VM instance and this wastes memory. Imagine running 10 Java applications and having 10 VMs running at the same time.
Tiger is meant to address this problem by introducing VM sharing. So you can run 10 Java applications, but with only 1 VM running. This is probably the only reason I’m waiting for 1.5.
Also, generics will be added in 1.5, but the way they are implemented in Java leaves room for improvement.
would u rather have Java specification changing every one or two years? not me. also, the development environments would have difficult time catching up.
“Sun has come close to blowing it by its bureaucratic slowing of Java’s development and by not quickly addressing Java’s fundamental flaws”
wtf? i wonder what would be those fundamental flaws?
Yep. VM sharing is a must. Apple’s Java VM has it already.
One fundamental flaw, as mentioned by the other posters, is the lack of vm sharing. Even CroanoN agrees that this is a must. And sharing vm instances does not require changes in the java spec.
The other thing is the lack of value types, but you can get away with that for applications that are not computationally intensive.
The best thing about java is the huge cross-platform api it VM can be improved, java will be around for a very long time.
I think both java and .NET will be around for at least 20 years. Java is fast becoming the Cobol of the 21st century. A lot of business applications are written in java, and there will be little reason to rewrite them in .NET. I think .NET has a headstart on the client side while java is firmly entrenched on the server side.
“Apple’s Java VM has it already!”
Are they going to re-implement the same thing or are they going to incorporate Apple’s changes? Does anyone know?
Dan
Does it share only the runtime or does it share the class files?
well, i thought the article was talking about development of java language and not jvm implementation. performance wise, sun’s jvm is not the best but there are other options.
“fundamental flaw” seemed like an exaggeration to me.
“VM sharing is a must.”
it’s a must on the desktop. but no must on the server side where java is the strongest.
There are many issues with sharing a VM. There are also hundreds if not more exapmples/products/software/shareware that can easily be setup to provide each `application’ its own stack in the VM, together with its own ClassLoader. I’m confused as to why this is such a big deal to everyone. I can and have done this myself by having a single VM run individual apps in their own stack/loader.
HOWEVER, a large problem is the System class which really needs to be changed to a singleton instead of having so many static methods.
—
3lixyqueue
“Are they going to re-implement the same thing or are they going to incorporate Apple’s changes? Does anyone know? ”
Apple donated the code for VM sharing to Sun.
What realy sucks is the lack of integration of XML processing within the class library. The Node interface comes from dom.w3c.org, the parsers come from who.the.fuck.can.remember.com and on and on… And the lack of functionality for parsing streaming XML data is just amazing. They’re probably right, who would ever be crazy enought to attach a SAX parser instance to a network socket. *gasp*.
From a company that put the ‘.’ in ‘.com’ it’s certainly moronic to not fully integrate web standards into Java.
</rant>
Java has had great success on the server, but not quite the same success on the desktop (or indeed through the browser as applets). Among non-technical users, I think there remains some negative perceptions about Java when it’s encountered on a web page. I am using Mozilla under Windows with Sun’s own Java Runtime Environment (not Microsoft’s) and still find performance of applets poor (I have an AMD Athlon 1.4GHz processor). I’ve since switched Java off completely in the browser.
When Sun says they want to broaden Java’s reach, I suspect they certainly have the desktop in mind. What’s interesting is that Macromedia is now competing in the same sphere as Java for “rich Internet applications”. Macromedia is heavily promoting Flash as a tool for creating apps – not just a tool for creating animations and there is a lot of interest and movement in this area. Also, the Flash player is a small and lightweight download (less than 1mb) compared with Java’s large runtime (16mb for their international runtime version, 8mb for the English language version).
“a large problem is the System class which really needs to be changed to a singleton instead of having so many static methods.”
why is it a problem even a large one? do u miss getInstance() maybe?
“I <skipped> still find performance of applets poor”
u might wanna try the following options:
– Upgrade to JRE 1.4.1_02
– Do not start Java console
– Do not show Java in system tray
hope this helps
I am using Mozilla under Windows with Sun’s own Java Runtime Environment (not Microsoft’s) and still find performance of applets poor (I have an AMD Athlon 1.4GHz processor). I’ve since switched Java off completely in the browser.
The biggest problem with applets is that they load out of sync with the page they are embeded in, which makes them feel clunky and out of place. Another problem is that the jvm doesn’t exit when you leave the page until you completely exit the browser, leaving a huge unused jvm in memory. More than java performance (i think you’ll find that after the applet actually loads it’s not that slow), these two things make applets suck.
Sun offers an alternative though called java web start, which launches a java application (in a sandbox) from a url. Since it opens in its own window and not embeded in the browser, a web start application is synchronous, resizable, and actually exits when you close it. Web start also caches applications on your hard drive so they don’t need to be downloaded again next time you click the url (unless something was modified). It’s frustrating to see java chat rooms and games that are applets when java web start would be so much more appropriate.
re: ‘Isn’t it ironic’ post of the day#2 (by JohnGalt)
> The Node interface comes from dom.w3c.org
As it should, its org.w3c.dom class, as defined by http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/
> the parsers come from who.the.fuck.can.remember.com
but accessed via javax.xml and javax.xml.parsers packages, I use XML alot, and have never used anything other than the w3c and javax packages.
re: Java on the desktop (by Hugo)
> and still find performance of applets poor
A lot of this is down to two things
a) muppets alowed near a copy javac.
b) “old” applications not being updated.
But, yeah performace is still poor, but not with the java applications I use (mainly in house stuff) yet many smaller applets, so anything to up the speed is a Good Thing ™
re: @Hugo (by lamer)
Use the 1.4.2 (beta), tis much faster
re: Re: Java on the desktop (by ethzero)
> Sun offers an alternative though called java web start,
Here here, Webstart is great.
If only I could wrap native apps in it
There are many issues with sharing a VM. There are also hundreds if not more exapmples/products/software/shareware that can easily be setup to provide each `application’ its own stack in the VM, together with its own ClassLoader. I’m confused as to why this is such a big deal to everyone. I can and have done this myself by having a single VM run individual apps in their own stack/loader.
How do I do this with current VMs? I am really interested to know, because if such options exist, why aren’t they more popular?
@anonymous
Does it share only the runtime or does it share the class files?
It shares the runtime. Not sure about the class files though.
Anyone knows if the JEditorPane class can now display xml/xsl documents, i used it in my last java project but at the time (early 2000) it only handled html and rtf i think.
So that’s why My Mac seems faster when running multiple Java apps. From my exeriance, Mac OS X is the best platform for Java right now.
does someone care to explain how they provide security with vm sharing? wouldn’t it be possible for one java program to exploit bugs in the underlying vm and write directly to another program’s memory? what if you have JSP handling credit card number processing and someone else on the server runs a malicious java program that can steal them out of another process’s memory space?
There is a project called jsh which is a shell that can be used to make several programs use the same VM (by loading them from the shell). Google around for it.
There are several other projects that achive the same result in a different way – another one is jesktop, others exist but i can’t remember them right now.
“why is it a problem even a large one? do u miss getInstance() maybe? ”
🙂 no, but on a technical note, there can/could/would be different system properties per application stack. One app may wish to use an SSL provider from IBM, another from Sun, etc. Having a mapped singleton in the System class would allow for multiple instances. stderr/stdout/stdin etc should in my mind exist in the Runtime class instead s this is more proper to the Runtime of the `system’ and not so much as the System or Sub-system per application 🙂
—
3lixyqueue
Take a look on SF.NET, I’m sure there are several things to give examples, but the basics are such:
In a method of a controlling class a very high level overview:
Instantiate a new ClassLoader with the URL of the codebase of the application `stack’ you wish to run (most likely a file: URL). In a try{}catch(Throwable){} block, statically call the main(String[]) method of whatever class you want to start with. Class.forName(String) it if you need. Loop.
Okay, put a user interface around it et voila. 1.4 (was it 1.3) took care of a multitude of GUI displays so GUI apps are generally no longer a big problem. But the System class is still shared which can cause problems for apps depending on shared (but different per app) System properties.
Systems have been developed to just do the above logic with some parameters to a Servlet or from a Socket or from a Swing front end, etc.
—
3lixyqueue
“Apple donated the code for VM sharing to Sun.”
This was suprising, but very good to hear. I’m glad Apple contributes (and always has, making Java integrated into their desktop) to making Java a more viable and supported application on the desktop.
1. Sharing VM. Yes, it is important: if I use 2-3 application on my desktop the memory usage can be horrible with java.
2. Properties, events and other features from C#.
3. Native windowing environment (like Eclipse.org)
Without this things IMHO .NET will kill the java.
Maybe they should have called it Jaguar, or Panther!
😉
That’s all they need to do to perform VM sharing? What happens if 1 app crashes? I think this would probably bring down that entire instance of the VM.
does someone care to explain how they provide security with vm sharing? wouldn’t it be possible for one java program to exploit bugs in the underlying vm and write directly to another program’s memory? what if you have JSP handling credit card number processing and someone else on the server runs a malicious java program that can steal them out of another process’s memory space?
I think the chances of this happening are rather slim. This is mostly because there is no way of obtaining a raw pointer to an address in memory, unlike in C. Also, there aren’t any buffer overruns because all arrays are bounds checked at runtime.
The only way I can see this happening is through JNI. But then, that would be using native code, and such a problem is a faced by every program, not just those written in Java.
1. Sharing VM. Yes, it is important: if I use 2-3 application on my desktop the memory usage can be horrible with java.
Yes, this is definitely necessary. It should be coming in Tiger. I don’t think .NET does this either.
2. Properties, events and other features from C#.
Not strictly necessary as they are just syntactic sugar. Nevertheless, they are nice ot have .
3. Native windowing environment (like Eclipse.org)
You already have SWT. What’s the biggie? I don’t think using the native windowing system is necessary, but whatever components that are used must look and feel like native components. As long as they look native, I don’t really care how they are implemented.
Without this things IMHO .NET will kill the java.
Not until it leaves the pure Windows world. Not everyone has the money to run MS software
>>2. Properties, events and other features from C#.
> Not strictly necessary as they are just syntactic sugar.
The difference betwen the COBOL and Java also just syntactic sugar. But IMHO can be important…
> 3. Native windowing environment (like Eclipse.org)
>You already have SWT. What’s the biggie? I don’t think >using the native windowing system is necessary, but
>whatever components that are used must look and feel
>like native components. As long as they look native, I
>don’t really care how they are implemented.
It’s true, but the SWING (on linux) looks very ugly and it is very slow. And when I talk about native windowing environment I think officially supported native windowing environment.
>>Without this things IMHO .NET will kill the java.
> Not until it leaves the pure Windows world. Not everyone
>has the money to run MS software R
http://www.go-mono.com
>That’s all they need to do to perform VM sharing? What happens if 1 app crashes? I think this would probably bring down that entire instance of the VM.
thats always a possibility. the important thing first, is to run all the applications in different memory fragments in the same VM. the shared VM should be protected greatly. its really like an OS inside an OS context switching between the applications. the methods employed in OS for protection, can also be applied to VMs. such as watchguards etc. in all the cases, the thing that you will gain is much more important than the things that you will loose.
>Properties, events and other features from C#.
Not all the syntatic sugar of C# are nice. Some are allright. I loath some others. Java 1.5 will contain better syntatic sugar than current C# versions. in all the cases, IMO, its really not very important, since IDEs with refactoring capabilities, such as Eclipse, already handles great deal of code repetition, etc.
>Native windowing environment (like Eclipse.org)
i think this is unnecessary from couple of perspectives. for instance, hw is getting fast. Java 1.4.1_02 applications are very smooth really. sun is optimizing it in its every release also. besides, you can always use eclipse. its nearly available on all the platforms now. even native compilers such as GCJ and Excelsior Jet are able to compile SWT to native code.
> That’s all they need to do to perform VM sharing?
> What happens if 1 app crashes? I think this would
> probably bring down that entire instance of the VM.
Yes potentially it could. One of course WOULD catch a Throwable which should handle most application-level exceptions. There of course are other problems that I could potentially see such as windowing freezes or problems in the VM codebase itself, but these will nonetheless happen with a formally sharable JVM or a regular JVM anyway. Most looping apps SHOULD implement an iterative check on the interrupted flag in Thread IMNSHO for runaway threads. This would be very easy if a new JVM can bring back the suspend()/resume() functionality in a threadsafe and deterministic way which theoretically should be quite possible. It is also quite necessary to have a JVM properly implement its Thread priorities. Currently only Apple in my tests properly implements these, no Sun’s JVM on Sparc/Solaris doesn’t even do it well. Again, though these are very /general/ JVM issues, and _not_ in any way specific to VM sharing.
—
3lixyqueue
I tested java1.4.2 beta today, and I found it to be much faster, and the Javaplugin (under linux) starts lot lot faster. Do other people here share the same impression ?
Yes. Java 1.4.2 is a lot faster than its predecessors. On Windows XP, Swing actually feels responsive. But the neatest thing is the SSE/SSE2 optimization that the JVM makes. Floating point code rocks on it.