Posted
by
timothyon Saturday October 08, 2011 @12:19PM
from the larry-pulls-a-shot dept.

snydeq writes "Fatal Exception's Neil McAllister suggests that the real news out of this year's JavaOne is Oracle's ambitious plan to revitalize Java on the desktop, the Web, and mobile devices. 'It's been tempting to assume that Oracle, with its strong enterprise focus, would ignore the client in favor of data center technologies such as Java EE. This week, we learned that's not the case. In fact, the real news from this year's JavaOne conference in San Francisco may not be Oracle's plans for Java 8 and 9, but the revelation that Oracle is gearing up for a new, sustained push behind Java for the desktop, the Web, and mobile devices. If it can succeed in its ambitious plans, the age of client-side Java could be just beginning.'"

I've spent quite a bit of effort over the last two months removing Java from all of my clients' computers. I've seen it used as an attack vector far too often and it was time for Java to go. I've even got some - but not all - of my clients to let me remove Flash and Acrobat Reader. In the long run it's safer for them, and cheaper for them too.

I've spent quite a bit of effort over the last two months removing Java from all of my clients' computers. I've seen it used as an attack vector far too often and it was time for Java to go. I've even got some - but not all - of my clients to let me remove Flash and Acrobat Reader. In the long run it's safer for them, and cheaper for them too.

Why is it that every Java story on Slashdot is infected by an IT Admin Monkey telling us that he's removing Java from his "users" machines. If these IT monkeys really wanted to remove the most targeted attack vector from their "users" machines they would replace "Windows" with something secure.

Yeah, my sysadmin went a step further and unplugged the Internet from the wall. He said that it was being used as an attack vector far too often, and it was time for the this ridiculous "Internet" thingy to go. In the long run, it's been safer, and cheaper for me too!

Why is it that every Java story on Slashdot is infected by an IT Admin Monkey telling us that he's removing Java from his "users" machines. If these IT monkeys really wanted to remove the most targeted attack vector from their "users" machines they would replace "Windows" with something secure.

This generally makes me think of admins who want an easy life, instead of trying to understand what the problem is and solving it properly. This is usually the most dangerous sort of admin - reminds me of the intern who got an application to compile, by removing all the logic from the code. Also, how many time do you have people saying Java is slow or something else negative, only to find the are actually talking about JavaScript in the web browser?

If they really wanted to make their machines secure, they'd remove the users. Unfortunately, IT is never told to make the network secure, they are told to make it secure and usable. Uninstalling Windows typically means rewriting a large amount of Windows-only code, or at least doing exhaustive testing of it in WINE, and that's beyond the budget of most IT departments.

There are some pretty cool developments going on in Java lately, e.g. LINQ, functions and reified generics. Why wait for the JCP when there are enough mad people out there who will implement all the tools that Java is perceived to lack? See for example: https://github.com/nicholas22/jpropel-light [github.com]

There are some pretty cool developments going on in Java lately, e.g. LINQ, functions and reified generics. Why wait for the JCP when there are enough mad people out there who will implement all the tools that Java is perceived to lack? See for example: https://github.com/nicholas22/jpropel-light [github.com]

There are many Swing L&Fs, but they are all crap. Even the "native" ones are crap (easy to spot that they are not native). And don't even get me started on the way standard dialogs (file open etc) are handled.

Oracle should take a clue from Qt - it also draws its own widgets, but it does it in such a way that you'd be hard pressed to tell the difference from a native app.

And replace it with what? The only real alternative is SWT, and that's awful to work with. At least Swing is a nice framework, and anyway, Swing apps can look nice, the main problem being that most developers don't bother to find out how (and that most Swing guides / books are wrong in many ways).

Just make sure the Java plugin doesn't hang browsers anymore or make them sluggish!

I hate it when visiting a academical website that has the well-meant intention to show some mathematical principle using a Java applet, but instead Firefox hangs while loading it... I'm not sure if it's the fault of Firefox or the Java plugin, but no matter what, it doesn't help Java.

With the latest Java releases (you are running the latest 6.0 release?) you shouldn't be seeing that behaviour. The way applets are handled has totally changed to be more like Webstart, which makes them much more robust. That said, I don't run Firefox, so maybe there is an issue there.

