84 Comments
- inactive, on 10/12/2007, -4/+19@insomniac8400
With Java 6 using GTK, it's really not bad at all. Try installing the latest Azureus. It's awesome. - Amablue, on 10/12/2007, -1/+15Maybe I'm just a naïve CS student, but java is a perfectly fine language as far as I can tell. Speed isn't as much an issue as much as people claim it is, and it's easy to write code that can be ported across systems. Plus it's got an awesome library and documentation.
- inactive, on 10/12/2007, -10/+24Windows as anything.
LOL - geronimo, on 10/12/2007, -0/+12Sorted list of languages based on memory consumption:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=all&xfullcpu=0&xmem=1&xloc=0&binarytrees=1&chameneos=1&message=1&fannkuch=1&fasta=1&knucleotide=1&mandelbrot=1&meteor=0&nbody=1&nsieve=1&nsievebits=1&partialsums=1&pidigits=1&recursive=1®exdna=1&revcomp=1&spectralnorm=1&hello=0&sumcol=1&calc=Calculate
( http://tinyurl.com/25pop7 if that doesnt work).
Java is 7th from the bottom (bad). CPU-wise it is near the top(good). Note that I use java every hour of the day and have been for years, but I recognize its weakness. OTOH it is very quick to develop code with. Fanbois and code monkeys blindly grab hold of and idolize things without much thought, which is why they are where they are in life. - Ademan, on 10/12/2007, -1/+12I think part of it is the fact that java on linux defaults to the blackdown java implementation which does indeed suck, now that java is open sourced though, i believe you'll start seeing much better performance if the sun java implementation becomes the default java runtime. I know that on ubuntu with eclipse, it refuses to use the sun java, you can set ubuntu to use the sun java by default but eclipse will go right ahead and ignore that unless you specify the jre explicitly on the command line.
cheers
-Dan - geronimo, on 10/12/2007, -3/+14Either way, memory stick manufacturers win.
- adolfojp, on 10/12/2007, -1/+12I used to mock Java's horrible look and feel and performance on the desktop until I used the last version. I must say that for some desktop applications Java it is now a worthy alternative.
/ .NET and Mono guy. - locnguyen, on 10/12/2007, -0/+9You must be referring to Java desktop development and not server side.
- adfsj, on 10/12/2007, -2/+10@iamcitizen
Actually, azureus uses SWT, not swing. SWT already supported GTK decorations, this is not new in 1.6 (SWT is not even released by sun).
There are definately uses for java, no segfaults, few buffer overflows (which can only happen to the underlying vm), no memory leaks, what more can someone ask for? Because of the way java handles memory, its easy to make applications that will never crash, and will be totally portable to any platform supporting java almost totally gaurenteed, so what if its a little slower?, its still faster than scripting languages, and graphics was never what java was designed for. Especially in backend applications within a tech centric company, these are small prices to pay when developing software. - shrewduser, on 10/12/2007, -19/+27hey don't forget .NET sucks too...
- emblemparade, on 10/12/2007, -1/+8I agree entirely with Michael Urban on this. There's no doubt about Java's supreme place on the server, but I do think Java does have a place on the desktop and is a natural choice for Linux. I see three good things coming from this:
1. With the GPL now in place, I'm hoping that Linux distributions will work on integrated the virtual machine more closely with the Linux kernel. Why not jump on and integrate with the new kernel support for virtualization? Java can be yet another subsystem in Linux, removing many of the problems with performance. By the way, the myth about Java "eating memory" may finally be put to rest by... Windows Vista of all things. With Vista's new SuperFetch technology, users are finally realizing that using up memory can actually be a good things. So, here's the secret: the Java VM has always been doing something like SuperFetch, and is aware of other applications and their requirements. Sure, the VM uses a lot of memory, but it will gracefully release it when other applications need it. One wishes that all applications would be as wise! (Or hope that a central OS subsystem would be able to provide services to deal with using up as much memory as possible... perhaps in future OSs!) This would make the VM less "virtual," but that could be a good thing for Linux. In fact, even though Java applications would run on other OSs, people may prefer Linux because Java would run faster there!
2. Now that bundling is no longer an issue, I hope we start seeing Linux distributions including SWT by default (and, of course, they should include the Java VM, just like OS X does). Swing should probably be there for backwards compatibility, but SWT binds to native widgets, and the same app would work across Qt, GTK (and Windows, if you really need it). People complain a lot about Swing applications, and for good reasons. However, they should be aware that's there's a mature, and damn-near perfect alternative that addresses almost all of these complaints. Linux has the power to make SWT the new standard, as it should be.
3. Java has the potential to revolutionize online services. "Web 2.0" dynamic pages are a nice step forward, but still clunky when compared to native apps. Java's Web Start technology would allow all the security and distribution advantages of web browsers, and allow full, real applications on the desktop. We can keep the "2.0" and throw out the web. The prophecy is revealed in this article:
http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-launch.html
I admit... I wrote it... And I'm sorry about the poor writing! I was young. :) - bpapa, on 10/12/2007, -1/+8Wow, did any of the comments in this thread even have to do with the story?
- Lazybones, on 10/12/2007, -11/+17Java runs so damn slow on linux it isn't even funny. Really on windows it isn't too bad now but on linux it is horrid.
- sbrown123, on 10/12/2007, -0/+6""Java" and "Dog Slow" would work."
Dude, get out of the 90s. In the last four or five years java became lightning fast. Sadly, in that same time, it put on more weight than Al Gore. - kevinosborne, on 10/12/2007, -1/+7the slowness of java is a non-issue. Moore's law says everything you code will run twice as fast every eighteen months; wait six years and your code is 16x faster; i.e an 80sec operation is now 5sec.
This is going to sound lame, but have you tried running a circa 1998 applet recently? With the advent of broadband and 2007 vs. 1998 hardware applets fly like the wind. not that anybody cares, but still.
For me the biggest problems with a language are complexity, lock-in and library support. EJBs failed on complexity, but they still kicked ass for 10 years. Lock-in was never an issue with a cross-platform VM (COM anyone? How about ATL?) and now Java will be GPL3 goodness. Library support? absolutely fricken beautiful. A huge default API with threading, remoting, GUI, everything. Ant, Tomcat, JUnit, Eclipse, JBoss, Struts, JCoverage; all free, mature, top quality support systems.
Put all this on Linux and you have the richest language+platform on a fast, mature, stable OS. - Homunculiheaded, on 10/12/2007, -0/+5gernonimo,
If you can you should look up a copy of : Lutz Prechelt. Technical opinion: comparing Java vs. C/C++ efficiency differences to interpersonal differences. ACM, Vol 42,#10, 1999
(any academic library near you should have an access to the ACM)
Rather than reiterate the article I'll just post the abstract:
"The relative efficiency of Java programs is much discussed today, particularly in comparison to well-established implementation languages such as C or C++. Java is often considered very slow and memory-intensive. However, most benchmarks compare only a single implementation of a program in, say, C++, to one implementation in Java—neglecting the possibility that alternative implementations might compare differently. In contrast, this article presents a comparison of 40 different implementations of the same program, written by 38 different programmers (there are two double Java implementations). The data compares, for one particular programming task, the average relative performance between languages as well as the performance differences from one programmer to another within a group of programs written in the same language. As noted, these interpersonal program differences are larger than those between the languages."
This pretty much sums of common misconceptions of Java's memory usage AND also demonstrates that human programing differences have much more effect on efficiency than the actual language.
Just thought that this could help with the point you're making. - bpapa, on 10/12/2007, -0/+5How does nobody give a ***** about the Java Server world? Do you know how much money exists in that world?
Also the Jobs quote is out of context, he said that when asked if the iPhone Safari will support Java, as in applets. He wasn't talking about the Java platform as a whole. - adfsj, on 10/12/2007, -2/+7@Ademan
It depends on your distro.
@lazybones
Use sun's java, it works better. - TiMMY8765, on 10/12/2007, -1/+5TomP: If you're talking about the free solaris disk offer a month ago, mine never showed up either. I expect they got a few more offers than they were expecting with it being posted here and slashdot.
As for C# vs Java, I prefer java because it works better multiplatform than C#, even though swing sucks. - SjRaptor, on 10/12/2007, -0/+4@TomP, timmy8765
My Sun Solaris 10 DVD came just yesterday! - rzalegend, on 10/12/2007, -0/+4Seriously.
You are clueless. - zaqintosh, on 10/12/2007, -0/+3An important thing people don't realize is that there are actually scenarios where Java is capable of running FASTER than its C++ counter-part!
Why? Well Java uses a Just-in-time compiler to interpret class files into machine language. While it can lead to an initial slow-down, just-in-time optimizations while interpreting a CURRENTLY running application can actually do things that traditional pre-compilation cannot.
Something to think about. Also, considering web-based applications are supposed to take over (instead of old fashioned "install on your desktop" applications)... I think you'll find the Virtual Machine way of doing things is going to become the defacto standard - Stonekeeper, on 10/12/2007, -5/+8IMHO Java has it's place, but it's not doing desktop apps. Think about it, there are plenty of multiplatform stacks available that are far quicker/easier to code in. Off the top of my head Python+wxPython.
- thomasprebble, on 10/12/2007, -2/+5You've got to start somewhere and Java is definitely best when it comes to that!
- kripkenstein, on 10/12/2007, -0/+3The war isn't "Java vs. .NET" for Linux. There are other reasonable options as well, which the story writer ignores. Python, for example, is also cross-platform and also high-productivity. It might be slower, but it doesn't take a lot of memory. In fact lots of desktop linux things are written in Python already.
There doesn't have to be a 'winner', anyhow. What is good is that there are good OPTIONS on Linux.
Also important is that code can interoperate. Jython and Iron Python (run Python on Java VM or .Net VM) are work towards that. - GMorgan, on 10/12/2007, -0/+3Java is the most used programming language on the planet. C# isn't even close currently though is growing (C++ and C are still ahead of C#).
- Chewie67, on 10/12/2007, -0/+3"The war isn't "Java vs. .NET" for Linux."
This is one topic that really drives me nuts.
If Microsoft would just do the right thing -- for once -- and work with the Mono team to make a 100% compatible, cross-platform CLR, .NET would dominate all desktop development. MS does a lot of things poorly, but their development apps have always been first class.
Unfortunately, Microsoft is very territorial, and they don't want to do anything to help Mac or Linux, so for now this remains a pipe dream. Ugh. - seppevs, on 10/12/2007, -1/+4Completely agree with you. And EJB 3.0 is a LOT easier!
- micromause, on 10/12/2007, -1/+3Can't Java just roll over and die already? Jesus.
- polymorphist, on 10/12/2007, -0/+2"In fact for me python is a scripting language that have grown up and became a desktop language , I do like python but a big python application can get messy and hard to understand."
I agree that Java is better suited for bigger applications, but desktop applications don't need to be that big, don't you agree?
IMO 80% of the applications on Linux are better programmed in scripting languages rather than Java. - cs02rm0, on 10/12/2007, -1/+3@adfsj
Java programs can leak memory. It is less likely and easier to deal with though, especially with the tools available for recent edititions of the VM. - smellinator, on 10/12/2007, -2/+4Java doesn't seem like a very good "starter" language to me. Maybe you think so because you cut your teeth on it.
I think there are far better choices, if you are just looking at the ease of learning fundamental and advanced concepts, and being able to put them into practice in the real world. Python comes to mind. It's a shame that Python doesn't have the academic mindshare (like being on the AP tests in the US, being taught to college freshmen by default, etc.)
For market-share reasons in the academic realm in the US, Java beats Python. But if you just look at the language features and syntax, for learning purposes, Python (in my opinion) beats Java hands-down. No contest. Python can teach new programmers good programming practices much better than Java. - GMorgan, on 10/12/2007, -0/+2I do my development in Eclipse and Java runs fine on Linux. A popular configuration for Linux in the back end is as a Java App server. Though in the past they have used the excellent IBM JVM. Sun JDK6 is a great improvement though and is now the better implementation.
- q3ctf4, on 10/12/2007, -1/+3Good article, but I wouldn't count mono out.
- rzalegend, on 10/12/2007, -0/+2Why Eclipse suck? Eclipse + JDT is best development environment (regardless of the language) I've used so far.And I've used every major IDE out there and also ***** of the lesser known IDEs. I'm glad that I'm programming in Java for living so i can enjoy Eclipse every day.
Please enlighten me. - hokkos, on 10/12/2007, -1/+3Try your test one by one and you will see that java is better than C# 90% of the time , the sum of the test is maybe bugged
- inactive, on 10/12/2007, -0/+2If you want OpenSolaris discs, try http://get.opensolaris.org/ rather than the sun.dk one.
This one includes quite a bit more than the original one did, Nexenta for instance (basically Ubuntu Solaris) and 2 other desktop Solaris desktop distros, OpenSolaris as well as Solaris Express and the Developer Thing.
Apparently they are still fulfilling the sun.de orders, is just they weren't expecting it to get dugg.
Personally I prefer C# to Java, I've found it much easier to code in and since its built into windows, we could see a lot of windows applications running natively on Linux without modifications.
It's already possible to run a few C# windows applications on Linux (Not with WINE or an emulator) without issues thanks to Mono, and the reverse is true. Granted Java's portability is better then C# (Java was designed specifically to be portable), and stuff is still a bit new with Windows.Forms support only recently being added and compiling generics is only possible with the development Mono C# compiler but its looking fairly good. And there has been the recent Visual Basic .Net support (not that i recomend coding anything of value in a language with the word basic in it, let alone visual basic). Java seems bulky and can be a pain to work with (C# still allows access to pointers and such, even if unsafe). Also Java requires Windows users to download JRE which will probably result in much less development of Window Java applications, but .NET is on new windows by default. Linux users need to install Mono or JRE for either. - inkubux, on 10/12/2007, -0/+2Python is not "managed" as java and .net.
Alot of people like the c syntax with classes and types.
In fact for me python is a scripting language that have grown up and became a desktop language , I do like python but a big python application can get messy and hard to understand. - locnguyen, on 10/12/2007, -2/+4You are ignorant to think nobody cares about server side Java. That's what happens when a person has no experience in the field they comment on. Java, whether good or bad, is the de facto 800lb gorilla in the real world.
- bluejay456, on 10/12/2007, -0/+2"Although the .NET vs. Java war is basically over for control of the Windows desktop..."
The consulting firm I work for does half of all of its development for the Windows desktop in Java. At the end of last year we rolled a Java based ERP system to one of our clients in over 400 remote offices in 30 states.
(We were even featured on the Netbeans site for that project -- http://www.netbeans.org/community/articles/cpbinc-smartrac.html )
This is on top of the fact that about 70% of our Web based development is on the Java platform.
The other half of our desktop development is .Net, but we are still seeing significant client demand for Java based solutions. - jhul, on 10/12/2007, -0/+2"Teaching introductory comp sci courses. Java? Are you drunk? That's like skipping algebra and trigonometry and jumping straight into calculus. Good for the teacher, who is bored by the details of simple algebra, but torture for the students."
I'm currently doing a degree in Electrical & Electronic Engineering at UMIST, we started off coding in Java and assembly and now we're doing everything in C. Although assembly is great for learning how code is actually executed on the processor, I found Java invaluable for learning the basics of syntax and structure, without which I'd be pretty *****. - ishmal, on 10/12/2007, -0/+2Those regurgitating info about what "somebody said" about Java performance: Have you tried it lately? Java 6 (JDK 1.6) is a different animal from previous versions. Speedy for both startup and running.
And the problems with Swing startup and sluggishness had nothing to do with CPU or memory. Swing classes have a -huge- dependency tree on other classes, and the class loader must load hundreds of class files before the first Swing component apprears. (Try starting up a Swing app whilst tracing the classloader. Wow.) The improvements in the class loaders have mostly dealt with this. However, I do prefer SWT, anyway.
I would like for Linux distros to bundle at least GCJ+Classpath, if not JDK1.6+. - mikeurbandz, on 10/12/2007, -1/+2> ? How many project that failed completly? The not so secret secret is the the failure rate was around
> 70-80 percent.
If it is no secret, than provide a citation for it please? Instead of just pulling numbers out of your arse? - biggbrother, on 10/12/2007, -0/+1Silly reading the debate on Java vs. everything else. It depends on what you are doing.
Case 1: Speed is critical. In other words, number crunching. Fortran is still the best for many things, followed closely by C/C++. Even if you could get Fortran speed with Java (you can't) you wouldn't have the libraries. Forget about that area.
Case 2: Writing an operating system. Java? Think not.
Case 3: Small and medium size programs to do basic tasks. Go with a scripting language.
Case 4: Teaching introductory comp sci courses. Java? Are you drunk? That's like skipping algebra and trigonometry and jumping straight into calculus. Good for the teacher, who is bored by the details of simple algebra, but torture for the students.
Java is good for some things, but frankly C# and Java will increasingly see their relevance decline.
And as for competing with Microsoft on the Windows platform, impossible! Adobe, get ready for a beatdown. You're going to wish you had started porting your apps to Linux a long time ago. - bpapa, on 10/12/2007, -2/+3@Bellone
Java is a much better teaching language, IMO. Since Java is "easier" than C++, when you are teaching an advanced Computer Science class like Operating Systems or Compilers it makes more sense to do the course work in Java, since the code and language kinda gets out of the way and you get to focus time on learning the science of how Operating Systems or Compilers work. The programmers in the course don't have to worry about getting bogged down in the details of C.
Especially when in college, from my personal experience a student winds up *wasting* a lot of time figuring out exactly how to leverage their development environment, the language, etc., instead of focusing on the problem domain. For example, when I took a course in graphics, where we used C++ and Open GL, I spent days and days figuring out just how to get Visual Studio to do what I needed it to do on my machine. I'm not so sure that a college student should necessarily have to do that on their own.
On the other hand though C and C++ are important to learn. If I was running a Comp Sci dept, I would probably use Java as the teaching language and then have a C/C++/Unix course that is recommended to those who wish to program professionally. - mikeurbandz, on 10/12/2007, -1/+2"And you call that an advantage? We professionals that work in the field like to get paid for our work"
Yes, I call it an advantage. I'm a professional too. And the open source tools and libraries have helped me out a lot.
"In April 2003 the search search "java or j2ee" vs "c# or .net" at www.it.jobserve.com showed that.NET job markeIt was only 33% of java market. Today, the result is 4021 for Java and 4221 for .NET."
That's not what I find when I search that site. I find 2361 for "java or j2ee" posted in the last 7 days. But only 1486 for ".net or c#". So I don't know where you got your numbers from, but I ran that search on the same site, and I show that Java leads by nearly 1,000 jobs.
Furthermore, Try these searches on dice.com:
c# or .net: 11185
java or j2ee: 18050
Java clearly has a substantial lead here.
So sorry, but Java is still way ahead of .net.
"SUN busted it when they sued Microsoft - their best customer."
Ah. Ok... Nevermind the fact that internal documents at Microsoft specifically said that they intentionally introduced incompatibilities in their JVM implementation in order to undermine Java. Kind of like how it recently came out that they were going to drop Office for Mac specifically to undermine the Mac platform. - pygmalion, on 10/12/2007, -0/+1Wait, who says Linux / OS X users want all those .NET applications anyway ? Sure, it's very useful for in-house development and other software you need to keep your business running. But these are typically ugly front ends to databases and I don't think the usability/ease of use is an issue here.
But commercial (and even shareware) end-user apps are rarely blindly ported this way. And there's a good reason for this. Users from different OSes expect different paradigms in the apps they use. There's also the UI differences. Mapping all your Windows UI widgets to OS X widgets won't make your app a real OS X citizen.
I don't get all those apocalyptic scenarios... A platform won't die because it doesn't support the major framework from a competitor; it will die if developers stop porting (and I mean true porting) applications to it. It didn't happen for Apple, I don't see why Linux/Gnome/KDE would be different. If Linux users have standards so low they will run anything coming from Windows as is, well then I'd question the reason to use Linux in the first place. - GMorgan, on 10/12/2007, -0/+1SWT doesn't have QT bindings since the CPL and GPLv2 are incompatible.
- ISVDamocles, on 10/12/2007, -0/+1@kaervas59:
Especially in a University, you ought to be learning how your computer is actually doing what it's doing, and if that means at least one class where you dig into memory management, so be it.
I personally can't believe there are universities that aren't even teaching C/C++. At mine we're taught a crapload of languages (C/C++, Java, VHDL, Intel *and* old-school Motorola 68K Assembly are the ones every Computer Engineer must learn).
My only regret is the classes don't get too deep into the C/C++ and Java standard libraries. We never had to write multithreaded applications and for networking applications they provided a library that simplified things a lot (which would be great if they hadn't made it Windows only [you can see code in their library for Unix support, but it wasn't maintained and they broke it somehow]). - cplusplus, on 10/12/2007, -1/+2We really need to stop the mono-gnome integration. Nothing central to Gnome should use Mono!
Java, maybe. But not Mono - Msft would love that. -
Show 51 - 83 of 83 discussions



What is Digg?
Check out the new & improved