However, most Java applets are badly written. Few people appreciate how to use Swing/AWT properly in an application, let alone in Applets.

Nah, its probably slow for the same reason people perceive slow (or fast) boot screens. 99% of all java applets download their entire payload up front, so you see a lot of spinning java logos waiting for things to load (because its downloading everything).

The savvy Java applet developer and most other app platforms (including most flash applets) have a low introductory payload to throw up the splash screen to show how close they are to loading the thing. If you don't know what I'm getting at, take a look at

I have a set of systems I am building that are used by a store chain. It's my line of products, one of the components is a store management system that is used in the stores. Every piece is server/client, but in this component the client is a Java swing application that also can be used as an applet (that's the good part about Java, with minimum work you can have it working as an applet if it works as an application.)

So I know that most people on/. are derisive about such solutions, but I am moving the stores from Window platform to GNU/Linux (Ubuntu actually). Of-course it's possible to build everything in C and C++, etc., but when the entire solution is java with every component on every server / client, even though most clients here are thin, that run in a browser of choice, using Java as a client is really the most logical thing.

Every component is compatible with each other, the communications between components are all built in exactly the same manner, be it a server-server or server-full client.

The important thing is that moving from Windows to GNU/Linux is easier, because the look and feel stays almost the same.

The one real problem for me is actually some driver for certain types of devices, like zebra thermal printers and such, but that's not a problem with Java itself, that was a problem with moving the clients from Windows to GNU/Linux (haven't figured this out yet, so one of the computers in stores is still Windows, because the configuration and font setup software supplied with the Zebra printers is for Windows.)

I can accept the hate, that the Java solution may not be wonderful or uber-cool or whatever the current feelings are about what people hate today, but the point is that it's working. If I couldn't get it to work, I would have had no choice but to go with something else, but that would require extra work, to get it all communicating with the server sides, that are Java based.

The speed of this application totally depends on the data model, database work, algorithms and communications, but the Java GUIs themselves are not presenting any major problems. If I want to, I can even style the main frame of the window with anything, any kind of graphic that doesn't look like a normal window, this works with JNI, but I don't really need that in this project.

I have used this in a browser as an applet and I have used this to communicate over the Internet, not just within the stores themselves, which is an interesting feature.

So can somebody tell me what they think I should be on a look out for here? Is Java going to blow the fuses or are the tables going to catch on fire?

We thought (signed) Java applets would be a sound method to get cross-platform client software onto desktops. What we found is that the browser plugin from Sun/Oracle and even OpenJDK is buggy and unstable on most platforms. We get assertion failures out of the plugin loader that have been listed as bugs on Sun's tracker for almost a decade, as well as bizarre GUI related exceptions. Things seem to get worse the more you use the applet/browser interfaces, for example to access the cookie store or the page DOM.

It crashes or hangs Firefox and Seamonkey on Linux x64 perhaps 10% of the time the applet loads. It crashes Safari on Mac OS X over 50% of the time. It seems most stable, but still not foolproof, on older Windows systems.

Well, in my case this particular client application is normally installed as full desktop app, running it an applet is possible and I sometimes do it, but that's not the main selling feature. In reality there is no reason to run this application in a browser. In a store there are normally 2 computers for administrators - one is on the Internet and internal network, and the other is on the internal network only. Both computers have the client installed and one of them has the server installed, both clients c

The JVM is installed as a root, the tomcat server runs as a tomcat user, but I do navigate system as root:)

I am actually going to try these flags in one of these stores, see if that helps. Of-course there are all sorts [pastebin.com] of errors that creep up and kill the JVM this way. Here is a shitty one, that only affects 2 stores for some reason and this one crashes the client, not the server [pastebin.com].

Yes, I have looked at it as well, but as I said, the client is normally running as a stand alone, there is no real good reason to have a browser window around the application window, so it's not really the main point. The main point is portability and complete compatibility between all solutions, binary compatibility as well as source compatibility.

Between various server side systems here, plenty of source code ends up being reused. From beans to helper classes, to entire packages. It's like one huge appli

Well, it's not the only app running. There are some office apps, email client, possible a browser opened at the same time. Things like that, who knows what's in the browser.

It's about 2G RAM per machine and I dedicate 1G to the client (-Xms256m -Xmx1000m), it's not absolutely necessary, but they can load the entire base (about 35000 SKU) into the memory of the applet and they can open multiple catalog windows in it as well, multiple order windows, who knows what they do. 35000SKU would easily take 35000 2

But I said specifically that I have a set of components, applications that are all written in Java, so why would reusing JVM with a different language be so great? It means having to learn all of the pitfalls of another language, and I code in Java since 97, among other things.

What is the advantage? There HAS to be an advantage to move code form one language to another, especially given that I have most of the main functionality done, and now it's just adding features and fixing whatever bugs that are found

Well, a huge part of the data model and object model is pretty much the same across multiple applications here, so it's easy to reuse the beans that way, and the communications between server/server and server/full client are then very simply serialized objects, which are java objects. So that works smoothly when all parts are using the same object model and serialization functions, which is what you get with Java. So I haven't looked at say serializing/deserializing Java object model in python. It probably

I am using ZPL, but on the client, and only the client that is working on a Windows machine is able to print in Cyrillic. One of these days I may get around figuring out why I can't print Cyrillic with ZPL from a GNU/Linux machine, but obviously I use CUPS there, with RAW and send ZPL to the printer.

I don't know the definition of major in this context, if by 'major' you mean - it's built for Weblogic server 3 or 4 or 8 or 11 or for Websphere 4, 6, 7, 8 whatever, then yes, you may be stuck (and it's not a fact, but remember than normally you are stuck), so you have to migrate to the next version of that software to migrate to another JRE.

As to doing something 'particularly interesting' - this is business software. The interesting things here are the complexity of integrating multiple stores and offices

Actually Google was just bastardizing Java as much as Microsoft did with J++. Oracle has every right to sue Google and Google isn't as innocent as you seem to believe.

Sorry, but this is just plain wrong.Google does nothing that harms Java in anyway. After all there is no "Google Java". The program text for android applications running on the Dalvik VM "looks like Java" just as C looks like "C". But that has nothing to do with Java Trademarking etc.

Sun/MS1. Microsoft's J++ implementation mirrored the functionality delivered with J2SE2. Microsoft's were in a business relationship with one another regarding

Oracle/Google1. Google's Android competes with J2ME in cursory ways for sure, but I'd equate J2ME as more dumbphone+ based, and the standard Android API's are really pigeon holed into the types of devices they're using them on now. App engine's a very far throw from J2EE and I'd consider them so different that they can't be considered direct competito

Microsoft, back in the day, signed a licensing agreement with Sun - which is why it was called "Microsoft Java", despite "Java" being trademark of Sun. That agreement had certain clauses that were violated.

Google didn't sign any agreements with Sun/Oracle, and they don't use Sun/Oracle trademarks in their products. They're just using the source code, licensed under an open source license.

I'd argue that J2ME is NOT Java. You can't port anything useful to J2ME from a proper Java application. It's easy to port code to Android, on the other hand. As Android is still on Java 5 syntax, it'll be harder to port things in the future. But I doubt that Google is in a position to upgrade development to Java 7 at the moment, because of the lawsuit....

First, you would have to get every vendor to agree to this. Not a single one will. Oracle has spent time making enemies of most people required for such a plan to succeed, and their mission statement completely conflicts with the goals of the rest of the people that would be needed.

Oracle has been too confrontational with Google to get their help on anything that would advance Oracle's motives.

Since Oracle's angle is in effect reducing platform differentiation, Microsoft and Apple are not about to give them the time of day as success would simply erode whatever value they could possibly construct.

Open source communities have been sufficiently alienated by Oracle's goings on that they don't have a prayer in Firefox or other open source browsers either.

Combine this political obstacle with the simple fact that there isn't a large need to be filled. Between Flash and Javascript+HTML5, there isn't much to add to the web experience and for things like smartphone and desktop applications, the respective vendors have it too good right now in their walled gardens to relinquish control.

This didn't happen in the late 90s/early 2000s, and it's not going to happen now.

First, you would have to get every vendor to agree to this. Not a single one will. Oracle has spent time making enemies of most people required for such a plan to succeed, and their mission statement completely conflicts with the goals of the rest of the people that would be needed.

Who are these enemies? Apple, IBM, and SAP are members of the OpenJDK project. Sure Google chose to make their own bastardization of the JVM and call it Dalvik which used a different byte-code format that is almost a one-to-one b

The opcodes themselves are one to one, just like you would transform an add command to a Power CPU to a x86 CPU. In the end it's still an add command.(By the same logic, LLVM is guilty of the same thing)
Next, and most important point, is that the.class file format is radically different to.dex format. Sure, they're convertible.. Just like ODF can be converted into OOXML.

Apple's relationship with Java started at slightly more than token and has recently markedly declined as they realized they can charge people to develop and market iApps in a walled garden and Java doesn't play into their strategy.

IBM and SAP I'll give you are very attached to Java, but I don't see that doing much for "Java everywhere". Java in the enterprise is there and will continue to be there, but the goal in this article was Java *everywhere*. In the consumer market, Java plays a negligible client r

Are you an Oracle DBA, per chance? Because you defend one of the most hated companies in Java land. You just have to remember how anyone in Java world viewed Oracle's products prior to BEA acquisition.
You might think IBM's involvement in OpenJDK might mean something positive, but IBM is still a very aggressive competitor to Oracle. IBM is pretty much on a all hate relationship with HP and hate+cooperation with Oracle.

Why all the freakishly negative comments about one of the best languages to come along in a while? Super blazingly fast and fun to program. No, it's not ruby or python, but then again those languages are slow as thick shit in comparison.
Anyway, if Java is going to succeed on the desktop it has to be possible to write apps which don't take up 500M of RAM, like Eclipse for example. That thing uses 500M of real memory for what!? Displaying a UI, edit three or four files, a console window... I mean, this is 500M we're talking about. I blame Swing and the fact that its components are based on AWT Component, which is a huge memory hog with about 60 instance variables - holy cow, I thought I was exaggerating but it's close enough (53 + 13 because JComponent extends Container not Component). 66 * 8 = 512 bytes although not all elements are pointers I admit. Awesome! (not).
I wonder if things would have been different if they didn't completely screw up Swing. AWT was done in about a week in 1995, it's OK that it wasn't perfect. But there is no excuse for Swing to suck so badly.

Java just allows for shitty code. I have written C++ apps. They all used somewhere between 2 and 10 megs of RAM. I wrote a small Swing GUI with one text pane and 4 buttons, it uses 50-70 megs of RAM. WTF? Then, I wrote an entire enterprise app in SWING and man that thing uses a TON of memory....somewhere around 256-500 megs depending on if someone has been using it a lot or not. Not to mention now I work on J2EE code, which is just inefficient as shit. Our web frontend is so slow and all the UI guys

I total agree. My boss pretty much discarded his middle layer in geronimo and rewrote the php layer to directly use the database instead of webservice because performance was so poor on our critical monitoring website.

We use a lot of Java and it just sucks memory and performance like there is no tomorrow. We have one server that we just had to up the memory from 5 GB to 7 GB to 10 GB because the fracken java app was doing god knows what with what should be at most 500 MB of data. I'm sure its bad code and

Do you know how much an hour of your work costs compared to a gig sick of Buffered ECC RAM? Newegg says highest priced DD2 is $80 per 1GB. Now do the right thing, calculate how much your company would spend on buying the memory and letting you spend 1 less on a specific task, as opposed to spending 1 hour more and not buying 1GB RAM...

What exactly sucks in Swing?And why are you complaining about Eclipse using 500M?Do you really think MS Visual Studio uses less?WTF when you compile a few undret megabytes of source code, where exactly do you think this is happening? My computer uses RAM for that...

Java can use as less RAM as a C program can. With one small exception: the JVM is added.

Do you have any clue about what you are actually talking? Your Eclipse example is not even using Swing and you complain about Swing, sigh. If you are not abl

Parse your code in the background, generate symbol tables, maintain complete symbols of every class in your program, generate bound method trees at least of the current method you're on and usually others, provide intellisense, refactoring, scan your code for usage or other stylistic errors, colorize,...

Why all the freakishly negative comments about one of the best languages to come along in a while? Super blazingly fast and fun to program.... Anyway, if Java is going to succeed on the desktop it has to be possible to write apps which don't take up 500M of RAM

Java is a trade off that uses excessive memory usage to allow you to 'have fun programming' (write shit code) and run almost a fast a C/C++ and have byte code that will run on multiple platforms.

Its inherent to the language to use heaps of memory (needing a VM and using conservative GC) and have slow load times populating that memory. Is a language that has a niche (only good for running on a desktop with 4Gigs or more of ram) not a brilliant language. Probably the main reason its hated, is its owned by Oracle though. You cannot rewrite Java and have the extra memory usage disappear.

Are you for real? My Eclipse uses 76MByes of RAM. Please read with me: 76 Megabytes RAM. Seventy six. And I have a bunch of plugins, like Groovy, Maven, etc. What I did was start up Eclipse and run a few tests in JUnit.

Also you picked your application somewhat wrong. Eclipse is not a text editor, it's a full blown IDE, like VisualStudio. How much does VisualStudio uses, and it's written in C++. Also Eclipse uses SWT not Swing; SWT uses the native widgets of the system, and Swing is drawing it's own widgets.

Much modern software, supported by modern OS' use available memory to cache as much stuff that can be cached to increase performance. If a piece of software is using a few hundred mb it's probably doing so for good reason, rather than wasting CPU cycles dynamically calculating everything whilst your few gb of memory sits completely unused.

Modern IDEs don't just provide a few text editor windows, they provide things like autocomplete, and it's

um, i know it's being said quite a lot, already, but it's worth repeating: java's pretty much dead on the desktop. people are even replacing Flash applications with HTML5, as it's reaching high market share and maturity, especially now that IE9 has actually better (read "stricter") HTML5 compliance than the Free Software equivalents. how in god's name is oracle expecting to break into that?

the other thing that's worth emphasising is that when you have alternative language bindings to HTML5, you get the best of both worlds. so... why doesn't oracle put its money behind getting java bindings (or, better "generic" bindings like DCOM and XPCOM) on top of HTML5 browser engines? with Trident (the engine behind MSHTML aka IE) that's a done deal already: Trident (MSHTML.DLL and MSXML.DLL) already *has* DCOM bindings so it's a matter of about 2-3 weeks to get something like that up-and-running. XPCOM (XulRunner) is a little trickier: you'd have to find or create java bindings to XPCOM (they don't exist afaik) and the hardest (technically speaking) is webkit (used in android, safari, ipphon etc.)

then you have literally the best of both worlds. HTML5 as the "front-end", and whatever-language-you-choose to control and direct it. btw this is exactly what's been done for the pyjamas project (http://pyjs.org) except using python not java.

um, i know it's being said quite a lot, already, but it's worth repeating: java's pretty much dead on the desktop.

I really wonder on what basis comments like this are made.Every new Java version improves also the feeling on the Desktop. I absolutely don't get what you are talking about. Most companies I have connections to use Java, on the Desktop. Why should they write their desktop applications in a different language than the server part?

The thing is, Java as a language/development platform has had everything I need and use for many years now. Sun (and now Oracle) have failed miserably to offer a compelling developer proposition outside of the core language and API. The EJB debacle just showed how much the Java community, and not Sun/Oracle, is driving the Java innovations that are actually useful.

What Java needs (and won't get, because there's no money for Oracle in it) is for Orac

Meanwhile it continues to power the backend of countless websites and systems you take advantage of day to day from your bank to your supermarkets stock control system to eBay and Google, to any smart features you may have on your TV or set top box.

And really, that's the beauty about Java, it doesn't matter if people like you care about it or not, it'll still continue to sit happily working away solving countless problems across the globe.

Pretty much this.Even though C# fanboys like to bash Eclipse and Java, they just don't suck badly enough. Yeah, Eclipse needs a GUI designer and it would nice to have delegates/events ala C#, but the workarounds are not that bad to tie yourself to MS. Java gained most momentum in the years when you needed a serial number even to install (!!!) the MSDN documentation from a CD. If it weren't for Java we wouldn't have stuff like Visual $language Express for free.

Cross-platform is a big feature point of Java and the I am sure that the memory usage problem is solvable, thought I am yet to see any real move from Oracle.

For me the biggest problem when it comes to desktop applications is the requirement that all UI elements must be coded. This means that every IDE codes their UIs in ways that other tools can't leverage. If Oracle wants Java to be serious on the desktop, then I believe they need some sort of markup for easily designing UIs, without having to resort to co

Java is cross-platform enough for our professional use - development on Windows, deployment on a mix of Solaris SPARC, Solaris x86, Debian, RHEL and Ubuntu Server. It really does Just Work, and well enough for actual money-making activities (niche professional publishing for paid subscribers, in this case) if you keep to pure Java.

Since when Java/Python/C# can help you access OpenGL, webcam, etc on a different platform?

I have N900 phone, which runs Linux. I want to access its camera. WIth C/C++, I can at least port my own video4linux library in reasonable time, because v4l2 support is there. Java wouldn't help me with that at all.

"Fat" languages may be fine for getting something done in quick and dirty way on few well-supported platforms, but on an obscure platform, you are much more safe sticking to C/C++ - if there's no API to

So far as I have seen, most of the *appearance* of lightweight is achieved through preload. Conversely, most of the criticism of Java as bloated stems from a decade old impression and crappy app coders.

.You also get access to some devices that Java doesn't support

This is mostly a natural consequence of supporting many platforms. Platforms aren't different just for the fun of it, and supporting them all means mostly settling for the subset of ubiquitous capability. This applies to most scripting languages as well, though those typically get extended by platform-specific modules as they don't carry the stigma of being Java.

Also, Visual Studio is much better development IDE than any other.

Maybe for medium/large projects, but for quick stuff I still haven't found an IDE I like after trying visual studio/eclipse/etc/etc. Nothing beats vim and a compiler sometimes.

.NET and C# pretty much took over Java. Sure, Java supports more platforms, but it's resource and memory hog, insecure (there's tons of Java exploits out there but none for.NET!) and Java development is light years behind.NET and C#.

You live in a small, closed world. Glad if works for you. As long as you stay on MS desktops and friends it probably works OK. But for mobile, web and other stuff that is happening, it kinda sucks.
The biggest problem with Visual Studio is its a MS product. Which means you get locked into the (inferior) MS world. Not to mention the inevitable bloat and odd behaviors, etc that seem to come with any MS desktop product.

It's easy to support more than ONE platform, since.NET only runs properly on Windows.

but it's resource and memory hog,

Benchmarks show that Java runs much faster than.NET.

insecure (there's tons of Java exploits out there but none for.NET!)

That's why my Windows Update log shows I have 9 "critical security updates" for the two.NET frameworks I have installed in my Windows machine. And by the way, I don't see why I need to have more than one version of.NET installed at the same time, and why.NET updates have to be so heavy. 40 megabytes for a

Brilliant, now try making it run on OpenBSD. Too weird? How about OS X?

Well done, you used a tool appropriate to the job, and got a good result. I've written C# apps to integrate with MS Office, platform-agnostic server apps in Java, high performance stuff in C, text processing tools in Perl and text adventures in Inform. In all cases, the language fitted what I wanted to do, well, but that doesn't make it inherently better than another language in some grand scheme of things.

I don't think its too late, though they have a lot of work in front of them AWT failed because it was limited in its platform integration and Swing because it really didn't feel like it was intended for any specific platform with a lot of the important UI hooks missing.

The best solution so far has been SWT, IMHO, though I am yet to see any small applications, since they all seems to follow the same UI design approach as Eclipse and tend to feel rather heavy. It would be nice to see SWT as a UI extension tha

SWT is awful. At least Swing is pretty clean, and logical. SWT is often utterly insane - look inside the code for proof of that. Swing is also totally extensible. SWT is not (the number of classes that state the class is not final but must not be extended is quite impressive). I say this as someone working on a small (450k semicolons) SWT/RCP application which integrates components written in Swing, JOGL and Processing.org.

Have you see all the crappy 3rd party Windows apps that, despite being written in C/C++ or C#/VB, insist on creating their own custom UI controls that work in subtly (and not so subtly) different ways from the ones provided with Windows and very often don't look the same as the Windows ones (and often look terrible)?