Slashdot Mirror


Fast Native Eclipse with GTK+ Looks

Mark Wielaard writes "The gcj team created a natively compiled build of the Eclipse IDE. The resulting binary starts up faster then with any traditional JVM since there is no virtual machine to initialize or slow byte code interpreter or just in time compiler involved. This means that gcj got a lot better since the last Slashdot story in December about gcj and Eclipse. Red Hat provides RPMs for easy installation. Footnotes has screenshots by Havoc Pennington of the Eclipse IDE with GTK+ widgets."

300 comments

  1. Websphere Application Developer by Anonymous Coward · · Score: 1, Funny

    Hey! Does this mean that i can now use Websphere applcation developer without the 20 minute wait?

    1. Re:Websphere Application Developer by Anonymous Coward · · Score: 0

      This isn't funny. Mod the parent up as insightful. For anyone with a large project on WSAD, they might be waiting 20 min till WSAD is usable on startup. I'm tired of the rah rah around Eclipse, NetBeans has been opensource for much longer and it isn't as horrifyingly slow.

  2. I like eclipse by eyeye · · Score: 1

    It takes a while to load true... I have noticed it eats my cpu but I think thats to do with the EPIC perl plugin I use rather than eclipse itself.

    Been pretty happy with it though I found optiperl to be an amazing looking perl IDE (not free in any sense though!).

    --
    Bush and Blair ate my sig!
    1. Re:I like eclipse by Anonymous Coward · · Score: 0

      check out org.epic.perleditor_0.1.0\src\org\epic\perleditor\ editors\PerlSyntaxValidationThread.java

      When Eclipse creates the Action buttons for the Perl Editor, its starts a syntax validation thread. Unfortunately, this tread merely runs perl off the comandline every 2 seconds to check the syntax. The result is a noticible hickup on a slow computer. The EPIC perl plugin is a great start to a good perl IDE, but it is still early and has much work to be done.

  3. Startup sure, but how fast does it run? by iamacat · · Score: 3, Interesting

    From what I heard so far, gcj has problems with garbage collection and doesn't generate very good code. Did I miss any dramatic improvements recently? Also, how complete is the class library?

    1. Re:Startup sure, but how fast does it run? by millenium · · Score: 2, Flamebait

      GCJ uses the same backend as GCC (C/C++). Its code should therefore be as good or as bad as for that one.

      The class library is certainly complete enough to write nice, crisp, fast and beautiful native GUIs with SWT.

      The true question is: What can you do with GCJ?

      The answer is: everything you can't do with the JDK, because the JDK starts up too slowly, because Swing suffers from obesity, and because both memory and disk footprints of the JRE are a disaster.

    2. Re:Startup sure, but how fast does it run? by Call+Me+Black+Cloud · · Score: 5, Insightful

      From your comments it's apparent you're not a Java programmer then, because you merely repeat old complaints that are no longer valid. Ok, sure, the JRE takes up a bit of space but compared to the size of hard drives today the amount is trivial. Having the JRE on disk is like installing the MS or Borland libraries (or Linux counterparts) that some applications use - once it's there other applications don't have to include the code as part of the executable.

      Swing suffers from obesity - what does that mean?

      I've been developing Java applications for years (including a stint as project lead on a weather satellite imagery analysis program) and I know firsthand how much Java has improved. Spend some time writing applications in Java, using Swing (I use Netbeans for my IDE)...you'll see how sporty applications can be. Also check out Sun's Java Games community for some links to games that really exhibit excellent performance.

    3. Re:Startup sure, but how fast does it run? by millenium · · Score: 1, Flamebait

      "From your comments it's apparent you're not a Java programmer"

      Of course, I don't see myself as a "Java programmer" or a "carpenter" or a "brick layer". I wouldn't take any pride in that. I have a degree in computer science. The day you will get a college degree, or at least some formal qualification, you won't need to go around saying: I am a "Java programmer".

      Otherwise, your arguments don't hold water: "startup times are not important", "size is not important". Who are you that you can say what can be important in someone else situation?

      Because of the startup time issues you can't use Java programs in shell scripts. Now you're probably going to say that shell scripts are not important ...

      Because of the size and footprint issues, you can't do embedded with Java. Now you're probably going to say that embedded applications are not important ...

    4. Re:Startup sure, but how fast does it run? by Binary+Gibbon · · Score: 2, Insightful

      I think you miss the point; Java is not designed for the sort of speed and efficiency necessary for, say, startup scripts. So, in the context of Java's purpose, those features are not really important. Java is designed for portability and the ease-of-use (from a programmer's standpoint) that comes with the very large amount of memory management that the virtual machine takes care of. Does this result in a larger footprint, and slower operating times? Undoubtedly. But if those things are mission critical, do not program in Java.

    5. Re:Startup sure, but how fast does it run? by Anonymous Coward · · Score: 1, Insightful

      No, of course you can't "do embedded" with Java. That's why there's a multitude of phones out there, and some handheld devices that are already using it. Because you know, it can't be done.

      You're a fucking moron. That is all.

    6. Re:Startup sure, but how fast does it run? by millenium · · Score: 1, Flamebait

      Very good. You can use the JRE for things that don't need to start up fast, that can do with sluggish user interfaces, that cannot be used in fork(), and so on. Who's stopping you?

      In the meanwhile, we can do everything that you can do and everything that you can't as well.

    7. Re:Startup sure, but how fast does it run? by JohnwheeleR · · Score: 1

      In the meanwhile, we can do everything that you can do and everything that you can't as well.

      Like writing programs plagued with buffer overflows? Why anyone uses C/C++ to write anything besides system software is beyond me. Especially when safe languages like Java, .NET, and Python exist. Java is fine on the desktop. Its even better on the server. Its definetly here to stay, and gets faster all the time. Quit yer yowling and go here.

    8. Re:Startup sure, but how fast does it run? by red_gnom · · Score: 4, Informative

      Of course, I don't see myself as a "Java programmer" or a "carpenter" or a "brick layer". I wouldn't take any pride in that. I have a degree in computer science...

      ...Because of the size and footprint issues, you can't do embedded with Java.

      To further extend your knowledge in computer science, look into the Internet tool called "Google". Using it can save you from ridiculing yourself by publicly posting uneducated statements:

      Embedded Java

    9. Re:Startup sure, but how fast does it run? by iamacat · · Score: 1

      Ok, but this doesn't quite answer my question. Eclipse is a good example of application that itself takes up a lot of memory and disk space. The question is how well does it run under GCJ once it gets started? To be honest, JRE is not great for desktop applications, but I certainly wouldn't want GC UI lag to get any worse.

    10. Re:Startup sure, but how fast does it run? by csnydermvpsoft · · Score: 1

      Because of the size and footprint issues, you can't do embedded with Java.

      Complete and utter BS. I know for a fact that there are quite a few auto manufacturers currently working on Java in-car computing systems. I should know - I work with the team at IBM that is developing the technologies for them (and close to the team that originally wrote Eclipse).

      Also, have you heard of Java running on cellphones? It's been all over the news lately.

    11. Re:Startup sure, but how fast does it run? by iapetus · · Score: 4, Interesting
      I have a degree in computer science. The day you will get a college degree, or at least some formal qualification, you won't need to go around saying: I am a "Java programmer".

      What utter garbage. I'd describe myself primarily as a Java programmer, and I've got a college degree, a masters degree and a bucketful of professional qualifications.

      Who are you that you can say what can be important in someone else situation?

      I don't know. Who are you that you can say the same? There are plenty of cases where Java can be used in shell scripts, or where the same functionality can be achieved using a tool such as Ant (which is very widely used these days). Startup time isn't always the be all and end all of what people need from their programs. If it is, then obviously there are better tools than Java. I'd have hoped that at some point they'd have taught you in your college degree that there are plenty of tools out there and that there's such a thing as picking the right tool for a given job. That tool may be Java, it may be perl, it may be lovingly hand-crafted assembly code.

      The fact that you seem to ignore that means that you also ignore the things that you can do with the JDK that you can't do with gcj, and ignore the requirements people may have that your preferred way of working doesn't address. And also, it seems, the fact that some people don't agree with your blanket generalisations.

      --
      ++ Say to Elrond "Hello.".
      Elrond says "No.". Elrond gives you some lunch.
    12. Re:Startup sure, but how fast does it run? by krumms · · Score: 2, Interesting

      Gee whiz, you're a raving spastic.

      I have a degree in computer science. The day you will get a college degree, or at least some formal qualification, you won't need to go around saying: I am a "Java programmer".

      Right, and the day you get around to pulling your head out of your own ass - or at least do something to stop you talking so much shit all the time - you won't need to go around pompously saying, "I have a degree in computer science."

      Who are you that you can say what can be important in someone else situation?

      Has it ever occurred to you that not everybody needs the speed? Anyway, it's you yourself who is trying to say what's important for everyone else.

      Because of the startup time issues you can't use Java programs in shell scripts.

      Think Bash, think Perl, think Python, think Ruby. You'd use any of the former before you'd think about using Java OR C++. At least, being a CS grad, I hope you would - unless you had good reason to do otherwise.

      And just to be picky, it's only the larger Java applications that will noticibly kill your startup times (Tomcat springs to mind).

      Because of the size and footprint issues, you can't do embedded with Java. Now you're probably going to say that embedded applications are not important ...

      GOOGLE FFS

    13. Re:Startup sure, but how fast does it run? by be-fan · · Score: 1

      There are lots of things you can't do with Java. Little CLI apps like 'ls', 'cd', etc, would be painful to use if they were written in Java, because of the startup costs of the VM. It takes GCC 0.004 seconds (ie: within measurement error) to startup and give me the usage message. It takes javac 0.330 seconds to do the same.

      --
      A deep unwavering belief is a sure sign you're missing something...
    14. Re:Startup sure, but how fast does it run? by be-fan · · Score: 2, Insightful

      Interestingly, Python is a much higher level (as a language, not necessarily libraries) language than Java, yet the Python VM takes no time at all to start up.

      --
      A deep unwavering belief is a sure sign you're missing something...
    15. Re:Startup sure, but how fast does it run? by minkwe · · Score: 1

      Why peole who have never done a sizeable efficient application in Java/Python like complaining about C/C++ and comparing it to Java/Python is beyond me. You cannot have a toolbox with only one tool. Every tool has its purpose. Suggesting that C/C++ is only appropriate for system software is naive. What language is Java/Python etc written in, C/C++ undoubtably.

      --
      "Fighting terrorists with millitary might is like killing a mosquitor on your Dad's forehead with a rifle."
    16. Re:Startup sure, but how fast does it run? by Anonymous Coward · · Score: 0

      cuz it aint a vm, just an interpreter.

    17. Re:Startup sure, but how fast does it run? by Anonymous Coward · · Score: 1, Insightful

      Meaningless nitpick: cd is internalized within the shell. It is impossible to write a "cd" program external from the shell with the Unix model of per-process working directories.

      This gets me thinking: what about a shell written in Java? In such a case, if a Java app is run, the JVM is already loaded.

    18. Re:Startup sure, but how fast does it run? by CustomDesigned · · Score: 1

      Give the guy a break. What he means is, "you can't do embedded with Java II enterprise edition". He just doesn't consider those realtime and subset specifications to be real "java". Computer science types like a consistent vocabulary. The language and bytecode might be the same, but the libraries and environment are very different between the Micro and Enterprise editions. So how can they both be "java"?

    19. Re:Startup sure, but how fast does it run? by lokedhs · · Score: 1, Informative
      I believe such a shell has already been written. And yes, loading a Java class and execute code in it is a lot faster than starting up an external application.

      You can't expect the average slashdot reader to understand these things too. It's much "cooler" to complain about Java speed and it is to actually learn somehting.

      These kinds of discussions always occur whenever Java or IPv6 is the topic. I remember back when I was young we actually embraced new stuff, especially new stuff that is cool, and useful, and... well I've talked for too long.

    20. Re:Startup sure, but how fast does it run? by Hard_Code · · Score: 1

      "What language is Java/Python etc written in, C/C++ undoubtably."

      Well, Sun's Java tools, for one, are written all in java (javac, jar, etc.).

      --

      It's 10 PM. Do you know if you're un-American?
    21. Re:Startup sure, but how fast does it run? by Hard_Code · · Score: 1

      Uh, the parent post was specifically askinb about the performance and library and code generation quality of GCJ , not Java in general, so untie your panties there.

      --

      It's 10 PM. Do you know if you're un-American?
    22. Re:Startup sure, but how fast does it run? by evilpenguin · · Score: 0, Troll
      Of course, I don't see myself as a "Java programmer" or a "carpenter" or a "brick layer". I wouldn't take any pride in that. I have a degree in computer science. The day you will get a college degree, or at least some formal qualification, you won't need to go around saying: I am a "Java programmer".


      "Thank you, Dr. Science. Send your science questions to 'Ask Dr. Science.' Remember, he's not a real Doctor!"

      " I have a Master's Degree."

      "In SCIENCE!"

      With all due apologies to the Duck's Breath Mystery Theater.
    23. Re:Startup sure, but how fast does it run? by dubious9 · · Score: 1

      How is it higher than Java? What further levels of abstraction does Python offer that Java doesn't? Objection oriented languages are most often put at the same levels.

      Furthermore, Python is more syntactically similar to Java than any other language (maybe perl). And the reason python takes less time is because it is an interpreter and not a virtual machive, unless you are using Jython, which is python inside the java vm. I do not think higher level means what you think it means. I suspect you are trying to make another point, or you don't know what you are talking about.

      --
      Why, o why must the sky fall when I've learned to fly?
    24. Re:Startup sure, but how fast does it run? by dubious9 · · Score: 1

      gcc and Visual Studio are very different with the libraries and enviroment, yet the same language. I guess you can't call them both C/C++.

      --
      Why, o why must the sky fall when I've learned to fly?
    25. Re:Startup sure, but how fast does it run? by be-fan · · Score: 2, Informative

      Python is totally dynamic. Python functions can be completely generic. For example:

      class bar(object):
      def foo(self, obj):
      obj.register(self)

      bar::foo() is completely generic. It can register itself with any object, as long as that object supports the register() method. In Java, you'd have to define an interface and have all possible objects you're interested in registering with implement that interface.

      Object oriented languages have similar capabilities, but they do *not* all offer the same abstraction capabilities. Java is a lowest-common-denomenator OO language. Its got classes, single inheritence, single-parameter polymorphism, and that's about it. It certainly doesn't have the abstractive capabilities of C++ (with templates) much less something even higher level like Python.

      --
      A deep unwavering belief is a sure sign you're missing something...
    26. Re:Startup sure, but how fast does it run? by __Reason__ · · Score: 2, Informative

      It runs very nicely! The native-compiled eclipse is noticably more snappy and responsive than it is on the JRE 1.4.2 on my (XP 1800) machine. It also seems quite stable - I stress-tested it for about half an hour last night and couldn't produce any bugs or crashes.

    27. Re:Startup sure, but how fast does it run? by gidds · · Score: 2, Insightful
      In Java, you'd have to define an interface...

      Not necessarily; reflection could do this with any old Object. Admittedly, the interface solution is normally neater, but it's also a better solution for maintenance purposes - too much dynamism makes code easier to write, but can make it much harder to maintain and introduce subtle bugs unless you're very disciplined (and, more importantly, so are every one of your predecessors and colleagues...)

      --

      Ceterum censeo subscriptionem esse delendam.

    28. Re:Startup sure, but how fast does it run? by dubious9 · · Score: 1

      "In Java, you'd have to define an interface and have all possible objects you're interested in registering with implement that interface."

      Isn't this a good thing? Don't you want to think about everything that wants to use register()? What about the posibility of name-space clashing, i.e. that register() registers itself with an object that supports the register() but in a totally unexpected way, and was never intended to be used in this way?

      I wouldn't say it's another level of abstraction, but rather a shortcut. One that is prone to unexpected behavoir. Java tends to not trust the programmer and forces the programmer to code in a standard fashion. This is why there isn't multiple inheritence and multiple parameter polymorphism. The java people consciously made this descision because they thought it would result in code that is cleaner, more readable, less prone to bugs. See here. Also java is getting templating, type-safe enums, and auto-boxing and a host of other features in version 1.5 "tiger" due out later this year.

      If 2 languages have classes, inheritance, data-hiding, and polymorphism, I would say that they are at the same highness. Am I missing other features of python? I am not a python guru.

      --
      Why, o why must the sky fall when I've learned to fly?
    29. Re:Startup sure, but how fast does it run? by Anonymous Coward · · Score: 0

      It certainly does seem to be beyond you, as well as quite a few others as well. If you are using C++ then you can use explicitly use range checked buffers if you want. If you are really worried about memory management problems, then you can use the Boehm collector. If you are worried about safety, then it is there if you choose to use it.

    30. Re:Startup sure, but how fast does it run? by Anonymous Coward · · Score: 0

      I don't know about Visual Studio, but you can't call gcc C/C++. Gcc is the Gnu compiler collection, it has a C compiler, a C++ compiler, and implementations of the standard libraries for both languages.

    31. Re:Startup sure, but how fast does it run? by millenium · · Score: 1

      The counter-argument against "the JRE suffers from slow startup times" happens to be again and again "startup times are not important".

      Why would startup times not be important? To me it is important. Full stop.

      By the way, what is it then, that you can do with the JDK that you can't do with gcj?

    32. Re:Startup sure, but how fast does it run? by be-fan · · Score: 1

      Isn't this a good thing? Don't you want to think about everything that wants to use register()?
      >>>>>>
      Okay, thought about it. Decided that all the objects that could get passed to that function support an appropriate register() method. In Python, I'm done. The solution works. In Java, in addition to thinking about it, I have to now go and modify all those classes to add an interface to it. Now the there is talk about adding optional type declarations to Python, to both allow better code generation and better type checking. In a language like Dylan (Lisp less so because the type declaration syntax is a bit kludged on) you can use dynamic typing for rapid prototyping, and tighten up the type declarations when you've got a stable interface. Coming from a C++ background, I was skeptical about dynamic typing at first, but in my experience using Python, I've found that the type checking usually doesn't buy you much. A bigger problem in Python than dynamic typing tends to be Python's tendency to auto-vivify class members. So a typo can result in a new member being attached to an object.

      Java tends to not trust the programmer and forces the programmer to code in a standard fashion.
      >>>>>>>>
      I'm well aware of Java's tendency to babysit the programmer. This is a good thing?

      If 2 languages have classes, inheritance, data-hiding, and polymorphism, I would say that they are at the same highness. Am I missing other features of python? I am not a python guru.
      >>>>>>>>>>
      Actually, Python doesn't have data hiding. In OOP you're not suppoed to ever access data members directly, so the odds of accidentally modifying a data member are rather minimal. Java sometimes crosses the line between assuming fallible programmers and assuming actively hostile programmers! Anyway, Python has a lot of features beyond Java: list comprehensions, lambdas, first-order-functions, dynamic compilation, a transparent iterator protocol, genericity, etc. If you look at languages like Dylan (which is more OOP than Java ---- even integers and doubles are full fledged objects!) you find additional features like multimethods, macros, and additional features to improve performance, like limited types, auto-boxing, type inference, etc.

      --
      A deep unwavering belief is a sure sign you're missing something...
    33. Re:Startup sure, but how fast does it run? by millenium · · Score: 1

      "Has it ever occurred to you that not everybody needs the speed?"

      You don't need speed and that's ok.That's no reason for me to refer to your ass and shit.

      Fortunately, for anybody who does need speed, there is still gcj.

      In the meanwhile, let me wish you good luck with your ass and your shit!

    34. Re:Startup sure, but how fast does it run? by DavidNWelton · · Score: 1

      "cool, useful", and crammed down my throat by a huge corporation. That doesn't mean it isn't good, for some things, but I can't bloody stand how pervasive the thing has become because of the corporate weight behind it, rather than technical merit.

    35. Re:Startup sure, but how fast does it run? by Anonymous Coward · · Score: 0

      I don't see any large corporations cramming IPv6 down your throat... And as for Java, Sun may push it, but no one says you have to use that either. That's the joy of consumer choice.

      Personally? I do not like Java. But different strokes and all that. I'd also code in it if I had to.

      IPv6 is definitely a good thing, though. In many ways it's hard to argue against it because it's easy to write applications and systems that support both. However, a lot of routers and protocols would have to be rewritten to fully deploy it.

    36. Re:Startup sure, but how fast does it run? by mark_lybarger · · Score: 1

      please, quit this whine. for people who do need speed, they already have a full toolbox to use to address that issue (C/C++/assembly/Fortran, etc). Java also suits those who need to develop a wide array of applications. Running their appplications on a 386SX machine wihth 8MB of memory doesn't happen to be one of them.

    37. Re:Startup sure, but how fast does it run? by nathanh · · Score: 2, Interesting
      I wouldn't take any pride in that. I have a degree in computer science.

      So do perhaps 90% of the people reading Slashdot. IMO it's not much to be proud of.

      The day you will get a college degree, or at least some formal qualification, you won't need to go around saying: I am a "Java programmer".

      You're a pompous ass. He probably has better qualifications than you do.

    38. Re:Startup sure, but how fast does it run? by mabinogi · · Score: 1

      >Why would startup times not be important? To me it is important. Full stop.

      If I'm going to use an application for a few hours...or have a service running on a server indefinitely, and my only complaint about the application, or the serivce, is the startup time, then it's a pretty damned good application.

      --
      Advanced users are users too!
    39. Re:Startup sure, but how fast does it run? by Anonymous Coward · · Score: 0

      GCC does not implement the C standard library. It relies on the C library that is already installed. On pure GNU systems, this is glibc. On non-GNU systems, this is whatever libc the system shipped with.

      Unlike C++, the C library is tied heavily to a specific platform. While C++ libraries deal with relatively high level templates, a libc must know which functions are implemented by the kernel, etc... C++ libraries are also more closely tied to the compiler, since ABIs and functionality is seldom compatible across compilers. So, the C ABI being simple, a recently compiled C program can call code from 10 years ago, but that isn't the case with C++.

    40. Re:Startup sure, but how fast does it run? by uglyduckling2001 · · Score: 1

      the analogy being servlet to cgi. the shell will invoke the commands as a thread instead of as a process. the shell could be remote for all u know, meaning the shell could be a servlet and the command line can talk directly to the servlet.

    41. Re:Startup sure, but how fast does it run? by Anonymous Coward · · Score: 0

      Interesting moderation. I don't think this was a troll. Ask Dr. Science is a semi-popular comedy series on public radio that spoofs the arrogance of the person who is educated far beyond his intelligence. The post might have been mildy offensive to the person who posted the parent, but since that person was an ill-infiormed arrogant jerk (of which the world is not in short supply), I think the above not a trool nor offtopic. Unfunny, maybe, but not offtopic or a troll.

    42. Re:Startup sure, but how fast does it run? by Jellybob · · Score: 1

      I saw just the other day a link to an entire OS written in Java, with the commands implemented as classes. JNode

    43. Re:Startup sure, but how fast does it run? by Simon+Brooke · · Score: 3, Insightful
      There are lots of things you can't do with Java. Little CLI apps like 'ls', 'cd', etc, would be painful to use if they were written in Java, because of the startup costs of the VM. It takes GCC 0.004 seconds (ie: within measurement error) to startup and give me the usage message. It takes javac 0.330 seconds to do the same.

      two responses to that.

      1. People have no problem with little perl scripts run from the command line, but perl has exactly the same startup overheads as Java.
      2. Running commands under bash is running them in, effectively, a C language environment. The basic C language shared libraries are already loaded. If you had a Java shell already running in its own JVM it could invoke instances of Java classes at the same order of cost as a conventional shell starting an ELF executable.

      I write 95% of my work in Java. It's just as performant as anything else doing the same job. Most of my stuff (web applications) typically service small requests - very much like ls, albeit in a different environment. But the trick is, you don't start a new JVM for each invocation; you have a JVM running all the time and service the requests you receive within it. In this sense, the webapp is analogous ot a shell.

      I'm not saying Java doesn't have problems - it does have a significant problem which is Sun's attitude to 'intellectual property' and their continued restrictive licensing. But speed and efficiency are no longer problems Java has.

      --
      I'm old enough to remember when discussions on Slashdot were well informed.
    44. Re:Startup sure, but how fast does it run? by Simon+Brooke · · Score: 1
      I have a degree in computer science. The day you will get a college degree, or at least some formal qualification, you won't need to go around saying: I am a "Java programmer".

      I don't just have a college degree. I'm a former university research fellow in computer science. I'm also a Java programmer. I'm not in the least ashamed to tell people so.

      Because of the size and footprint issues, you can't do embedded with Java.

      Oh dear, I think you'd better tell Nokia that. And IBM. I don't think they know. I'm sure they'd be grateful.

      --
      I'm old enough to remember when discussions on Slashdot were well informed.
    45. Re:Startup sure, but how fast does it run? by millenium · · Score: 1

      "I'm not in the least ashamed to tell people so."

      I replied to "You are not a java programmer" in the parent. My answer is: true.

      I am not ashamed to program Java. As a matter of fact I like it very much. I just don't believe that programming in a particular language is a profession.

      "I think you'd better tell Nokia that. And IBM."

      You could ask them what JRE they are using. I doubt the 60 Mb footprint of 1.4.2 will run on a cell phone. Then we get to basic point again: "What is Java?", besides being a Sun Microsystem trademark to cover multiple unrelated things.

      In my opinion Java is at least a brilliant grammar. If you strip the bloat, the class libraries are also nicely done.

    46. Re:Startup sure, but how fast does it run? by millenium · · Score: 1

      We've again landed at the point where people abuse Moore's Law to justify lousy engineering.

      "please, quit this wine"

      As far as I'm concerned you wine as much as you want.

    47. Re:Startup sure, but how fast does it run? by millenium · · Score: 1

      So the vm running on a Nokia is the same one as the one running on a PC? Before arguing about Java, we could at least clearly define what we are talking about.

      "ridiculing yourself by publicly posting uneducated statements"

      I think I've already insisted on education and the importance for you to get one.

    48. Re:Startup sure, but how fast does it run? by Anonymous Coward · · Score: 0

      Not the same poster, but...

      > So the vm running on a Nokia is the same one as the one running on a PC?

      Do you get the same "Linux runtime" on iPaq Linux as on RedHat? LOAF vs EMbedded Debian? By that I mean libc, kernel, and baggage. It's all still Linux.

      What is FAR FAR more important than "write once compile everywhere" (for C) or "run everywhere" (Java) is proper documentation. Java easily provides that (and I'd say, more so than MS).

      Having embedded experience yourself, you'd know that... right? :-)

      >Before arguing about Java, we could at least clearly define what we are talking about.

      Well, now you're talking about embedded Java, but even still you should stick to topics you have knowledge in (presumably VB :-).

      It's not clever to point out the obvious. Even a novice knows the JVM on embedded is different than on a PC. Um, Swing? Uh-Derrr....

    49. Re:Startup sure, but how fast does it run? by Anonymous Coward · · Score: 0

      Why anyone uses C/C++ to write anything besides system software is beyond me. Especially when safe languages like Java, .NET, and Python exist. Java is fine on the desktop.

      Dude, that is seriously fucked up. I'm imagining a world where all our apps are written in Java, .NET, and Python. That is scary.

    50. Re:Startup sure, but how fast does it run? by Tukla · · Score: 1
      Who are you that you can say what can be important in someone else situation?

      Hypocrite. I quote from you, "[B]ecause the JDK starts up too slowly, because Swing suffers from obesity, and because both memory and disk footprints of the JRE are a disaster." You're not only stating your opinion as if it were fact, but you're also making a global judgement that what you perceive as faults make the JDK, JRE, and Swing useless to anyone.

    51. Re:Startup sure, but how fast does it run? by millenium · · Score: 1

      "what you perceive as faults make the JDK, JRE, and Swing useless to anyone"

      Only in the circumstances that it matters to someone. I've never said that it matters or should matter to you.

      By the way, the statement you've quoted can be verified objectively on its vericity. There is not one single reply in the thread that says that the statement would be untrue. It is objectively true.

      If with "hypocrite" you mean that I didn't say frankly what I think about you, maybe you're right.

    52. Re:Startup sure, but how fast does it run? by millenium · · Score: 0, Troll

      "But the trick is, you don't start a new JVM for each invocation"

      You've admitted by yourself that Java architectures are characterized by the concern to workaround its deficiencies. Workaround upon workaround you stubbornly ignore the facts and you even get upset when someone raises the issue openly.

      It's a bit like Sun Microsystems. They've been hearing for 5 years that they should do something about Swing; but they won't do anything about it. Worse, they would sue anybody who does.

    53. Re:Startup sure, but how fast does it run? by LWATCDR · · Score: 1

      "Of course, I don't see myself as a "Java programmer" or a "carpenter" or a "brick layer". I wouldn't take any pride in that. I have a degree in computer science. The day you will get a college degree, or at least some formal qualification, you won't need to go around saying: I am a "Java programmer"."

      You sir are a fool if you would not take pride in saying that you are a java programner, carpenter, or brick layer. Any job you do will is worth taking pride in. And I am a java programmer and a C++ programer, and a Perl Programmer. The programs I have written are helping to put food on the table for a few thousand people and helping few million hearing impaied people stay in touch with what is going on. Yes I am proud of that.

      "Because of the startup time issues you can't use Java programs in shell scripts. "
      I use java in shell scripts. So you are wrong.

      "Because of the size and footprint issues, you can't do embedded with Java. "
      Yes you can use java in embedded systems. There are even java specific MPUs out there. Embedded is a HUGE world. It can mean anything from little 4-bit and 8bit cpus that you HAVE to program in asm to huge systems that have gigs of HD space.

      Now as to startup time not being important. In many instances it is not. Lots of java programs startup and run for weeks at a time. The Java program that we us in house to track our incoming support calls just runs and runs. It works very well for us and the startup time is not an issue.
      The disk foot print for java is no worse then for .net. I just downloaded the .net runtime and frame work and it was over 20 megabytes.

      The solution for the startup time could be solved with a kernel mod in Linux. Have the JVM startup at runtime and include it in the kernel. I know some would consider it usless kruft so make it a loadable module. Sun will not do that right now because it is still hoping Linux will go away. With the good work they have done with open office I hope they will wise up. Now IBM has a good JVM and it could be folded into the kernel at sometime.

      Now Mr. I have a degree in CS... I would bet that you have yet to have a real job in CS. Unless you become a teacher and heaven help us all if you do you will become some type of programmer.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    54. Re:Startup sure, but how fast does it run? by millenium · · Score: 1

      " Any job you do will is worth taking pride in."

      I don't consider "Java programmer" to be a profession. And true, you can defend "carpenter" or "brick layer".

      "I use java in shell scripts. So you are wrong."

      You mean: "so it works for me".
      I'm sorry, but for me, it's not good enough. We simply have different quality standards.

      "Yes you can use java in embedded systems."

      Are you talking about the J2SE stuff that you can ordinarily run on Windows & Linux? Can you do embedded stuff with that? Ok. Let's first define what we mean by "java", without extending the definition to cover everything under the sun :-)

      "Now as to startup time not being important. In many instances it is not."

      And what do you do in instances that it is? Learn to live with it?

      "The disk foot print for java is no worse then for .net."

      By comparing dog turds with hogwash, you will always be able to make a point somehow.

      "The solution for the startup time could be solved with a kernel mod in Linux."

      Forget it. Never. Linus won't go for this. And if he did, we'd fork the kernel. You just solve your own problems, will you? Why would he have to fix up for someone else's lousy engineering?

      "you have yet to have a real job in CS"

      I don't know how much you are making, but chances are that my contract's net worth is a multiple of yours.

    55. Re:Startup sure, but how fast does it run? by Simon+Brooke · · Score: 1
      You could ask them what JRE they are using. I doubt the 60 Mb footprint of 1.4.2 will run on a cell phone. Then we get to basic point again: "What is Java?", besides being a Sun Microsystem trademark to cover multiple unrelated things.

      OK, Java is a language. It's slightly confused with the JVM, which, of course, supports multiple languages. 'Java 2 Standard Edition' is the Java language bundled with a collection of standard libraries. But Java is not the same as J2SE. Java is just a language. J2ME and J2EE are the same language bundled with different sets of standard libraries.

      In my opinion Java is at least a brilliant grammar. If you strip the bloat, the class libraries are also nicely done.

      <rant>You've obviously had nothing to do with java.util.Date, then. Or java.util.GregorianCalendar. Or the fact that java.sql.SQLException can't distinguish between a bad connection, an authentication failure, and a fscking syntax error. Or...</rant>

      However, for the most part, it sort of works...

      --
      I'm old enough to remember when discussions on Slashdot were well informed.
    56. Re:Startup sure, but how fast does it run? by millenium · · Score: 1

      " No, of course you can't "do embedded" with Java."

      That depends on what you call "Java". Are you sure the 60 Mb footprint of the stuff you download at Sun will run on a phone?

      "You're a fucking moron."

      You'd better do some more of the fucking by yourself, otherwise I'll get a piece of her :-)

      " That is all."

    57. Re:Startup sure, but how fast does it run? by CoughDropAddict · · Score: 1
      How is it higher than Java? What further levels of abstraction does Python offer that Java doesn't?

      Python is a far more dynamic environment than Java. In Python, classes, methods, objects, and functions are just data that can be modified at will.

      You can, at runtime, do any of the following in Python (I started typing code to illustrate these, but it's too much of a pain to format):
      • Add a method to an already existing class. All existing and not-yet-created instances of that class will have the new method available to them.
      • Swap out one implementation of a method for another. All existing and not-yet-created instances of that class will show the new behavior.
      • Change the class of an existing instance. It will retain all of the instance data, but take on all the new methods and class data in place of the old class.
      • Modify the behavior of basic syntactic constructs in the language like "object.attribute". This will call object.__getattr__("attribute"), a method you can define to do anythin you want.
      The fact that so much of the language is accessible and modifiable from within the language is a very strong reason to call it higher-level.

      Furthermore, Python is more syntactically similar to Java than any other language (maybe perl).

      Python syntactically similar to Java? Python syntactically similar to Perl?? What are you on?
    58. Re:Startup sure, but how fast does it run? by CoughDropAddict · · Score: 1

      Oh, one other thing.

      Objection oriented languages are most often put at the same levels.

      That makes no sense. If you really think C++ and Python are on the same level because they both have classes and inheritance, you need to think about this more (and use the languages in question).

    59. Re:Startup sure, but how fast does it run? by LWATCDR · · Score: 1

      You are such an twit.

      You mean: "so it works for me".
      I'm sorry, but for me, it's not good enough. We simply have different quality standards.

      No you said you can not use it in script it works in a production eviroment you are wrong.

      If startup time is important for your app do not use Java. It is not the right tool for that job. There is no one right programing enviroment.

      "The solution for the startup time could be solved with a kernel mod in Linux."

      "Forget it. Never. Linus won't go for this. And if he did, we'd fork the kernel. You just solve your own problems, will you? Why would he have to fix up for someone else's lousy engineerining"

      We pale face? I guess you and Linus are tight. Linus would not have to ok a kernal mod. You can include binary only loadable moduals in the kernel if you want. That is what nVidia did with their driver. No fork, no sweat for Linus.
      You sir are a fool and not all that amusing of one at that.

      --
      See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
    60. Re:Startup sure, but how fast does it run? by millenium · · Score: 1

      "If startup time is important for your app do not use Java. It is not the right tool for that job. There is no one right programing enviroment."

      But I do use Java! With GCJ there are no problems with startup times!

      "You can include binary only loadable moduals in the kernel if you want."

      Then go ahead and do it. We don't need to, because we use GCJ.

      "You sir are a fool and not all that amusing of one at that."

      I am a fool who doesn't suffer from startup times :-)

      By the way, I certainly think you are amusing. For sure you make me laugh. I don't know if you are a fool, or a twit, but to tell you the truth, there's already enough to laugh at.

  4. increases the credibility of GCJ by millenium · · Score: 4, Insightful

    GCJ aka "native Java" now really seems to be ready for its day under the spotlights.

  5. Re:You sir are a troll.... by botzi · · Score: 1

    Is Run->Debug too complicated????
    Are Step into, Step over and Step return dificult to find?????
    Or is it so different from the way VS 6.0 managed things?????
    Whatever. Nice troll.

    --
    1. No sig. 2. ???? 3. Profit!!!
  6. load times by khuber · · Score: 3, Interesting
    I still don't understand why load times are such a big deal. Do people sit there and start and exit applications continuously?

    I leave stuff like mozilla, eclipse, and xemacs running for weeks on end.

    1. Re:load times by aled · · Score: 3, Funny

      Yes! I love so much all those modal splash windows, in fact I'm recompiling all my apps to exit inmediately after showing them...

      --

      "I think this line is mostly filler"
    2. Re:load times by burnetd · · Score: 1

      Some people believe in saving energy and actually switch electical devices off when not in use.

    3. Re:load times by csnydermvpsoft · · Score: 1

      Some people compromise, and put their electrical devices to sleep instead of turning them off.

    4. Re:load times by Anonymous Coward · · Score: 0

      Not everyone has loads of ram to keep the things running all the time. Plus, mozilla leaks.

    5. Re:load times by Anonymous Coward · · Score: 0

      They have this new thing called virtual memory in Linux now.

    6. Re:load times by Anonymous Coward · · Score: 0

      Brilliant! How do I tell it to totally swap eclipse out to disk when I want it to and free up more Real Memory for things I want to work with. Oh I can't? I suppose the workaround is to shut the program off... This works fairly well, especially if the program leaks memory.

    7. Re:load times by awfwal · · Score: 1

      Like Windows?

    8. Re:load times by iabervon · · Score: 2, Informative

      It's not such a big deal for Eclipse, but it matter a whole lot for command-line programs like jar and javadoc, where the amount of time spend running the program is less than the amount of time spend starting the program; this makes correspondingly more of a difference to programs using the traditional UNIX philosophy.

      Of course, java tends toward handling this differently, where java programs invoke each other inside the same runtime, but it makes mixing java and non-java tools annoying.

    9. Re:load times by khuber · · Score: 4, Informative
      Java was never designed to start up quickly, though they did a lot of work on startup in 1.4.x. Startup time is slow due primarily to what is executed, not the JVM speed.

      I wrote a simple JVMPI method tracer. It's mind-blowing what all happens before your code is actually run. Here's a method trace I just ran with 1.4.2 for a simple program.

      -Kevin

    10. Re:load times by Anonymous Coward · · Score: 0

      Fucking Americans.

    11. Re:load times by c0ol · · Score: 1

      uhh it automagicly swaps it when more ram is needed.

    12. Re:load times by iabervon · · Score: 1

      I'm not surprised about the trace; a lot of the Java runtime is actually in Java, and gets run where you can trace it. This lets the runtime use a lot of its own services.

      But you mean that the JRE wasn't designed to start up quickly; the language and standard library don't have much to say on the subject. In fact, gcj implements almost all of the specification (except, last I checked, that the code compiled to native doesn't have a Classloader and resource access) without startup overhead. This is, of course, beneficial for some programs but not the main focus of sun's java development.

    13. Re:load times by 73939133 · · Score: 1

      Java was never designed to start up quickly, though they did a lot of work on startup in 1.4.x. Startup time is slow due primarily to what is executed, not the JVM speed.

      Java startup is slow for two reasons. First, Java spends a lot of time looking for classes (try "java -verbose something"). Second, it takes a while for the JIT to kick in and compile classes.

      Both of those are design problems with the Java system itself. With a better designed library format, the load overhead would largely disappear. And with a JIT that cached results of previous compilations, we wouldn't have to pay the JIT overhead.

      Dynamic loading and JIT are good. But Sun's implementation of them just sucks, and in comparison, gcj is better.

    14. Re:load times by Anonymous Coward · · Score: 0

      say eclipse is running in the background eating 40 something megs and something like sweep starts up and swaps 10 meg of it out to disk. sweep's recording something and needs more ram fast. eclipse doesn't page out to disk fast enough and the recording gets munged.

  7. Re:Looks great! by Timesprout · · Score: 1, Interesting

    After using IntelliJ for a couple of years I hate having to go back to VS for C#. I'm hoping dearly that IDEA produce a C# IDE. I've never been a huge fan of Eclipse for various reasons, its Visual Age heritage, performance, general look and feel, nothing overwhelming, I just prefer IntelliJ.

    --
    Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
    What truth?
    There is no dupe
  8. Modified GCJ Required (for now) by SilentMajority · · Score: 3, Interesting

    I found this info at http://gcc.gnu.org/java/

    "A team of hackers from Red Hat has released RPMS for a version of Eclipse, a free software IDE written in Java, that has been compiled with a modified gcj. You can find more information here. We'll be integrating the required gcj patches into cvs in the near future."

    ps

    Slashdot preview is buggy today...can't do HTML format preview and links one or more spaces get embedded in URLs (like the one below).

    ---
    My most underrated Slashdot post is http://slashdot.org/comments.pl?sid=68610&cid=6276 748

    What is yours?

  9. Another FOSS IDE. by Black+Parrot · · Score: 4, Interesting


    There is another FOSS IDE called gps. They call the unsupported version the "academic edition", but you can download the source, and a peak at a few files shows that it's GPL'd. (Their economic model is to give it away for free and sell support for those who need it.)

    It's a cross-platform IDE, with binaries available for Linux, Solaris, and various versions of Windows, and in principle you should be able to build it on any *n*x system where you can get GTK2 to run.

    The bad news is that language support is still limited. It has full support for Ada and partial support for C and C++, which are lower priorities for the authors. It comes with instructions for setting up support for your language, but that looks like a non-trivial task.

    I've just started playing with it so I can't give a good review, but so far it has been very helpful. The features listed at their Web site are:

    • Language-sensitive editor
    • Automatic generation of body files
    • Source code reformatting
    • Intelligent source code navigation
    • Context-sensitive search and replace
    • Application builder
    • Automatic code fixing
    • Version control (CVS, ClearCase, etc.)
    • Visual file comparison
    • Graphical source-level debugger
    • Project and program entities explorer
    • Project wizard
    • Types and program entities graphs
    • Call graphs
    • File dependency graphs
    • Project dependency graphs
    You can use the built-in editor or make it pop up your favorite editor. If you use the gnuclient Emacs interface you get the same kind of language-sensitive pop-up menus you get with the built-in editor.

    Screenshots are available at the link above.

    --
    Sheesh, evil *and* a jerk. -- Jade
  10. Hmm, slow by Anonymous Coward · · Score: 1, Interesting

    This seems to be quite slow, as is my experience with most gcj-compiled applications. It produces native code but they haven't quite gotten it to the level of optimisation the sun JVM can do when it compiles sections into native code - but it will get there, I'm sure. I still like gcj because of its licencing. Has anybody tried compiling it with array bounds checking turned off? If it doesn't depend on it, that should give a really nice speed improvement. And if it doesn't itt'l crash ;)

  11. Re:Looks great! by Anonymous Coward · · Score: 0

    repeat after me, vcc++ is only for win doze pee cees, it's useless for anyone else

  12. Re:You sir are a troll.... by geeveees · · Score: 0, Flamebait

    I tried those I remember somehow it didn't do anything :) Do not confuse my stupidity with trolling!

    --
    I am a viral sig. Please help me spread.
  13. Re:You sir are a troll.... by csnydermvpsoft · · Score: 1

    Did you set a breakpoint?

  14. Plugins? by connsmythe96 · · Score: 4, Interesting

    The eclipse IDE is supposed to be extremely pluggable. How does natively compiling it affect that? Do you have to compile the plugins with the IDE? Or can you still just drop the .class files somewhere?

    --
    if(!cool) exit(-1);
    1. Re:Plugins? by Anonymous Coward · · Score: 4, Informative

      I believe run-time loading works. GCJ also includes a bytecode interpreter, so it will use that (it'll be slower than a normal JVM, but if you know you'll be loading it, you can compile the plugin natively, I think).

      That was the case last time I looked at GCJ about a year ago. I ended up being unable to use it because of lack of windowing toolkit support. Anyone know the status on all that?

    2. Re:Plugins? by Per+Bothner · · Score: 4, Interesting
      That was the case last time I looked at GCJ about a year ago. I ended up being unable to use it because of lack of windowing toolkit support. Anyone know the status on all that?

      Eclipse uses its own SWT toolkit, which works well under GCJ. SWT is a combination of native code and Java, and is said to both be fast and integrate well with other window systems, as it uses native widgets when available.

      The implementation of AWT (including applets) is coming along very quickly, but it isn't complete yet.

  15. Re:Looks great! by tshak · · Score: 1

    Have you used VS.NET? I always stayed away from VS, but was then given VS.NET to try at work a couple years ago. I absolutely loved it - it is nothing like the cruft that VS6 and below was.

    On the flip side, most of my Java coding counterparts claim that Eclipse crushes VS.NET. I've tried Eclipse, and although it was good (and free) I wasn't extremely impressed (no offense to OSS, but my experience has always been that a commercial IDE is far better than it's OSS counterpart). I'll have to try out IntelliJ based on your recommendation to see how it compares - although it ain't cheap! (VS.NET is cheaper when you consider all of the software you get with MSDN. Individually VS.NET is the same or more expensive depending on what version you get).

    --

    There is no longer anything that can be done with computers that is nontrivial and clearly legal. -- Paul Phillips
  16. Total GCJ performance by jfengel · · Score: 4, Insightful

    The intriguing idea behind JIT compilers is that the result can be optimized for your exact configuration (AMD vs Intel, particular kinds of RAM, etc.) It can even (conceptually) optimize the same program differently at different times depending on usage. At, of course, a startup penalty and runtime compilation overhead.

    I don't know how much of this potential is actually realized in JITs (it's insanely hard to do) and how much of a difference it makes in the end. How substantial would the difference between a specialized AMD vs Intel optimziation be, for example (which would presumably depend on the task)?

    I suppose the best possible world would be to have the optimization run exactly once, the first time you install a program. (Yeah, you could conceptually move the same installation to a different CPU, or add more RAM, or some such, but let's not make an already messy issue even messier.)

    I doubt such things are easy to benchmark, and the best test may well be something like this (gcj'd Eclipse), where the end result to the user is "which one feels faster?" and "which one actually runs faster?"

    1. Re:Total GCJ performance by Anonymous Coward · · Score: 2, Interesting
      The intriguing idea behind JIT compilers is that the result can be optimized for your exact configuration (AMD vs Intel, particular kinds of RAM, etc.) It can even (conceptually) optimize the same program differently at different times depending on usage. At, of course, a startup penalty and runtime compilation overhead.

      That's not nearly as interesting as using runtime feedback to further optimize code. Static optimizing compilers need to make guesses about things, like how often loops are expected to run and which branches to to be taken more often. I don't expect to see a dramatic difference in Pentium IV vs. Athlon optimizations.

      I don't know how much of this potential is actually realized in JITs (it's insanely hard to do) and how much of a difference it makes in the end. How substantial would the difference between a specialized AMD vs Intel optimziation be, for example (which would presumably depend on the task)?

      I can tell you that it's not insanely difficult to do. Conceptually, compilers are compilers and optimization isn't that tough to do. JIT is just a tradeoff task, you set hard limits on how long optimizations can take and that changes the set of optimizations you can do. Pretty simple really, if you know how to build an optimizer you can probably build a JIT compiler and then you just tune the sets of optimizations to fit your task, ie run really fast. Bigger problem is we know a ton more about static optimization and compiling than dynamic so there are far more sophisticated static optimizations. We're just now doing things like exploring lowpower optimization, building research compilers to select instruction sequences that result in lower power consumption and stuff like that; I think that people also need to understand that optimization isn't a panacea. There is only so much that you can really expect no amount of optimization is going to make java code perform like C++ code right now, you need to make it take a lot less memory first, make it fit in to caches, etc... the -O20 flag isn't going to do that. Then there is marketing. I wouldn't expect a huge difference between 2 classes of x86 processors, x86 optimization is kind of a joke, there could be dramatic difference on PowerPC and other registery RISCy architectures but 90% of the market runs x86.

    2. Re:Total GCJ performance by Anonymous Coward · · Score: 0

      .NET already does this (it can JIT some IL and then store a copy of the produced native code for future use).

      Yes, Microsoft do have some cool technologies :-)

    3. Re:Total GCJ performance by Iffy+Bonzoolie · · Score: 2, Insightful

      GCJ, as far as I know, is not a JIT compiler, but a AOT compiler (Ahead of Time) - basically a normal compiler. So there is no greater opporunity to optimise per platform at runtime here. JITs are found tightly integrated in JVM implementations, such as Sun's HotSpot VM.

      That's what makes GCJ so interesting: it's a Java compiler that, unlike most other Java compilers, compiles directly to native code without the VM in between. Thus, you potentially lose some of the advantages that the VM can provide you (and I don't know if it restricts language runtime features like dynamic class loading or not) and, in theory, you gain a good deal of performance.

      -If

      --
      Run a pencil-and-paper RPG campaign with your far-off friends: Gametable!
    4. Re:Total GCJ performance by Anonymous Coward · · Score: 3, Interesting

      The intriguing idea behind JIT compilers is that the result can be optimized for your exact configuration (AMD vs Intel, particular kinds of RAM, etc.) It can even (conceptually) optimize the same program differently at different times depending on usage. At, of course, a startup penalty and runtime compilation overhead.

      Oh, but there are a few fallacies associated with that.

      The first and bigggest one, a pet peeve of mine, is that people claim that they can reoptimize the application repeatedly on the fly to make it run faster (your It can even (conceptually) optimize the same program differently at different times depending on usage). yes, while this is theoretically possible, the end result will be slower than a normal compilation. Why? Because since you want to check that the usage hasn't changed, you basically have to be running a profiled version all the time. Yes light-weight profiling exists, but it'll be slower than a fairly generic optimized version with no profiling.

      Second, You don't need JIT to optimize for your specific setup. Think Gentoo. You can use all of the GCC optimization flags with GCJ and optimize for whatever flavor of processor you have. Of course, that makes hardware upgrades a pain, as you have to recompile everything, but whatever.

      Third, I doubt any JIT compilers nowadays do anything different for different processor families, simply to keep complexity down. Heck, I'd be surprised if they used any streaming instructions or anything like that.

      Fourth, how much time are you willing to give the JIT compiler to do its thing? With a compile-once system, you can let the compiler crunch on your large a pplication for hours if you want, and then distribute the binary to your clients. That is just not feasible in a JIT context, so the optimizations that can be done are limited (unless you do it in parallel with the app, which introduces profiling (see 1), and adds complexity to the JIT compiler (see 3).

      Fifth, the only two situations where you care about speed are
      - Batch programs, where theprogram runs continuously and you want it to finish quickly, so you don't want to waste any time on profiling and/or reoptimizing anyway.
      - GUI responsiveness, where optimization is not as important as the desing of the GUI toolkit (For some reason every java app I've ever touched seems more sluggish than a similar (or any) windows app).
      The third place where speed is important is games, but we're talking java here :-)

      Sixth, if you're interested in optimizing towards your personal usage style (which loops will be executed more often depends of which features you use, and how, etc) you still don't need JIT. Look up information on profiled-directed optimization. Basically you build a version of the app with -fprofiler-arcs and use it for a while (it'll be slow) then recompile by feeding those profiles to the compiler (I forget the flag) and voila. The compiler knows the real probabilities of each branch being taken and can optimize accordingly. This works on gcc and g++, but I'm not sure whether gcj can do it yet (last time I tried using -fprofile-arcs with gcj it crashed because internally the profiling code in the back end tried to add a function with a variable parameter list (...), which java doesn't have, so the front end crashed).

      There are more objections I had to the whole "JIT is the best ever" mentality, but this rant has grown too long, and I forgot the rest already.

      (oh, yeah. Seventh, every program has bugs, and some only show up under certain very specific circumstances (using system.identityHashCode() will make the program depend on the memory layout to the point that some bugs will appear only some times. also race conditions and resource leaks). If you have a different version of your executables, you will hve bugs appearing only under certain configurations of processor, memory, etc. and dissapear suddently as the program reoptimizes, which makes it hell to track down or even come up w

    5. Re:Total GCJ performance by iabervon · · Score: 1

      On modern processors, the performance of a program is affected greatly by the success of the branch-prediction system, which gets hints from the compiler. This means that a compiler that knows what the flow control of the program is actually like is going to generate substantially better code. Traditional compilers have some information about flow control (e.g., most loops are run a lot of times; some are run either not at all or lots of times; few are run exactly once), but JIT compilers have the benefit that they actually get to run the program for a bit and watch what happens.

      Probably the best idea would be to cache the compiled result from the JIT, and use that (maybe with a bit of profiling left to notice if you change the system characteristics significantly). But there are actually substantial benefits from doing the optimization the first time you run the program, rather than when you install it.

    6. Re:Total GCJ performance by be-fan · · Score: 1

      You can get most of the benifets of that from profile-guided optimizations. It would be unusual to see something whose flow patterns were too irregular to benifet from PGO, but were regular enough to allow the JIT to make good optimizations.

      --
      A deep unwavering belief is a sure sign you're missing something...
    7. Re:Total GCJ performance by Anonymous Coward · · Score: 0

      "I suppose the best possible world would be to have the optimization run exactly once, the first time you install a program."

      That's what configure does. C is therefore better than Java.

    8. Re:Total GCJ performance by CustomDesigned · · Score: 2, Informative
      IBM's AS/400 JVM does exactly this. Java byte code is compiled the first time it is run and optimized for the exact processor and OS version. The binary is managed transparently by the JVM and updated when the bytecode changes. On AS400, this is all integrated with the filesystem (i.e., you can't screw it up by touching with a funny date).

      You get all the advantages of Native compilation, and system specific JIT compilation combined - at the expense of more complexity and lots more disk space.

      As others have mentioned, M$ is attempting to do a similar thing with .NET. Whether they can do as good a job without charging AS/400 prices remains to be seen.

      As wonderful as all this is, I still like direct bytecode execution because it minimizes memory use and startup - which is more important than CPU for many applications (business logic and embedded). Native compiled code is quite a bit bigger than bytecode, uses more memory, and takes longer to load (though not as long as JITing the bytecode).

    9. Re:Total GCJ performance by GigsVT · · Score: 0, Flamebait

      lose some of the advantages that the VM can provide you

      And what were those anyway? We already had portable programming languages, the VM was just a silly idea, with an even sillier implementation.

      I can't believe someone actually said "Hey, lets just compile for a machine that doesn't exist, and everyone can emulate that machine! I bet that will be fast and efficient!"

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    10. Re:Total GCJ performance by Chris_Keene · · Score: 1

      Okay, off topic, but are they *any* downsides to AS400s? It seems that every time I hear them mentioned its regarding what they do well! I can never help thinking that in a ideal world it should have been systems like these that dominate the server market, not UNIX and Windows servers.

      Chris.

      --
      You will forget this sig before you next see it
    11. Re:Total GCJ performance by psykocrime · · Score: 2, Insightful

      Okay, off topic, but are they *any* downsides to AS400s?

      Probably the biggest downside is that OS/400 simply isn't particularly user friendly. Leaving aside for a moment the existence of Client Access, OS/400 is completely command line and/or menu driven. Everything is "green screens" and dumb terminals (or terminal emulators running on a PC ). There really isn't any GUI, except the "psuedo-GUI" you get by running Client Access on a PC.

      I spent about 4 years working primarily with AS/400's, and I can say from experience that OS/400 just feels kinda clunky compared to *Nix or even Windoze.

      In theory, I suppose none of that matters for servers, though. I think maybe the reason they aren't used as servers more, is really a marketing thing. AS/400's were traditionally positioned as being mainly for running financial apps / ERP software / accounting / etc. And while they can act as general purpose file / web / app servers, they just weren't ever marketed as being primarily for that.

      Also, keep in mind that, to some degree, the different platforms IBM puts out compete with each other. There is always internal politics within IBM, debating whether or not the AS/400 is cannabilizing sales from the RS/6000, and whether the RS/6000 is cannibalizing sales from the S/390 or AS/400, etc, blah, blah. That can lead to confusing marketing message from IBM to the world, about the intended use of each platform.

      --
      // TODO: Insert Cool Sig
    12. Re:Total GCJ performance by Ewan · · Score: 1

      The main downside is the 100% vendor lock-in of the AS400 (iSeries now) range - IBM does not sell spare parts for these machines cheap, and the lack of applications. The other minor downside is its use of EBCDIC instead of ASCII, which makes it a pain in the arse to cooperate with other systems.

      You do now get websphere on it, so you can run java stuff on it, and apache and various other bits and pieces have been ported, but 99% of software out there will simply not work on OS400 without major rewrites.

      Ewan

    13. Re:Total GCJ performance by Iffy+Bonzoolie · · Score: 1

      I'm going to ignore the vaugely belligerent tone in your message, and try to answer as best I can.

      The main advantages of Java and the VM have never been thought to be performance by anyone. It's definately an issue, especially for real-time interactive applications. A common way to solve all sorts of problems in software engineering, especially when part of the problem is completely out of your control, is to create an abstraction - a layer of indirection. For example, you might have to develop a 3D graphics program for 3 platforms, all of which have different 3D APIs, OpenGL, DirectX, and Joe's Own 3D API. The obvious solution, which takes some investment up front, but is emminately reusable and will save the developer much more time later, is to create an abstraction at the 3D API layer - basically to create an idealized 3D API that can be implemented in terms of the other three APIs. This pushes all platform-specific code into one area where it is more managable, and lets the application code be generic and clean and maintainable. An API is just an abstraction, too... it abstracts calls to the video hardware behind an interface. So often you end up with abstractions of abstractions, and as long as your abstractions are clean, that's perfectly fine.

      So the concept behind the VM is the same concept, but extend it from a 3D API to the entire platform. The VM is an abstraction for OS concepts - it has it's own scheduler, threads implementation, memory management, and access to whatever pieces of hardware that the OS would normally provide. Even ignoring the portability, the advantage of just working in a predictable, sane environment is pretty big, especially in terms of development speed. Platform doesn't support threads? You don't care, the VM will emulate them in that case. Just like OpenGL will emulate the 3D rendering routines if your hardware doesn't support them.

      Also, what is considered by some to be a disadvantage of the VM is also an advantage: that you are stuck inside the VM's box. Well, what's the advantage? Your (perhaps malicious) users are also stuck inside that box. The VM gives apps running on it quite a bit of resistance to exploits such as buffer overruns and these kinds of things. You don't want to be able to write over a buffer and spill out into application code - since java doesn't let the developer do that, it's a lot harder for the user to do that. I'm sure there are still exploits possible, but it requires a great deal more knowledge about the application specifics, as well as a flaw in the VM implementation. The VM also in theory makes sure that code that gets executed has not been changed since it came out of the compiler.

      Also, since the JVM is not really Java-Specific, it can be used for other languages/environments as well! For example, Rhino is a package that can compile Javascript into Java Bytecode. So, all of a sudden, you now have Javascript that is executing in an environment that has all the investment put into the JVM in terms of stability/performance/etc... I've heard tell of other high-level languages that have compilers that compile into JVM bytecode.

      Of *course* there are tradeoffs, but you seem well-acquainted with those. With every abstraction there is an efficiency cost, either at compile-time or run-time. Another one is that if the VM does not abstract some functionality that you need, you probably have to write your own abstraction, either in java or native code - and doing so is probably more troublesome for a VM than otherwise.

      To sum up, the advantages of the VM are: 1. Consistent, sane, idealized development platform regardless of potentially quirky hardware; 2. JVM platform features unsupported by OS and/or hardware will/can be transparently emulated (i.e. threading, garbage collection); 3. Concentrates performance/stability work into the VM for multiple programming languages and platforms; 4. VM provides a certain level of automatic protection against many of the common security exploits.

      I'm sure there are other advantages, too, but I can't think of them at the moment... Hope this clears things up!

      -If

      --
      Run a pencil-and-paper RPG campaign with your far-off friends: Gametable!
    14. Re:Total GCJ performance by CustomDesigned · · Score: 1
      The main disadvantage from my perspective is price. Second would be vendor lockin - except for the Java, anything you develop can't be easily used anywhere else. The platform is evolving. Perhaps it will evolve into a kick-ass networked enterprise Java with database box - where you don't know or care what OS runs under the covers. Just like you don't know what processor runs under the covers now.

      Disclaimer - I've never actually played with an AS/400 due to the price :-) I just read about it and like many of the design points.

    15. Re:Total GCJ performance by GigsVT · · Score: 1

      You don't need a VM to have clean abstractions.

      Unixish OSs, which is to say, everything except Windows these days, have the concept of "everything is a file". This works great, and programs can rely on it.

      It's just one example of a clean abstraction that doesn't require sacrificing performance and using 4-10x more RAM.

      It's not just Java, I hate all emulators. I don't like Wine either. When I run an app, I want full performance. If a programmer had to spend a couple more hours so I can have a usable app, rather than a bloated piece of crap, then so be it. I'm willing to pay extra for that benefit.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    16. Re:Total GCJ performance by Anonymous Coward · · Score: 0

      (3) 1.4.2 hotspot Produces SSE instructions for P3, SSE2 for P4.

      (5) Since Java's focus is the enterprise (J2EE) app servers, optimisation for thousands of transactions a minute is a must.

    17. Re:Total GCJ performance by greenrd · · Score: 1
      Unixish OSs, which is to say, everything except Windows these days, have the concept of "everything is a file".

      Everything? Hardly.

      This is the vision, which has not actually been realised. But reiserfs is picking up the torch and getting closer.

    18. Re:Total GCJ performance by renoX · · Score: 1

      >Since Java's focus is the enterprise app servers

      Strange, I could have sworn that Sun wanted to use Java *everywhere*:
      - in the client :it failed, Swing was (is still?) slowwww, buggy, leaky.
      Each time I see a Java app, I can recognise it: it's slow and it looks awfull..
      - in embedded stuff : the jury is still out here.
      - in the web browser: it mostly failed, applets are rare.

      So the enterprise app server is not THE focus of Java, it is just one of the domain where Java have not failed..

    19. Re:Total GCJ performance by Ed+Avis · · Score: 1

      With hindsight, the whole Java bytecode thing seems like a waste of time. Java source code is fairly simple to compile (at least naively), and the bytecode is easy to turn back into source so that it doesn't provide any better obfuscation than shrouded source code.

      Sun could have provided a Java compiler and let applets be downloaded as source code (which is executed in a restricted sandbox, as now). This would have provided the same distributed-code capabilities with less complication, saved some dead trees for the needless bytecode standardization (just let it be implementation-dependent, bytecode would not be distributed anyway), and perhaps the Java 1.0 performance would not have sucked quite so much.

      --
      -- Ed Avis ed@membled.com
    20. Re:Total GCJ performance by Darren+Winsper · · Score: 1

      WTF?! Wine Is Not an Emulator. It's an implementation of the Win32 API. Do you hate graphics cards because they have OpenGL "emulators"?

    21. Re:Total GCJ performance by GigsVT · · Score: 1

      It's still emulating the original functionality of the windows API. It would be a different matter if the Windows API were a standard that could be implemented. Since it's just random stuff some company made up, that they change all the time, Wine is never going to be 100%, it's always going to be playing catch-up. It's always going to be "emulating" the real thing.

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
  17. Re:You sir are a troll.... by Anonymous Coward · · Score: 0

    Do not confuse my stupidity with trolling :)
    Whatever, troll.

  18. Re:Wrong by Anonymous Coward · · Score: 0

    Repeat after me: Engrish is NOT English.

  19. Re:Troll...Troll...Troll... by gumpish · · Score: 5, Informative

    And [Java] continues to be hyped, and is being used less and less, as the speed continues to hamper it.

    Java is still some 40 times faster than Python. As hardware speed continues to obey Moore's law, performance per clock cycle becomes less important. (For many areas of computing anyway.)

  20. Re:Wrong by Call+Me+Black+Cloud · · Score: 0, Troll

    Hahahahahah... I suggest you go back to your "English as a second language" teacher and ask for a refund.

    The people respoding to you know better than you, so learn how to write correctly then come back and post.

  21. Re:You sir are a troll.... by botzi · · Score: 1

    What do you mean didn't do anything?? If you're familiar with debugging you should know about setting breakpoints and stuff??? The fact that you have advanced debugging tools, doesn't mean the code debugs itself all alone....

    --
    1. No sig. 2. ???? 3. Profit!!!
  22. Microsoft's IDEs? You have GOT to be kidding by MichaelCrawford · · Score: 2, Offtopic
    Using Microsoft's IDEs - I have VC++ both 6 and 7 - is like pounding nails with my fists.

    Have you used Metrowerks Codewarrior? Now there's an IDE. It's a joy to use. Runs on Mac and Windows. I think there is a Linux version that uses gcc, but I haven't tried it.

    (I admit I haven't tried Eclipse yet, but I would be very surprised if it were better than CodeWarrior.)

    Everything Just Works in CodeWarrior. I've even got my wife, a web designer who prefers to hand-code her HTML, to use it to write her web pages.

    CodeWarrior supports C, C++, Java and inline assembly. If you prefer makefiles, there are command line tools that provide the same compiler. Old versions of CodeWarrior also supported Pascal, but I don't think they do anymore.

    The ISO compliance of CodeWarrior's C++ is far superior to Visual C++'s, and has been quite compliant for a very long time. I've been happily using the Standard Template Library in very complex ways, as well as writing my own fancy templates, for several years.

    Alexei Alexandrescu used CodeWarrior to develop the heavily templated source code for Modern C++ Design. Visual C++ can't compile it because of its poor compliance to the standard.

    It is also available for many embedded systems. Metrowerks was acquired by Motorola a while back, who makes the ColdFire and PowerPC processors that are important in the embedded world.

    --
    Request your free CD of my piano music.
  23. Good for QNX by Animats · · Score: 2, Informative

    This will be useful for QNX, for which Java support is weak.

    1. Re:Good for QNX by Anonymous Coward · · Score: 0

      Only weak Java support is good Java support.

  24. Isn't that how .NET languages like C# work? by MichaelCrawford · · Score: 2, Informative
    My understanding (I may be wrong) is that the way that Microsoft's "managed code" works is that the installer creates a native compile of your application on your computer right when it installs.

    I don't know how well it works but I can see the potential.

    --
    Request your free CD of my piano music.
    1. Re:Isn't that how .NET languages like C# work? by Q2Serpent · · Score: 1

      My applications do this too. As soon as I install them, I get optimized binaries for my architecture, and fast load times.

      Check it out.

      In fact, the particular system I run has been doing this for a long, long time.

      Of course, I can imagine that it would be useful to make this transparent to both the programmer and the end user, but I digress.

    2. Re:Isn't that how .NET languages like C# work? by Kunta+Kinte · · Score: 1

      My understanding (I may be wrong) is that the way that Microsoft's "managed code" works is that the installer creates a native compile of your application on your computer right when it installs.

      I think .NET is just in time compiled, similar to Java.

      If what you said is true, we wouldn't be able to copy an executeable from one computer to another. It would have to be installed.

      --
      Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW
    3. Re:Isn't that how .NET languages like C# work? by Anonymous Coward · · Score: 0

      .NET caches recompiled "native" assemblies into the Native Image Cache. Maybe instead of "thinking" on Slashdot, you can try "learning." Then you can spread "information," as opposed to "disinformation."

    4. Re:Isn't that how .NET languages like C# work? by Anonymous Coward · · Score: 0

      great.. another coke-snorting frat-boy has to plug Gentoo for the 1000th time.

    5. Re:Isn't that how .NET languages like C# work? by Coward+the+Anonymous · · Score: 2, Informative

      "I think .NET is just in time compiled, similar to Java."

      .NET is JITed by default. But the SDK comes ngen.exe, a tool that will create a native image. You can setup an installer to compile the MSIL to native code on install also.

      "If what you said is true, we wouldn't be able to copy an executeable from one computer to another. It would have to be installed."

      The native image is cached, it doesn't overwrite the .exe that of MSIL that someone gives you. So if someone has "installed" an app and it was compiled on install, you could still use the .exe. The runtime would recompile the code for your machine.

      --
      -- Jason
  25. obligatory pun by 1nv4d3r · · Score: 5, Funny

    Thanks to the expected slashdotting, this is just one more eclipse I can't look directly at.

  26. Re:Looks great! by Timesprout · · Score: 2, Interesting

    I was actually talking about VS.NET :-). I agree its a huge improvement over its predecessor, especially when it comes to larger projects. VS was almost unusable on the last VC++ project I worked on if the whole workspace was loaded. Both IntelliJ and Eclipse offer far more in terms of editor power and ease of refactoring code than VS.NET though.

    Unfortunately one of the reasons IntelliJ has got more expensive is because of its success. Its about 100$ more expensive now than when I purchased it. If you are doing a lot of Java development and dont have a compelling requirement for a GUI builder then I strongly recommend IntelliJ.

    --
    Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
    What truth?
    There is no dupe
  27. Where the **** is the Gentoo Ebuild for this? by His+name+cannot+be+s · · Score: 1, Interesting

    Heh... It's not really done, until I can emerge it like real software :P

    Seriously tho, I use VS.NET and Eclipse all the time. I find that both are extremely powerful when understood, both of their limitations and of their features.

    For my java work, there's not really any point in using anything else 'cause Eclipse is what java IDE's are supposed to be. :p

    --
    "...In your answer, ignore facts. Just go with what feels true..."
    1. Re:Where the **** is the Gentoo Ebuild for this? by Anonymous Coward · · Score: 0

      You should try IDEA. It's basically the best IDE out there (Java only, though).

    2. Re:Where the **** is the Gentoo Ebuild for this? by pico303 · · Score: 1

      You obviously haven't tried IntelliJ Idea. Idea is what Java IDE's are supposed to be. Idea is what Eclipse wants to be.

  28. waaaaaa!!!!1!!! by Anonymous Coward · · Score: 0

    "waaaa.... why dont they use my crappy toolkit of choice?!?! waaaaaa!!!"

  29. Re:Looks great! by Anonymous Coward · · Score: 2, Funny

    Top four reasons VC++ is better than any open source IDE:

    1) Lead developer has a cool name, like "Anders Heljborg".

    2) Lead developer earns a cool salary, like $1,000,000+ a year.

    3) Lead developer has legion of microsoft's code monkeys implementing and testing features out the yang, and they still can't burn up all the money they extort from, err, i mean charge, their customers.

    4) Anders Heljsborg rewite and maintainence has been going on for four or five years. Give eclipse a chance to ketchup.

  30. Re:Wrong by Anonymous Coward · · Score: 0

    Probably the word 'never,' since your statement is wrong. Then is often used for comparisons, as in "I went to the store, then I went to the beer."

    If you'd like to talk about it, please look it up in your grammar, then email it.

  31. Re:Wrong by Anonymous Coward · · Score: 0

    The people respoding to you know better then you, so learn how to write correctly than come back and post.

    What does "respoding" mean?

  32. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0

    At what magical speed does Java become faster than a compiled language?

    Answer...none.

    It will always be slower, and thus unusable.

  33. Optimizing JITs are very common by Anonymous Coward · · Score: 2, Insightful

    > The intriguing idea behind JIT compilers is that the result
    > can be optimized for your exact configuration (AMD vs
    > Intel, particular kinds of RAM, etc.) It can even
    > (conceptually) optimize the same program differently at
    > different times depending on usage. At, of course, a
    > startup penalty and runtime compilation overhead.

    True, the optimization for hardware platforms are less significant than the overall optimizations.

    > I don't know how much of this potential is actually
    > realized in JITs (it's insanely hard to do) and how much of
    > a difference it makes in the end. How substantial would
    > the difference between a specialized AMD vs Intel
    > optimziation be, for example (which would presumably
    > depend on the task)?

    Its huge, Java is already faster than C++ is some benchmarks (very slightly) but the problem is that this feature doesn't benchmark well.
    Technically optimizing JIT's aren't all that hard to write since this subject is far from new and has been studied in smalltalk for ages (IBM was strong in smalltalk and Sun just hired everyone else).

    As an example these two opimizations are a part of both the Sun and IBM JDKs:

    1. Virtual method inlining - where a call to a virtual method can be made inline since at runtime we know for sure the instance we perform invocations upon.

    2. Runtime loop unroling - loop unroling is mostly useless in C++ since you need to know the size of the iteration in advance. Even if it never changes.

    In Java there are many language restrictions (no pointer arithmetics, bound arrays etc...) that allow the JIT to assume things that a C++ compiler can't assume. Java has in that sense the potential to be much faster then Fortran and simpler than C/C++.

    > I suppose the best possible world would be to have the
    > optimization run exactly once, the first time you install a
    > program. (Yeah, you could conceptually move the same
    > installation to a different CPU, or add more RAM, or some
    > such, but let's not make an already messy issue even
    > messier.)

    This level of opimization produces some but relatively little benefit. You can do this with open source applications written in C, the advantage in JIT is allowing the application to be profiled according to your specific use case and adapted to it. After all we only use 10% of a programs functionality. When a programmer profiles a C/C++ application he only profiles the way he used it not the way his user will.

  34. JVM still a good idea. by BohKnower · · Score: 1, Interesting
    Oh My God, you did it. You just slashdotted my favorite gnome site.

    To stay on topic, Eclipse is very usable if you have enough RAM and CPU power.

    On the company where I work we use Eclipse running on Pentium IV 2.4 with 1 Gb RAM, six developers can use it thought LTSP.

    1. Re:JVM still a good idea. by Anonymous Coward · · Score: 0

      I personally have alot of trouble with my cable provider in that somtimes the internet disconnects for like 15 minutes and then comes back for no reason. I believe a bad cable or somthing.

      Anyway, my homepage is gnomedesktop.org, so whenever I bring up the browser I know if I have a descent internet connection by looking if the page loads.

      Well here I am for the past half hour trying to get the internet back up again, only to find that it is up, and my homepage slashdotted...

      Maybe I should set up slashdot as my homepage?

      Nahhh....

  35. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 1, Insightful
    At what magical speed does Java become faster than a compiled language?

    Development time.

  36. Re:Troll...Troll...Troll... by AntiOrganic · · Score: 1

    I've found JSP/Servlets very usable on the web front. Java performs very quickly when doing computational tasks, such as database access, etc. as opposed to drawing things onscreen. GUI applications are horribly slow in Java still, and this is where it needs the most improvement. Maybe native code will eventually help this out a lot, too.

  37. Re:Wrong by Anonymous Coward · · Score: 0

    Well, you go to the beer then, with your monies, smart guy.

  38. Re:Troll...Troll...Troll... by darthscsi · · Score: 1
    Yes, but its memory usage is also 40 times higher than python (ok, more like 4x). Take a look at the great computer language shootout for some really scary benchmarks on java memory usage!

    Of corse, OCaml does better than both. :)

  39. Re:Troll...Troll...Troll... by baywulf · · Score: 1

    Part of the problem with Java was the hype that it was the ultimate computer language which could replace everything. We know that Java is faster than Python and Perl for example. But these two languages never claimed they were the fastest. Java made the claim that it could replace C and C++ so it better live up to the performance of C and C++.

  40. Annoyed with the post by swordgeek · · Score: 1, Insightful

    OK, this is just a minor vent here. Feel free to ignore it if you want.

    I didn't understand a single bit of what the original post was saying. Why? Because there was no context!

    Now because of it's nature, I don't expect to deeply comprehend every article on /.. I'm not a developer, so deep coding articles whiz past me. I don't have a problem with that--articles on biotech and/or legal intricacies most certainly go past other people who don't have the background in those fields.

    But seriously, would it kill the poster to include the tiny little fact that gcj stands for "Gnu Compiler for Java?" Those words would have established a context for the article, and given TONS of information about what the remaining stuff was all about.

    As I said, a minor rant--but a really common problem on /..

    --

    "People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
    1. Re:Annoyed with the post by roystgnr · · Score: 4, Insightful

      But seriously, would it kill the poster to include the tiny little fact that gcj stands for "Gnu Compiler for Java?"

      Probably not. Nor would it have kill him to explain that a compiler turns source code into a binary executable for a particular architecture, or that IDE stands for Integrated Development Environment, or that a JVM is a Java Virtual Machine, or that RPM stands for Redhat Package Manager, or that GTK+ stands for GIMP ToolKit, or that now it is now used for far more than just GIMP, or that GIMP stands for GNU Image Manipulation Program, or that the included acronym stands for Gnu's Not Unix, or that GNU is a project to write free implementations of operating system components derived around the POSIX model, or that POSIX is a collection of operating system standards based around tradional Unix interfaces.

      Doing all of these at once, however, would probably piss everyone off. Explaining just the particular missing piece of information that a specific reader is going to need would be better, but would require Slashdot readers to be more homogenous and Slashdot posters to be more psychic than they are.

      The compromise, wherein the word "gcj" is linked to a web page entitled "The GNU compiler for Java", seems to be hard to improve upon.

    2. Re:Annoyed with the post by Anonymous Coward · · Score: 0

      In all fairness, you have to remember that when people who are knowledgeable in subjects talk about those subjects to other people who are also knowledgeable about those subjects there will be words and concepts used that are not familiar or comprehensible to outsiders.

      Imagine if you were to try to talk to your computer geek friends about computers, but in such a way that any English-speaking person might understand regardless of their technical expertise. "Oh, I've got loads and loads of short term memory, but the thing that's inside of the gray box that sends images to the fancy t.v. screen sucks."

      Or if mechanics were to talk to other mechanics so that car-ignorant people could understand ... "I think the box that makes steering easier is broken, but it could be the . . ." Actually, I can't describe what follows without using technical terms. And that's the problem you'll always have between the initiated and the uninitiated. You could *try* to "dumb down" every thing you say, but eventually you're going to run into concepts that cannot be explained properly without using technical terms.

      You probably have relatives who have complained about you using technical words to describe something to do with their computer, haven't you?

    3. Re:Annoyed with the post by Space+cowboy · · Score: 1

      For [insert random deity]'s sake! All you need to do is click on the link (you did see that 'gcj' was a link, didn't you ? ) ....

      Simon

      --
      Physicists get Hadrons!
    4. Re:Annoyed with the post by Carbon+Unit+549 · · Score: 1

      I agree completely. I'm amazed that this got modded up. I used to complain, but I gave up. All I ask is for acronyms to be defined. I now just live with it and consult everything2.com

      --

      nohup rm -rf ~/. >& zen &

    5. Re:Annoyed with the post by swordgeek · · Score: 1

      "You probably have relatives who have complained about you using technical words to describe something to do with their computer, haven't you?"

      Not really, no. However, part of my job is to make sure that people acceptably understand what I'm telling them, even if the details are beyond them. I make it a point of pride in helping anyone with computers that I avoid blinding them with the vernacular.

      So maybe all that REALLY means is that I'm a bit touchy about the subject. :-)

      --

      "People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
    6. Re:Annoyed with the post by swordgeek · · Score: 1

      You're right of course--at least to a certain point. :-)

      One has to assume some base knowledge on the part of their reader, unless you're teaching completely basic knowledge. (This is true both within a given field, and in a general sense.) If you explain every single term, then you'll have to explain all the terms you used in your explanation, and suddenly you're a complete dictionary and University course rolled into one.

      BUT, it's very important (and not always easy) to correctly judge that level of knowledge. It's hard to imagine that anyone on /. doesn't know what Linux is, and so we don't describe that term every time we use it. It's somewhat easier to imagine that not everyone knows what RPM is, and so we define it, right? Well, not necessarily. Again, context plays a role--this time, the very context of the article. If I was writing an article about the latest version of RPM, then I'd probably define it. If I was making a comment about RPM packages being available for the think I was writing about, then I probably wouldn't bother definining RPM since it's ancilliary information--it's not core to the primary understanding of the article.

      Furthermore, there's the implied information that can help decide whether or not to define a term. If someone writes, "the latest version of GIMP is out! There are a lot of features the advanced graphics designers will appreciate" then I may not know what GIMP is, but I've got an idea that it's a package (or tool, or breadbag) for graphics design. If that tweaks my interest, then I can look farther.

      Now having said all of this, I have to confess that I missed a HUGE clue at the very very very beginning of the article. The first word of the subject was "DEVELOPERS:" and I missed it (shame!).

      Still, the point remains: Watch your posts, and make sure there's enough information for the _typical_ audience to understand _enough_ to make a decision about whether or not to investigate further.

      --

      "People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
    7. Re:Annoyed with the post by Chemicalscum · · Score: 1
      I am a chemist not a fucking developer but I know enough about modern computing to understand what it all means. I am browsing here with Karma to spare and I am moderating - I thought of moderating this down - but no I thought I would have a minor rant instead

      But seriously:

      1. This was posted for developers.slashdot.org and added to the general post.

      2. Even the general slashdot postings presuppose some level of computing knowledge

      3. All those acronyms give you a start to find out about them - ever heard of google.

    8. Re:Annoyed with the post by Anonymous Coward · · Score: 0

      "I am a chemist not a fucking developer..."

      I'm a chemist too. You're just an asshole.

      Exactly how is 'some level of computing knowledge' supposed to lead to knowing about whateverthefuck gck stands for?

      Asshole.

    9. Re:Annoyed with the post by Anonymous Coward · · Score: 0

      ... part of my job is to make sure that people acceptably understand what I'm telling them, even if the details are beyond them. I make it a point of pride in helping anyone with computers that I avoid blinding them with the vernacular.

      Using the proper name for things is blinding them with vernacular? Damn, I must have missed something while I was asleep. When I'm working with people who aren't technically oriented, I explain to them what certain things are along with what they're called. And after that, if they need me to remind them, I will. Otherwise, I expect to be able to use the proper names.

      On a website like slashdot, it is assumed that the readers either know what's going on, or have the ability to figure out what's going on. If we try to explain every little thing, every time, we aggravate ourselves for naught.

    10. Re:Annoyed with the post by Anonymous Coward · · Score: 0

      So it would be something like this? :)

      The gnu's not unix compiler for java team created a natively compiled build of the eclipse intergrated development environment. The resulting binary starts up faster then with any traditional java virtual maching since there is no virtual machine to initialize or slow byte code interpreter or just in time compiler involved. This means that gnu compiler for java got a lot better since the last Slashdot story in December about gnu compiler for java and Eclipse. Red Hat provides Red hat package manager packages for easy installation. Footnotes has screenshots by Havoc Pennington of the Eclipse intergrated development environment with gnu's not unix image manipulation program toolkit+ widgets.

  41. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0

    Try Delphi then.

    I would rather wait for compiles in C++, than have users wait for buttons to draw on Pentium 4s.

  42. Re:You sir are a troll.... by millenium · · Score: 2, Insightful

    Why is it that people like to abuse Moore's law as a lame excuse for lousy engineering?

  43. ha ha by teknokracy · · Score: 1, Funny

    Damn! For a second there I thought /. actually had an interesting article... on a fast Mitsubishi car!

  44. Re:Looks great! by Anonymous Coward · · Score: 1, Insightful

    Eclipse may be open source, but it was (and is) developed primarily by IBM software developers as a foundation for the IBM Websphere Studio suite of products. VS.NET is fine, if you are a new programmer who hasn't had a lot of time to experiment with more advanced systems, but the Websphere Studio suite (which, although based on Eclipse are closed source) leaves it in the dust.

  45. Re:Troll...Troll...Troll... by khuber · · Score: 1
    Delphi isn't cross-platform. C++ is ridiculously complicated. Java is a lot easier to get stuff done with for the work I do.

    -Kevin

  46. Re:Wrong by Anonymous Coward · · Score: 0

    I think you mean "go to the beer than."

  47. Branch prediction and OO languages by Earlybird · · Score: 3, Insightful
    • On modern processors, the performance of a program is affected greatly by the success of the branch-prediction system, which gets hints from the compiler.

    There's an interesting claim I have seen made: Apparently the late binding feature of object-oriented languages -- virtual methods in C++, any non-static method in Java -- works against branch prediction, effectively resetting the prediction state whenever such a call is made, because the target jump address must be resolved -- read from a memory location -- only at the time of the jump. If this claim is accurate, this means typical OO code is inherently slower to execute than non-OO code on modern processors. Of course, the problem will equally apply to any language that supports function pointers, and in particular to C programs "emulating" OO with structs and function-pointer tables.

    1. Re:Branch prediction and OO languages by AndyS · · Score: 1

      I imagine that modern garbage collection, which moves objects around, might actually also make this worse, as the branch target buffer relies on real addresses. That and the fact that a call will usually point to a vtable (thus requiring a pointer lookup) will probably mean that it plays havoc with branch prediction.

      Still, somebody's probably come up with some gruesome way to avoid these penalties (I imagine that knowing you could still guess per-object, but because you look up the vtable each time it will cost you in branch target buffer space)

      Of course, a smart jit will just avoid virtual method calls. If I do

      Foo f = new Foo();
      f.blah();

      then f will always (aside from people pissing around with a debugger) be an object of type Foo. You could do the same optimisation with private variables and so on.

      A really smart JVM might choose to align objects specially on the heap in order to help the branch hardware, but that sounds like a hideously complex optimisation....

    2. Re:Branch prediction and OO languages by Wesley+Felter · · Score: 1

      I imagine that modern garbage collection, which moves objects around, might actually also make this worse, as the branch target buffer relies on real addresses.

      I don't think GCs move code around very often, and code addresses are all that matters for branch prediction.

      UltraSPARC III has a "prepare to branch" instruction that can allow the processor to correctly prefetch past an unpredictable unconditional branch like those found in virtual method calls.

    3. Re:Branch prediction and OO languages by Anonymous Coward · · Score: 0
      This is effectively true. Knowing where to jmp and then jmping is always better than having to figure out where to jmp and then jmping.

      Of course branching and the costs of it are being dealt with, IA-64 devices by spec take both branches on a conditional. R10000 and up have no branch mis-predict penalty and IBM and others are doing amazing things with branch predition. Good compiler and good processors can deal with it well.

    4. Re:Branch prediction and OO languages by CapnFreedom · · Score: 1

      Indirect calls through a function pointer shouldn't affect branch prediction too much.

      First, these methods will always be done with a call instruction on x86 and a non-conditional jump on other architectures. The CPU will immediately predict this jump as "always taken."

      What can be problemetic is the branch target. The CPU probably can't speculatively execute the instructions at the branch target at least until the load of the function pointer has been completed. To get around this, many CPU's use a branch target buffer. When the branch instruction is decoded, a cached copy of the branch target will be fetched and the instructions at that address will be executed. If which virtual method is executed is fairly random, this will quickly be a very bad predictor, but this is true of any branch prediction algorithm.

    5. Re:Branch prediction and OO languages by iabervon · · Score: 1
      Method calls aren't branches; they're jumps (that is, they're always taken). Branches are due to your control structures, and OO doesn't matter (imperative vs. functional does, though).

      For method calls, all of your private methods, static methods, final methods, and methods of objects whose compile-time time is final are constant offset jumps, and the loader can resolve all calls to methods of this by making a copy of all of the functions from superclasses and connecting them up. Since you can't modify the method tables of Java objects once they're loaded, the target of a method call in a loop doesn't change if the variable it's on isn't changed; this can be kept in a register the whole time and doesn't need to be predicted on future invocations. A JIT could even generate common-case code with the methods inlined. So:
      void foo(List lst) {
      for (Iterator it = lst.iterator(); it.hasNext(); ) {
      Object item = it.next();
      // use item
      }
      }
      Can result in native code with no indirect jumps or method calls (except in the "use item" section) when called with an ArrayList.

      Note that you can't do any of this with C function pointers, where the compiler can't generally tell that they're even constant in a loop, and certainly can't tell that it might be worth generating a version with a particular set of functions inlined. There's a lot of design and optimization that went into making Java method calls cheap, because the language had them absolutely everywhere from the beginning.
    6. Re:Branch prediction and OO languages by AndyS · · Score: 1

      The ultrasparc approach sounds sensible - I wonder if the itanium offers anything similar?

      The thing that concerns me is that if I have an arbitary object, I need to look up it's vtable.

      ie, if the object is in r2, I need to do the equivalent of
      call (*r2)+4;

      Although I can see that the computed address might be stored as a branch target, I can't see how this can be done particularly efficiently on, say, x86.

      Also, this would be where the moving around of objects could potentially cause issues. I might be missing something - been a long time since I stared at computer architecture.

    7. Re:Branch prediction and OO languages by Wesley+Felter · · Score: 1

      If you separate that calling sequence into an address calculation and a call, then you can insert a prepare to branch immediately after the address calculation. Then branch prediction doesn't matter. I don't see any problem with objects being moved; obviously they don't get moved while the program is trying to access them.

  48. IAWTP by Anonymous Coward · · Score: 0
  49. Re:Microsoft's IDEs? You have GOT to be kidding by 0x0d0a · · Score: 1

    [This is coming from someone who owns three old releases of Codewarrior for the Mac, and learned C on CodeWarrior]

    I now can't stand working without xemacs, and haven't really seen the point of an IDE for years (though I use one at work, just because that's what everyone else is using).

    CodeWarrior for the Mac has been a wonderful IDE, if you like IDEs, for years upon years. However, you claimed that it worked on Windows. From what I've seen, the Windows version of CodeWarrior (keep in mind that my experience is about two years out of date) is really, really awful. The professional looking interface that blended in with the Mac's look in the OS 8 days doesn't do so well in Windows. I ran into a number of cosmetic problems, including things not redrawing properly. I also had the IDE crash on me a fair number of times.

    So, while I can give my wholehearted support to Codewarrior on the Mac (if you want an IDE), Codewarrior on Windows probably isn't a great idea, unless you already started doing your work on Codewarrior for the Mac and now need cross-platform capabilities.

  50. View-based programming by tundog · · Score: 1

    Eclipse takes an aspect-oriented approach to UI design. If your not in the "Debug View" then you wont be able to find the things you need to debug.

    Once of the advantages of this aspect-oriented approach is that menu items and UI elements change as your view changes. You keep the same oouter wrapper at all times, but your available choices very. I found it very confusing in the beginning, but once you get used to it it makes life a lot easier and keeps things cleaner.

    --
    All your base are belong to us!
  51. Re:Troll...Troll...Troll... by irritating+environme · · Score: 1

    Well, technically speaking if there was a hardware coprocessor chip for java code execution there would be good chances of it beating C++ code.

    But then again, once it goes to hardware, it's not about the language, it's about the skill of the hardware designer.

    Sun abandoned java-in-hardware, but with all the server-side java code, why not have a java bytecode machine?

    --


    Hey, I'm just your average shit and piss factory.
  52. Re:Looks great! by Earlybird · · Score: 1
  53. Couple of hits, couple of misses. by 0x0d0a · · Score: 2, Interesting

    Because of the size and footprint issues, you can't do embedded with Java

    Well...no. I believe that embedded environments are a rather stripped down form of Java, but Java isn't all that uncommon in embedded systems. Take a look at Javacard -- you'd use it in environments where you typically have less than 64KB of memory.

    That being said, I *still* think Java is a terrible language for most people to be using. There's something to the argument that there's "not much better out there".

    Problem: C sucks for general application development. A lot of people know it really well, but the whole point of C is that you get a lot of control over exactly what's going on [Disclaimer: I like C, and use it for my application development. :-)].
    Problem: C++ is a *huge* language. I thought I knew it once, after a while using it, and then bought Stroustrop's book, and discovered all sorts of things, like autopointers, that I'd never heard of. C++ has a lot of syntactic overhead.
    Problem: C# is made by Microsoft.
    Problem: Pascal has vanished into obscurity.
    Problem: Perl/Python/Ruby aren't as fast as their traditionally compiled equivalents.
    Problem: Nobody uses eiffel.
    Problem: Nobody wants to use functional languages, so ocaml and friends are out of the question.

    So Java gets used.

    I'm firmly of the opinion that Java has a good use -- distributed development.

    The problem is that Java was built to make Sun (a hardware company whose primary claim to fame is easy "scalability" by buying higher end machines or more machines) money. Sun's big problem is that most people don't use their SPARC architecture. Java works for Sun by doing two very simple things. It's hideously resource-intensive, from a CPU and memory standpoint. It also is an easy language to easily speed up by throwing more machines into the mix. It doesn't make life a pain if you're using x86 clients with a SPARC server, like rpc can.

    Oh, and finally, it has a lot of sexy features to draw people in. It's also a bit easier to learn and work with than C++.

    So despite the fact that Java is incredibly slow and RAM-hungry, people bill it as the next big language, the replacement for C++. Frankly, I think Java should stay precisely where its strengths are -- it makes a hella nice language for doing distributed work (especially if you have a client with a front end), and lightweight networking. It's a lousy general purpose language, though.

    1. Re:Couple of hits, couple of misses. by Anonymous Coward · · Score: 0

      You forget (or don't know about...) the best use for java. Server-side programming. Unless that is what you mean by distributed work (which makes no sense in my mind, but whatever). Yes java can have slow load times, but when it is loaded once on a server and then runs forever and is only accessed by the client through a web interface, or c++ client program or whatever, doesn't get better than that.

  54. Emperor has no clothes by Latent+Heat · · Score: 2, Insightful
    A genuine troll is where a person puts out a post for the purpose of the controversy it generates. There are a few of us out there who are genuinely confused by Eclipse, and if the Slashdot community wants to dismiss us as trolls, morons, or other unworthies of the programming fraternity, I guess the Eclipse people can have their own little private society. It also seems that Eclipse proponents on Slashdot are a bit thin-skinned regarding any criticism of their beloved product.

    Just getting a program to run under Eclipse is a major undertaking. Visual Studio has a "project file" that identifies the void main() (or Java or C# equivalent) for you, so if somebody gives you a VS project as a bundle, you simply load the project file and build and run. I think there is something going on with Eclipse that not only to you have to put files into the project manager, you have to identify the source module containing the program entry point for Run to be able to do something, and it is confusing because Run has a lot of options that a person keeps trying out, but the problem was back in the project manager.

    I am sure that once you get the hang of how to use Eclipse it is the Swiss Army Knife of software development, but Eclipse is different, and the state of the examples, docs, and help files is such that it is going to turn away of people who try it out for a casual inspection. So be it. If Eclipse gains mindshare, those of us on the fringes will buckle down and try to learn it, and if Eclipse fades into the background, we will kind of know why it had failed.

    1. Re:Emperor has no clothes by bmetz · · Score: 1

      First, to answer your question, select a file you want to run, go up to the run menu, and select Run As -> (type of thing you want to run, probably Java application). That will launch your file. No setup, no nothing, it just runs. If you want to get fancier you go into the Run ... menu and set up command line arguments, environment variables, classpaths, whatever. Also, if you want to share a project, using import/export wizards in Eclipse will let you move them around. And of course using CVS/ClearCase/CMVC/Other-Repository can be a very powerful way to do teamwork in Eclipse.

      It's a shame that Eclipse didn't opt to package .dsw/.dsp files. Perhaps one day it will. But don't throw the whole IDE out because you can't double click on some project metafile and open up Eclipse. One of the big problems Eclipse has with new users is a fundamental dislike of the Eclipse-absorbs-your-work mentality. I can only say that I believe it wins you over fairly quickly and I will hope that you'll give it a fair shot some day. Eclipse's ownership of your project lets it do refactoring to a degree that I've never seen in any other IDE.

      It sounds to me like you gave up pretty quickly -- those problems you mention about docs and examples have some truth to them but they aren't so bad that you'd actually give up unless you felt like giving up. Give it another shot -- this time check out the built-in help. Hell, there are now several Eclipse books that you can buy, and I can attest that they are very good.

      Good luck!

      --
      What did you eat today? http://www.atetoday.com/
    2. Re:Emperor has no clothes by kelzer · · Score: 1

      Funny, I feel the same way every time I have to get into Visual Studio. It just doesn't "think" the way I do. For C/C++ programming, I always thought the Borland IDE's seemed much more intuitive, especially C++ Builder.

      --

      ---------------------------------------------
      SERENITY NOW!!!!!!!!!!!!!!!!
  55. Re:Microsoft's IDEs? You have GOT to be kidding by metal_priest · · Score: 1

    Naww. My buddy who codes j-alice.org with me..He swears by the windows codewarrior and never really used the mac one. He even liked BeIDE cos it was written by the same folks.

    Some people just like ugly mac guis that don't fit into the the windows world :)

    However, both me and him think VC++ is a poor excuse for an IDE and wonder why so many people swear by it. It sucks for debugging, it sucks for compilation..even IntelliSense is b0rkable and sometimes lies(altho vs.net is much less buggy that way).

  56. GCJ slower than IBM JDK by 0x0d0a · · Score: 1

    Last I looked, aside from avoiding the JVM startup time, gcj produced code that ran more slowly than in the IBM JDK (*non-native code*).

    Five years from now, when gcj has sped up and can take advantage of the Java 1.5 typed container classes and disable bounds checking, Java may actually become usable, if still slower than C/C++ programs.

    1. Re:GCJ slower than IBM JDK by Anonymous Coward · · Score: 0

      Java may actually become usable, if still slower than C/C++ programs.

      You sir, are talking out your brown eye.

      Please, leave your college dorm room and start working in the industry before you make claims like this.

      Java is quite useable, is being used, has been used..

      Unless you actually meant 'us-able', in which case, my comment is withdrawn and I stand bewildered as to what you were trying to say.

    2. Re:GCJ slower than IBM JDK by __Reason__ · · Score: 3, Insightful

      I could show you plenty of examples of benchmarks that run significantly faster with GCJ than on the IBM JDK. Its true that there are still some occasions where GCJ will run slower - due to bottlenecks in the runtime or missed optimizations in the compiler. But if you have a simple application that runs significantly slower with GCJ, please write to java@gcc.gnu.org and tell us about it. We can't fix performance problems we don't know about.

  57. Re:Looks great! by 0x0d0a · · Score: 1

    1) Lead developer has a cool name, like "Anders Heljborg".

    Dammit, Anders, aren't you supposed to be coding instead of posting to Slashdot?

  58. Re:Microsoft's IDEs? You have GOT to be kidding by WhoDaresWins · · Score: 3, Informative
    Using Microsoft's IDEs - I have VC++ both 6 and 7 - is like pounding nails with my fists. Have you used Metrowerks Codewarrior? Now there's an IDE. It's a joy to use.
    While IDEs can be quite a personal preference thing, you don't quite mention anything specifically about what is so good about the Metrowerks IDE other than it being cross platform and easy to author web pages in(!). I mean come on neither of those are core IDE functionality. I would have given you more credit if you had any pointed things to say about how the Metrowerks IDE is better but as it stands now you aren't very convincing.
    If you prefer makefiles, there are command line tools that provide the same compiler.
    Huh? This is not a big deal. Almost every compiler in the world can do this including VC++.
    Visual C++ can't compile it because of its poor compliance to the standard.
    Its quite obvious that you haven't tried VC++ 7.1 (Visual Studio.Net 2003). Its has close to 95% plus ISO C++ compliance. The only major feature missing is "export" which has now been almost officially labelled as a misfeature by the C++ gurus on the standards comittee and no major compiler will implement it. You mentioned having VC++ 6 and 7 and yet you being totally unaware of the fact the most VC++ programmers were long aware that VC++ 7.1 would have close to full compliance, leads me to think that you aren't much a VC++ user and perhaps only use it because you have to.
  59. Re:Troll...Troll...Troll... by 0x0d0a · · Score: 1

    You know, I like everything about Ocaml. Except for the fact that it's a *functional* language. If there were an imperative language with the same capabilities, I'd be in heaven (and so would masses upon masses of other developers).

  60. Why JVM? by be-fan · · Score: 3, Interesting

    I never really understood the whole point of the JVM. Why load this big program at every application launch? JIT still has more overhead than AOT compilation, in the real world, and most importantly, the huge memory footprint of the VM wreaks havoc on your caches.

    What's the purpose of the JVM?

    Dynamicity? No. Java is a aggressively static language. Meanwhile, highly dynamic languages like Lisp, Dylan, and Scheme (among others) can be efficiently compiled to native code.

    Speed? While in theory a JIT can be faster, its not the case in practice. In the "Great Computer Language Shootout" (which isn't bad, as far as these things go) Java has an average CPU rank of 14, behind other static languages like C, C++, Ocaml, and SML, and behind dynamic languages like Scheme and CL as well! In reality, Java can only get within 90% of the speed of C for inner-loop numeric-type stuff (which lends itself to JIT optimization).

    Flexibility? Java is highly inflexible. Its almost as as inflexible as C. It requires you to manually specify pretty much everything. You even have to do manual boxing/unboxing! Java is so highly structured, it should be compilable to native code that hits 90% the speed of C, without a very smart optimizer at all.

    Safety? Given Java's lack of pointer types, it shouldn't need a JVM monitoring it to be safe. Again, there are lots of safe languages (Haskell, Clean, and the aforementioned dynamic languages) that don't require a runtime monitor.

    Actually, I don't see much of a point in Java at all. Its got statically typed, but can't use that advantage to be as fast as C++. It runs in a VM, but can't use that advantage to be as dynamic as Python. Its syntax isn't any easier to use than something like Dylan (kinda like Lisp with a Pascal syntax) or Python. It doesn't have the development environment advantages of Smalltalk. Heck, its not even a very good compromise language ---- Dylan is as easy, often faster, and more powerful, Python is much easier (and thanks to Psyco) often as fast, C++ is much more powerful, as well as much faster, etc.

    --
    A deep unwavering belief is a sure sign you're missing something...
    1. Re:Why JVM? by krumms · · Score: 1

      Hey hey,

      - Dynamicity? No.

      I don't think 'Dynamicity' is a word. But hey, enlighten me?

      - Flexibility? Java is highly inflexible. Its almost as as inflexible as C.

      Nup, not even. See 'instanceof' - which, although considered hackish among OOP elites, gives volumes compared to using void pointers in C. Then there's the whole polymorphism thing, but hey - C is procedural.

      - Safety? Given Java's lack of pointer types, it shouldn't need a JVM monitoring it to be safe.

      Someone correct me if I'm wrong, but AFAIK the JVM acts as a sandbox for Java applications/applets, stopping those which don't have the necessary permissions for privileged operations. This adds volumes to safety.

      You also forgot the biggie: portability. C and C++ are portable to a degree, but require recompilation. Java you can compile and deploy wherever the hell you want and it will run. Run, but not necessarily work - hence the "Write once, test everywhere." catch phrase that people love to throw around. However, it's certainly the right approach to take for portable code (i.e. running it on a virtual machine).

      Python is actually a little more painful wrt cross platform development, since certain modules tend to have bits and pieces that simply don't exist on other platforms - something I'm yet to encounter with Java. Other modules exist but tend not to work too well. I've never touched Dylan, and have heard very little of it, so I can't comment there.

      To cut a long story short, Java can be natively compiled (see gcj - the point of the story, really). But it's generally not. That way, your programs will run in places they otherwise wouldn't run.

      If you want speed, get Linux and gcj it (never actually tried gcj trolls - sue me if it sucks) - otherwise, live with it.

    2. Re:Why JVM? by the+eric+conspiracy · · Score: 4, Informative

      Dynamicity? No. Java is a aggressively static language.

      Static types perhaps, but very dynamic when it comes to linking. Java has a lot of support for things like dynamic class loaders that lead to a very nice plug-in architecture, and extreme flexibility when it comes to deployment of code updates to a running application. Not to mention fun with diddling bytecodes on the fly.

    3. Re:Why JVM? by be-fan · · Score: 1

      I don't think 'Dynamicity' is a word. But hey, enlighten me?
      >>>>>>>>
      It's not a word. But I'm referring to how dynamic the language is. In Java, dynamic method invocation is very limited --- just basic single argument polymorphism. Other languages have much greater dynamic capabilities: For example, in Dylan (chosen because its syntax is easier for most people to follow), I can do the following:

      let vec = make(, size: 100); // ...fill vector...
      for(i from 0 below 100)
      do-foo(vec[i]);
      end;

      Now, this will go through the vector, and call the appropriate version of do-foo for each time in the vector. The cool thing is that it doesn't matter what the types in the vector are, or how they're related. If they have a do-foo() defined for their class, the runtime will do the right thing automatically. In Java, to get the same effect, you'd have to use check to type of each variable, cast it to the right type, then call do-foo() for each type that could be in the vector.

      Nup, not even. See 'instanceof' - which, although considered hackish among OOP elites, gives volumes compared to using void pointers in C. Then there's the whole polymorphism thing, but hey - C is procedural.
      >>>>>>>>>
      I said "almost" as inflexible as C. Certainly, its not any more flexible than C++. But either way, its not what I mean by flexible. Now, let's continue the previous example. The last Dylan example would run rather slowly, about at the speed the "giant switch on types" Java version would run. Now, if you don't need to store multiple types in the same vector, you can simply use a limited type. Just change one line to:

      let vec = make(limited(, of: ));

      Now, as long as there is a do-foo() method defined for integers, the compiler will automatically specialize (think templates in C++) for the type, detect it can now statically dispatch the do-foo() method (because the argument will always be an ) and most likely inline the do-foo() method into the loop. As a result, the loop will benchmark within spitting distance of C++ using the vector template.

      Someone correct me if I'm wrong, but AFAIK the JVM acts as a sandbox for Java applications/applets, stopping those which don't have the necessary permissions for privileged operations. This adds volumes to safety.
      >>>>>>>>>
      It only needs to do security checks because it is a platform as well as a language. In a natively compiled language, those security checks would be handled by the underlying OS. The main thing the underlying OS can't do is memory checking, which is why the JVM does bounds checks and whatnot. But compiler technology has advanced so far that you don't need something like the JVM to look at each memory access before allowing or disallowing it. Lots of safe languages (again, Lisp, Dylan, even C in the case of the SAFEcode project) are compiled to native code, with the compiler emiting only a few bounds checks here and there.

      You also forgot the biggie: portability. C and C++ are portable to a degree, but require recompilation.
      >>>>>>>
      Lots of languages are natively compiled and fully portable at the same time. The requirement for portability isn't running on a JVM, but preventing platform-specific pointer manipulation, as well as specifying sizes for various objects. Again, there are lots of other languages that do this! Heck, even C++ is pretty good at this, as long as you avoid "implementation specific" operations (which are clearly marked as such). The only reason that Java seems more portable is the giant standard class library. You can get largely the same result by using Qt and some well chosen libraries like ACE.

      If you want speed, get Linux and gcj it (never actually tried gcj trolls - sue me if it sucks) - otherwise, live with it.
      >>>>>>>>>
      GCJ is pretty bad, not any faster than most JVMs.

      As for living with it, I

      --
      A deep unwavering belief is a sure sign you're missing something...
    4. Re:Why JVM? by be-fan · · Score: 2, Informative

      I hate you slashdot. Now, let's try this with the code samples in place?

      I don't think 'Dynamicity' is a word. But hey, enlighten me?
      >>>>>>>>
      It's not a word. But I'm referring to how dynamic the language is. In Java, dynamic method invocation is very limited --- just basic single argument polymorphism. Other languages have much greater dynamic capabilities: For example, in Dylan (chosen because its syntax is easier for most people to follow), I can do the following:

      let vec = make(<vector>, size: 100);
      // ...fill vector...
      for(i from 0 below 100)
      do-foo(vec[i]);
      end;

      Now, this will go through the vector, and call the appropriate version of do-foo for each time in the vector. The cool thing is that it doesn't matter what the types in the vector are, or how they're related. If they have a do-foo() defined for their class, the runtime will do the right thing automatically. In Java, to get the same effect, you'd have to use check to type of each variable, cast it to the right type, then call do-foo() for each type that could be in the vector.

      Nup, not even. See 'instanceof' - which, although considered hackish among OOP elites, gives volumes compared to using void pointers in C. Then there's the whole polymorphism thing, but hey - C is procedural.
      >>>>>>>>>
      I said "almost" as inflexible as C. Certainly, its not any more flexible than C++. But either way, its not what I mean by flexible. Now, let's continue the previous example. The last Dylan example would run rather slowly, about at the speed the "giant switch on types" Java version would run. Now, if you don't need to store multiple types in the same vector, you can simply use a limited type. Just change one line to:

      let vec = make(limited(<vector>, of: <integer>));

      Now, as long as there is a do-foo() method defined for integers, the compiler will automatically specialize <vector> (think templates in C++) for the type, detect it can now statically dispatch the do-foo() method (because the argument will always be an <integer>) and most likely inline the do-foo() method into the loop. As a result, the loop will benchmark within spitting distance of C++ using the vector<int> template.

      Someone correct me if I'm wrong, but AFAIK the JVM acts as a sandbox for Java applications/applets, stopping those which don't have the necessary permissions for privileged operations. This adds volumes to safety.
      >>>>>>>>>
      It only needs to do security checks because it is a platform as well as a language. In a natively compiled language, those security checks would be handled by the underlying OS. The main thing the underlying OS can't do is memory checking, which is why the JVM does bounds checks and whatnot. But compiler technology has advanced so far that you don't need something like the JVM to look at each memory access before allowing or disallowing it. Lots of safe languages (again, Lisp, Dylan, even C in the case of the SAFEcode project) are compiled to native code, with the compiler emiting only a few bounds checks here and there.

      You also forgot the biggie: portability. C and C++ are portable to a degree, but require recompilation.
      >>>>>>>
      Lots of languages are natively compiled and fully portable at the same time. The requirement for portability isn't running on a JVM, but preventing platform-specific pointer manipulation, as well as specifying sizes for various objects. Again, there are lots of other languages that do this! Heck, even C++ is pretty good at this, as long as you avoid "implementation specific" operations (which are clearly marked as such). The only reason that Java seems more portable is the giant standard class library. You can get largely the same result by using Qt and some well chosen libraries like ACE.

      If you want speed, get Linux and gcj it (never actually tried gcj trolls - sue me if it sucks

      --
      A deep unwavering belief is a sure sign you're missing something...
    5. Re:Why JVM? by Bodrius · · Score: 2, Interesting

      If you're looking for the strengths of Java, I think you should ask what was Java created for in the first place?

      If I understand the myth/history correctly, it was made to run arbitrary code from an arbitrary source in an arbitrary environment, in a safe manner.

      Sun needed something to load up additional code within a program which the original programmer didn't know anything about, get it from somewhere in the network at runtime, then run it in anything from a toaster to a cable-box to a PC to a cell-phone to a refrigerator.

      And then somehow control the risk in that situation.

      Dynamicity? Depends on what you mean with that word. Java is very strict about its static typing. When people talk about Java being "dynamic", I think they usually talk about dynamic class-loading.

      Speed? I don't think speed has ever been a case for Java, except in the web-development community where it competes with Perl and PHP, and even then it lags behind other features.

      Flexibility? Once more, it's not about the type-system. It's about loading arbitrary code into your application server without shutting it down, or worrying too much that the code will crash your system. It's about then taking that code and running it somewhere else, in other hardware, without making any changes.

      Safety? The JVM is not there to check you're not messing up your pointers. It's there to check your bytecode is valid, has permission to do what it's supposed to do, and doesn't mess with anything it shouldn't.

      It's there so that class you downloaded from an unknown source in Ukraine doesn't steal your credit info and reformats your hard drive because hey, it doesn't have permissions to do so!

      Java is a language for a hostile (network) environment, where your code cannot trust other code any more than it has to. The main role of the JVM is not to be a portable interpreter for a friendly programmer language, it's to be a protective paranoid Big Brother for a bureaucratic programming language.

      --
      Freedom is the freedom to say 2+2=4, everything else follows...
    6. Re:Why JVM? by be-fan · · Score: 1

      If you're looking for the strengths of Java, I think you should ask what was Java created for in the first place?
      >>>>>>
      Not looking for the strengths, but why it requires a VM.

      Flexibility? Once more, it's not about the type-system. It's about loading arbitrary code into your application server without shutting it down, or worrying too much that the code will crash your system.
      >>>>>
      But why does it require a VM? C/C++ can do the dynamic code loading via dlopen() and kin, and Lisp (and kin) do dynamic class loading while being safe. Both do this without a VM.

      It's about then taking that code and running it somewhere else, in other hardware, without making any changes.
      >>>>>>>>
      How useful is this? If the code is source portable (something achieved by many languages) what's the big deal about one compile per platform? Or even a compile-at-install time setup?

      Safety? The JVM is not there to check you're not messing up your pointers. It's there to check your bytecode is valid, has permission to do what it's supposed to do, and doesn't mess with anything it shouldn't.
      >>>>>>>>.
      Permissions is usually the domain of the OS kernel, not the language runtime. How is putting the thing in a VM any more secure than putting the code on a secure kernel?

      --
      A deep unwavering belief is a sure sign you're missing something...
    7. Re: Why JVM? by gidds · · Score: 1
      If the code is source portable (something achieved by many languages) what's the big deal about one compile per platform?

      The big deal is that unless you have the source, you're restricted to those platforms that the maker happens to support. Which is usually a depressingly small number, and if you're not running Windows XYZ, can be a pretty frustrating experience.

      Permissions is usually the domain of the OS kernel, not the language runtime. How is putting the thing in a VM any more secure than putting the code on a secure kernel?

      Flexibility. Can a secure kernel give different permissions to different parts of the same application, running in the same thread/process, based on where it was loaded from? Can such an application define its own security restrictions on the fly, to its own level of detail?

      --

      Ceterum censeo subscriptionem esse delendam.

    8. Re:Why JVM? by bbn · · Score: 1

      A few points. While it is true that an OS could provide most of the security mechanism that the JVM implements, I know of no such OS.

      Can you configure MS Windows (any version) so that you will trust my .exe file not to do something very bad with your computer? If you think you can, you are a fool. But you can safely run my applet in your web browser.

      The ability of Python (and probably Dylan - I don't know it) to call any function on any object comes at a price. You will first discover your errors at runtime instead of compile time. You can also do the same thing in java using the reflection API if you really must.

      QT is not a standard C(++) library. To make C programs portable you need extra tools, which are not always free. As result most C programs written for the windows platfrom are not portable (even if yours might be). As you said, some of the power of java comes from its immense bundled library which happens to include a portable window toolkit.

    9. Re:Why JVM? by sbszine · · Score: 1

      Portability? Yes.

      This is the big one for me (any presumably many others) with any language used for large-scale web development.

      --

      Vino, gyno, and techno -Bruce Sterling

    10. Re:Why JVM? by be-fan · · Score: 1

      Lots of languages are natively compiled, but fully portable. Its really more a matter of minimizing the cases of undefined behavior and providing a sufficient standard library, than running in a VM.

      --
      A deep unwavering belief is a sure sign you're missing something...
    11. Re:Why JVM? by khuber · · Score: 2, Insightful
      Java has a set of tradeoffs just like any other language. In particular it's reasonably fast, has decent libraries, and has static type checking and a syntax familiar to developers used to procedural languages.

      Of course it's not The Ultimate Computer Language, but it's good enough for a lot of applications. OCaml, SML, Haskell, Clean, Dylan, and Scheme are largely academic/research languages with little real world use because their programming models are too hard to deal with, among other reasons.

      Smalltalk is one of my favorite languages, and I admire its offshoot Self, but it was in the wrong place at the wrong time, was too expensive, and has problems with nonstandard libraries. Python is nice, but slow, and has an uneven library. C++ is a syntax nightmare. I don't know what to think about Dylan, I still think of it in its prefix form.

      I'm sure you understand that programming languages don't gain widespread use due to their theoretical elegance, or Cobol must be brilliant and ML must lack expressive power. I often call Java the Cobol of the 21st century, because I think that is a good analogy for its place in software development.

    12. Re:Why JVM? by sbszine · · Score: 1

      I take your point, and as a Perl fan I don't argue that it can be done. But Java is competing mainly with C and VB which don't port without at least some tweaking (or OS-specific code in the case of C).

      --

      Vino, gyno, and techno -Bruce Sterling

    13. Re: Why JVM? by code_martial · · Score: 1
      If the code is source portable (something achieved by many languages) what's the big deal about one compile per platform?


      The big deal is that unless you have the source, you're restricted to those platforms that the maker happens to support. Which is usually a depressingly small number, and if you're not running Windows XYZ, can be a pretty frustrating experience.

      Which is exactly the reason why Free Software is important. Why should the users have to pay a performance penalty just so that Big Bucks Inc. can hide their "Intellectual Property"?

      Flexibility. Can a secure kernel give different permissions to different parts of the same application, running in the same thread/process, based on where it was loaded from?

      Possible by breaking down applications into libraries and setting appropriate permissions on those libraries. Can't r-x a library, won't load it!

      Can such an application define its own security restrictions on the fly, to its own level of detail?

      Why can it not?
    14. Re:Why JVM? by elodan · · Score: 1
      Actually, I don't see much of a point in Java at all

      You've missed a few things.

      • Security constraints inbuilt in the language - great for things like applets, which need to run in a sandbox
      • PORTABILITY - this is the big one, and basically the main reason for Javas popularity. "Write once, run anywhere" may be more myth than reality, but it's a sight better than C/C++, whilst retaining the other advantages inherent in the language.
      Java is an excellent example of a language that is jack of all trades, master of none.

      The thing about Java is that it's QUITE good at just about everything, without being fantastic at any one particular them.

    15. Re:Why JVM? by Phillip2 · · Score: 1

      "Why load this big program at every application launch?"

      Much of the loading time is loading classes not the JVM per se. These are loaded on demand, rather than for every application.

      "Safety? Given Java's lack of pointer types, it shouldn't need a JVM monitoring it to be safe. Again, there are lots of safe languages (Haskell, Clean, and the aforementioned dynamic languages) that don't require a runtime monitor."

      Java's type system is not as rich as the other type systems that you mentioned. It needs some checking at runtime (ClassCast, and ArrayBounds).

      The second point is that you are assuming that you trust the compiler. The original idea of Java was mobile code, and all that jazz. If you do not trust the compiler then you have to do more checks at runtime, even though they could and have been checked at compile time.

      Java is a reasonable compromise. It was also there at a good place, and good time. Some of the original motivations for Java (mobile code) seem irrelevant now. This is way things work.

      Phil

    16. Re:Why JVM? by be-fan · · Score: 1

      Okay, I'll grant that most of the functional languages are too esoteric for a COBOL replacement, and C++ is too hard for a COBOL replacement. But what about Dylan? Its more OO than Java (OO like Smalltalk), more powerful (in a way) than C++, faster than Java (most of the time), and easier than Java (the prefix notation was dumped in favor of an infix notation). The thing missing is a large standard library.

      --
      A deep unwavering belief is a sure sign you're missing something...
    17. Re:Why JVM? by Bodrius · · Score: 1

      If you're looking for the strengths of Java, I think you should ask what was Java created for in the first place?
      >>>>>>
      Not looking for the strengths, but why it requires a VM.

      ----

      It doesn't require a VM to do a single thing, it requires a VM to do all these things at once. Specifically, all these things along with the sandbox model.

      ----
      >>> Permissions is usually the domain of the OS kernel, not the language runtime. How is putting the thing in a VM any more secure than putting the code on a secure kernel?

      I don't think it is. I don't see how it would be. But it so happens you rarely have a secure kernel in this sense, and people rarely are willing to throw away your kernel.

      In a sense the VM IS the secure kernel. It provides certain guarantees of security in different platforms.

      A very paranoid, secure kernel, which just happens to run on top of your real kernel, be it Linux, AIX, Windows, or whatever, without requiring you to switch to a brand-new OS that provides these permissions, or to submit your other applications to this sort of paranoia.

      And then you can take your VM and your apps and move them somewhere else, without having to map security/permissions frameworks, etc.

      I mean sure, you could just make your own OS to do this "properly", if you're willing to drop your old kernel and applications and deal only with people who flock to your new OS.

      --
      Freedom is the freedom to say 2+2=4, everything else follows...
  61. Please Read Parent!!! by 0x0d0a · · Score: 3, Funny

    It is extremely important that *all* developers read the parent post. This IDE may have the most groundshaking features *ever*!

    Let's take a look:

    Automatic generation of body files

    Hot *damn*! It writes my code for me!

    Source code reformatting

    Then it reformats it to fit whatever standard I need!

    Automatic code fixing

    Then it *debugs* the code!

    Application builder

    Finally, it *builds* the program I'm working on!

    All this, from a piece of software that the ignorant layman might consider no more than a wrapper for an editor and a compiler.

    Truly, a groundbreaking achievement. :-)

  62. load times *do* matter in the real world (tm) by mccrew · · Score: 4, Insightful
    Do people sit there and start and exit applications continuously?

    For those who start up their IDE in the morning and close it down in the evening (or at the end of the week, whatever), then long startup times are just a minor cost of doing business.

    For someone like me, however, who is ambivalent about this IDE or that IDE, and whose fingers are too hard-wired for one particular editor to use the brain-damaged editors foisted by most IDEs, startup time IS a big issue. When you are going in and out of tools all day long, it becomes a major annoyance to have to wait for the darned thing to start up.

    --
    Hey, Windows users, there is no such thing as "forward" slash, there is only slash and backslash.
    1. Re:load times *do* matter in the real world (tm) by keyslammer · · Score: 1

      When you are going in and out of tools all day long, it becomes a major annoyance to have to wait for the darned thing to start up.

      Yup, And there's also stuff like daemons started from inetd, tools launched from cron jobs and shell scripts and data manipulation programs - the general UNIX philosophy favors launching these kinds of things as short-lived processes.

      I know java advocates who would probably recommend that all the other code that interfaces with these things just be written in java and run as a long-lived JVM process, but to me it seems kind of silly to try to rebuild your entire world in Java to work around its shortcomings.

    2. Re:load times *do* matter in the real world (tm) by Anonymous Coward · · Score: 0

      >>>>Hey, Windows users, there is no such thing as "forward" slash, there is only slash and backslash

      Hey you K-RAD 31337 *NIX D00D,

      English is a "living", evolving language as most any literate person could tell you. The word "blog" didn't exist ten years ago, yet I would guess that you wouldn't try to deny its existence. Most people I know will know what I'm talking about when I say "forward slash". Should the word not exist just because its not in your vernacular?

      Your "holier-than-thou" attitude disgusts me.

      From http://www.computerhope.com/jargon/f/forwards.htm:

      Forward slash
      The name of the "/" character on the computer keyboard. This slash is also commonly referred to as whack when talking about a directory or web address, for example "http://www.computerhope.com" is the same as h - t - t - p -- colon -- whack -- whack ... Forward slashes are also commonly used to describe a network address for example //computerhope would map to the computer "computerhope".

      Also see: Back slash, Keyboard definitions,

    3. Re:load times *do* matter in the real world (tm) by ChannelX · · Score: 3, Informative

      I still dont get why you need to restart Eclipse to go into another editor. Run them both at the same time. IIRC the Eclipse editor will detect the new file changes.

      --
      My blog: http://jkratz.dyndns.org/~jason/blog/
  63. exactly... mod up by Anonymous Coward · · Score: 0

    thank you.

  64. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0

    Delphi is cross platform.

    C++ is more cross platform. It is not the commitees fault if you can't program to the standard.

    The kind of work you do is insignificant enough that the use of java does not have any real effect anyway.

  65. Eclipse has great online help by The+Revolutionary · · Score: 1

    Select "Help:Help Contents". There are very helpful tutorials with lots of screen captures demonstrating its basic workings. Then you can move onto the "Tasks" section. At least for Java development I found the online help to be quite sufficient. You definitely want to go through the tutorials though instead of first trying to import a large existing project. CVS support is great too.

  66. GCJ performance is a myth. Benchmarks inside. by lokedhs · · Score: 5, Informative
    In general, GCJ compiled code is slower than the smae code running in the JVM. The only speed advantage comes from the startup times.

    Often the JVM will out-perform GCJ with a factor of 3. Check out the numbers on this page.

    I fail to see why people want to run a GCJ compiled evrsion of a development tool and run at at one third of the speed of the JVM, just in order to save a few seconds of startup time.

    1. Re:GCJ performance is a myth. Benchmarks inside. by GigsVT · · Score: 1

      Because pretty much the main drawback of Java is that it severly limits which platforms you can distribute to, ironically. Write once, run nowhere! The only other option is distributing a 50 meg JVM with every app, and increasing support costs by having to walk people through tedious installation procedures, for the JVM and your app.

      If you can compile a native binary, you can distribute it to any binary compatible platform, regardless of what other software they have installed. You don't have to explain CLASSPATH to your users. You don't have to explain why they can't type "java filename.class", but instead must type "java filename".

      GCJ is the only hope Java has of actually being more than an acedemic curiosity, and "something that Sun used for a few apps".

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    2. Re:GCJ performance is a myth. Benchmarks inside. by Anonymous Coward · · Score: 0

      The only reason GCJ is slower is because it uses a very simple dispatch mechanism.

      It's basically identical in speed to a C++ program with no inlining, no templates and all functions declared virtual.

      One of the advantages is smaller overheads (startup time, memory usage while running). That makes more of a difference than microbenchmark results in many cases.

      Consider the case of writing a command-line tool, assuming for some bizarre reason you want to do it in Java...

    3. Re:GCJ performance is a myth. Benchmarks inside. by lokedhs · · Score: 1
      Umm, did you even check what kinds of benchmarks that was shown in the linked article? They are certainly more than micro-benchmarks.

      Also, where are the benchmarks to back up your claim?

    4. Re:GCJ performance is a myth. Benchmarks inside. by Tom7 · · Score: 3, Informative

      I checked out the numbers, but GCJ seems to be just barely edged out by Hotspot in most cases. Considering that GCJ is free and allows you to distribute native binaries, that's pretty good.

      They don't have figures for memory usage, installation profile, etc., and I bet in those areas GCJ beats Hotspot for end-users. And you can't beat an install with no library dependencies.

    5. Re:GCJ performance is a myth. Benchmarks inside. by lokedhs · · Score: 3, Insightful
      Because pretty much the main drawback of Java is that it severly limits which platforms you can distribute to, ironically.
      Let's assume for a second that you are correct, and Java limits the platforms you can distribute to. Tell me again exactly how GCJ improves on that?
      The only other option is distributing a 50 meg JVM with every app
      The JRE is 13 MB last I looked. And you only have to download it once and it works for all your Java apps. Most Java applications are offered in a package both with and without a JRE. For example DbVisualizer (I wholeheartly recommend this database tool, very good and supports pretty much all databases) and IntelliJ IDEA (the best development environment ever).
      and increasing support costs by having to walk people through tedious installation procedures, for the JVM and your app.
      The apps I showed as examples are one-click installable. Most others are too. Your statement was completely wrong and should have had a huge FUD warning sign all over it.
      If you can compile a native binary, you can distribute it to any binary compatible platform, regardless of what other software they have installed.
      GCJ requires the GCJ runtime libs last I messed with it. Exactly how is this different from installing JRE?
      You don't have to explain CLASSPATH to your users.
      Read the documentation on the Java site. Use of the CLASSPATH environment variable has been stringly discouraged ever since the 1.2 days. I hardly ever use it myself, although it's nice to have if I need it (mainly when developing and trying out different libraries).
      You don't have to explain why they can't type "java filename.class", but instead must type "java filename".
      I have a better solution: Just double-click on the app! Yes, can you believe it? Ever since 1.2 there has been support for executable JAR's. When you install Windows .jar files are automatically associated with the Java runtime so that you can double-clik on the app to start it. If you have the stupid "hide extensions" feature enabled it looks just a normal app. I believe MacOSX does the same (although I haven't tried). Enabling the same in Nautilus is just a couple of mouse clicks away. From the command like you do have to type "java -jar the_application.jar".
      GCJ is the only hope Java has of actually being more than an acedemic curiosity, and "something that Sun used for a few apps".
      Maybe you should leave the academic environment for a while and realise that Java is heavily used for developing very real and existing applications in Java. Also check out the statistic on programming language usage with PostgreSQL. I'm not so sure I should believe your asstertion that Java isn't used oustide of academic institutions.

      Are you even aware of the number of web sites exist whose server code is completely written in Java? Most likely you visitied a couple before you came here today.

    6. Re:GCJ performance is a myth. Benchmarks inside. by DavidNWelton · · Score: 2, Interesting

      (1) "Because pretty much the main drawback of Java is that it severly limits which platforms you can distribute to, ironically."

      (2) "Let's assume for a second that you are correct, and Java limits the platforms you can distribute to. Tell me again exactly how GCJ improves on that?"

      Because GCJ runs on all the platforms gcc does, which is pretty much everything out there. Java officially doesn't run on all kinds of platforms. Linux is only supported on x86 and ppc, IIRC, not to mention the various BSD's...

      Also, GCJ is free software, so that means that it if there's the will, people can and will port it.

    7. Re:GCJ performance is a myth. Benchmarks inside. by atgreen · · Score: 1

      gcj is no silver bullet, but there are definitely classes of useful programs that run almost three times faster with gcj than with the latest IBM JRE. The Eclipse java compiler is a good example of one (and this is after factoring out the fast start-up). Look here for a version you can check out and build with gcj.

    8. Re:GCJ performance is a myth. Benchmarks inside. by GigsVT · · Score: 1

      number of web sites exist whose server code is completely written in Java

      A completely different matter. I'm talking about distributing Java programs for local execution.

      It seems a lot of the rest you are talking about related to Windows. I don't use Windows really, so I can't comment. All I know is that whenever I see an app written in Java, I look elsewhere. I've tried and tried, but it still takes a whole lot of time getting any sort of Java app up and running. Java to me means "you'll have to dick with this for several hours and install closed source software if you want to run it".

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    9. Re:GCJ performance is a myth. Benchmarks inside. by juhaz · · Score: 1

      Your definition of "factor of three" seems to be bit different than that of rest of the planet.

      From your link (gcj vs. best JVM in each):

      SciMark 2.0 composite score of different benchmarks
      gcj 109 vs. HotSpot Client 111 (gcj 1.8% slower)

      Linpack 1000x1000 MFlops
      gcj 162 vs. IBM JDK 201 (gcj 24.1% slower)

      Linpack 500x500 MFlops
      gcj 176 vs. IBM JDK 170 (gcj 3.5% faster)

      Sieve (number of operations/10s)
      gcj 6823 vs. IBM JDK 7205 (gcj 5.6% slower)

      So. where are those numbers with gcj over three times slower instead of few %?

      And those numbers are year and half old, all players have had quite a lot of time to evolve.

    10. Re:GCJ performance is a myth. Benchmarks inside. by atgreen · · Score: 1

      Those are great benchmarks to tune for in order to fool people. Here's a real world application, the Eclipse java compiler (called ecj here)...

      This is a typical native ecj build (of rhino, in this example). I used the
      -repeat option to try to factor out any "fast start" advantage of the native
      executable.

      $ time find ./ -name \*.java | xargs ecj -bootclasspath /home/green/tools/FSF/HEAD/i/share/java/libgcj-3.4 .jar -repeat 5 -log out.log
      Repetition 1/5
      Repetition 2/5
      Repetition 3/5
      Repetition 4/5
      Repetition 5/5

      real 0m7.136s
      user 0m6.660s
      sys 0m0.400s

      Here's the same compiler being run with IBM's jre...

      $ time find ./ -name \*.java | xargs java org.eclipse.jdt.internal.compiler.batch.Main -bootclasspath /home/green/tools/FSF/HEAD/i/share/java/libgcj-3.4 .jar -repeat 5 -log out.log
      Repetition 1/5
      Repetition 2/5
      Repetition 3/5
      Repetition 4/5
      Repetition 5/5

      real 0m20.863s
      user 0m19.880s
      sys 0m0.710s

    11. Re:GCJ performance is a myth. Benchmarks inside. by lokedhs · · Score: 1
      You can't have tried very hard then, since pretty much everyone seems to be able to install LimeWire on their systems.

      Much of what you sait made sense back in the 90's. These days it's a completely different picture.

    12. Re:GCJ performance is a myth. Benchmarks inside. by Anonymous Coward · · Score: 0

      downside: GCJ isn't Java compliant. Most Java applications won't run due to a lack of libraries.

      Until then, I'll place my faith in Sun's JVM.

    13. Re:GCJ performance is a myth. Benchmarks inside. by GauteL · · Score: 1

      You fail to mention that those benchmarks are from January 2002. They are thus 1.5 years old.

      GCJ is very much a moving target under a lot of development, while the JVM is reasonably stable and have much greater demands about backwards compatibility i.e.

      How things compare right now is difficult to say, but it is not unreasonable to think that GCJ might have improved more than the JVM.

    14. Re:GCJ performance is a myth. Benchmarks inside. by greenrd · · Score: 1
      The only other option is distributing a 50 meg JVM with every app, and increasing support costs by having to walk people through tedious installation procedures, for the JVM and your app.

      Three words: Java Web Start.

    15. Re:GCJ performance is a myth. Benchmarks inside. by g_lightyear · · Score: 1

      Just a sidenote; this whole discussion is getting relatively misinformed.

      1. Keep in mind that up until now, most of the work going on has been to getting GCJ using the same backend as the existing C++ compiler. Now that they share a backend, they can start focusing on other optimizations.

      2. A whole raft of optimizations - including things like inlining - come from tree-level work that has yet to really be done in GCJ. Even more important, there are currently a set of optmizations on the tree structure that are only done if you compile *source*, and not *bytecode*. So there's room for improvement here.

      3. The move to tree-ssa should yield additional transform optimizations that should benefit *ALL* of GCC's tools, and java gimplification should come along with it. This will do things like optimize out empty functions, amongst a billion other things.

      4. The way that Java gets turned into native code has some 'unusual bits' that are fundamental to the process of building that tree which are changing. This includes things like how nonvirtual calls get done (i.e., they're called indirectly)

      5. Keep in mind that there's loads of wonky bits about all of this - including the need for some systems to use thread local allocation *whenever* possible, or suffer performance degradation (you know who you are). Getting it to recognize when something will only be used thread-local and allocate it as such is important, and has huge performance impact in multithreaded situations.

      I mean, this whole discussion has gone *way* out of hand. It's come to the stage where GCJ can do some pretty impressive stuff - but it *is* still in its infancy, and does not yet benefit from every optimization of its aged and wizened peer languages' implementation.

      People are working very hard to change that, though, and as anyone who used it a year ago will attest to, the performance is improving, alongside the functionality, on a very promising rate. Some applications *do* regularly see huge performance increases, and some *do* see performance degradation. As the implementation of the libgcj runtime, Classpath, and the gcj compiler itself improve, we should see improvement. The fact that we see *parity* in many places with a compiler *so young* is being overlooked by everyone here, and it shouldn't be.

      It took Sun *years* to get the JDK performing well, and to fix some of the stupid things it did. Given time, we can look forward to good things from GCJ, and I hope that everyone will sit back and realize, just for a moment, what a true accomplishment it is.

      --
      -- A mind is a terrible thing.
    16. Re:GCJ performance is a myth. Benchmarks inside. by Ed+Avis · · Score: 1

      There are other advantages besides startup time. The page you link to is Slashdotted or otherwise down, but I assume 'the JVM' means Sun's proprietary JVM. GCJ, on the other hand, is free software and uses free class libraries.

      --
      -- Ed Avis ed@membled.com
    17. Re:GCJ performance is a myth. Benchmarks inside. by Ed+Avis · · Score: 1

      I think you can use GCJ to generate a statically linked and therefore self-contained executable. I agree that having to set CLASSPATH is a pretty limp reason to avoid Java (just distribute your app using something like the JPackage project so that dependencies and setup of necessary libraries can be handled automatically).

      Using the JVM or JRE you are limited to platforms where it has been ported; as far as I know gcc runs on a wider range of platforms than that.

      --
      -- Ed Avis ed@membled.com
  67. Re:Microsoft's IDEs? You have GOT to be kidding by Earlybird · · Score: 1
    • I admit I haven't tried Eclipse yet, but I would be very surprised if it were better than CodeWarrior.

    You will be surprised.

    Maybe not for C/C++ development: The Eclipse support (which is implemented, just the Java stuff, exclusively with plug-ins) currently consists of just the basics: syntax-aware editor, code outline, debugger, makefile support. There are no source code tools, no code completion, no cross-referencing tools (Doxygen/JavaDoc lookup, etc.).

    The Java personality, however, is extremely complete and a wonder to use. It's in the little things, like the wonderful code completion, the cross-referencing with JavaDoc, the refactoring tools.

    Eclipse is well-known for its neat source tools, some of them more intuitive than you would expect. Drag a class source file to another directory, for example, and it will not only update the file's package declaration, it will modify all dependent files' references to reflect the new location. Eclipse maintains an internal AST (abstract syntax tree) of the source code, so its source code manipulations are not based on text pattern matching, and the modifications it performs maintain formatting and consistency.

    Among the more luxurious source-level tools are:

    Rename -- renames any identifier and updates all uses of the identifier across all dependent projects.

    Move -- moves a method into a different class, that class matching one of the arguments to the class. For example, in the class Foo, you can move the method execute(Bar b) into the class Bar; it will be implemented in Bar as execute(Foo f) (or without the Foo argument if not needed), and the original class will retain the method as a stub call to the new, moved method.

    Push Down/Pull Up -- moving methods/fields up and down in the inheritance hierarchy, with all dependencies maintained.

    Extract Interface -- takes one or more of a class' methods and puts them in an interface declaration.

    Extract Method -- you select a bit of code, Eclipse wraps it in a method with all dependent variables and exceptions in the declaration, replaces the original code with a method call, and optionally searches for similar patterns elsewhere to replace as method calls. I use this one daily.

    Among other favourites are Generate Delegate Methods (ideal for doing GoF "Decocator Pattern" classes), Generate Getter and Setter, Override/Implement Methods, Inline, and several tools to turn expressions into local vars, local vars into fields, and more.

    The notion of code completion is extended to encompass code repair: Warning/error markers provide interactive "quick fix" popups suggesting ways to fix/improve your code. Misspelled type name? Eclipse will suggest a list of possible types. Typed an unknown class? Eclipse will suggest to add an import for it. Unused identifier? Eclipse will suggest to remove it safely.

    These tools really help, and take the drudgery out of doing time-consuming changes such as renaming a class or method. It allows me to be more spontaneous about code changes -- if I move something I can always move it back, or somewhere else -- and concentrate less on syntax and more on code.

    Does CodeWarrior offer any such time-saving tools? To my knowledge the only IDE that comes close to Eclipse is IntelliJ IDEA, a Swing-based IDE which provides many of the same source tools (like intelligent renaming, moving, "quick fix" markers), an even some new ones (Make Method Static, Replace Constructor with Factory Method and others). IDEA also has a few other goodies, like code folding. But it's not free software, and it does not offer Eclipse's terrific plug-in API. And it's Swing.

  68. no they say it's fraster by Anonymous Coward · · Score: 0

    not unbelievable, super extra, makes WSAD actually usable fast. The WSAD team should first make Websphere run with less than a gig of ram before worrying about application speed. Yep IBM has the worst talent in the business.

    1. Re:no they say it's fraster by achacha · · Score: 1

      IBM tends to overengineer everything into obsolescence, they add so much obscurity and features that it becomes less usable with every "feature". OS2? VisualAge?

  69. Memory Usage vs Eclipse Running in JVM by SilentMajority · · Score: 1

    Did any of you get a chance to try it out and compare how much memory it uses? One of the annoyances about Java when compared to C is the total memory usage. So when apps like Eclipse written in Java can be compiled and if the memory usage is lower as a result, then that would make Java more attractive. I'm guessing that even a "hello world" will suck up a lot of memory for a Java console app compiled using GCJ because of required runtime library. Just a guess. Yes, memory is cheap but some of us are stuck with company-owned equipment we can't modify or we've already maxed out on upgrades.

    1. Re:Memory Usage vs Eclipse Running in JVM by thimo · · Score: 5, Informative

      A quick test (using an Eclipse 2.1.1 from eclipse.org):

      Eclipse 2.1.1 with JVM
      - Second start: 13 seconds
      - Memory Eclipse: 80 MB
      - Memory JVM: 65 MB

      Eclipse 2.0.1 without JVM
      - Second start: 9 seconds
      - Memory: 96 MB

      The download page seems to indicate you're downloading an Eclipse 2.1.0 version, but the about dialog says 2.0.1. Which one is it?

      Cheers,

      Thimo (back to coding in Eclipse 2.1.1 :)

      --
      Avoid the Gates of Hell. Use Linux!
  70. Re:Troll...Troll...Troll... by khuber · · Score: 1

    Delphi is cross platform. It does not run on very many platforms. There may be a partial Linux port, but it is Wintel-based. Where are the Solaris and AIX versions? The kind of work you do is insignificant enough that the use of java does not have any real effect anyway. Huh? Java is in wide use. Why do you think that is?

  71. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0
    At what magical speed does C/C++ become faster than handwritten assembly?

    Answer...none.

    It will always be slower, and thus unusable.

  72. Re:Troll...Troll...Troll... by khuber · · Score: 1
    Delphi is cross platform.

    It does not run on very many platforms. There may be a partial Linux port, but it is Wintel-based. Where are the Solaris and AIX versions?

    The kind of work you do is insignificant enough that the use of java does not have any real effect anyway.

    Huh? Java is in wide use. Why do you think that is?

  73. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0

    I was speaking about your 10 line java programs.

  74. Again wrong ! by Anonymous Coward · · Score: 0

    The "then" was definitively used in a temporal relation thus it's use is correct.

  75. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0

    right on, typical Java fanboy. The factor of assembly to C/C++ is miniscule compared to the bloat of Java. VB runs better.

    Compromises must be made sometime however.

    Like the compromise your parents made not aborting you in the womb.

    Now, you are just a useless toadie.

  76. Fast. Was:Startup sure, but how fast does it run? by atgreen · · Score: 3, Informative

    Eclipse contains a java compiler which you can also compile as a standalone app with with gcj (see http://sources.redhat.com/rhug). The gcj-compiled compiler is almost three times faster than the latest IBM JRE run version.

  77. Re:Looks great! by Anonymous Coward · · Score: 0

    Give eclipse a chance to ketchup.

    I don't understand. You want to give Eclipse a chance to become a fruit-based condiment that Americans put on French (or Freedom) Fries? How long do you anticipate that taking?

  78. Re:Troll...Troll...Troll... by pnatural · · Score: 1

    Java is still some 40 times faster than Python.

    And this is horse shit.

    What you meant to say was "for some tasks, java is faster than python, but python is clearly much faster for the vast majority of tasks that the programmer must solve. more importantly, however, python saves programmer time, which is far more expensive and valuable than CPU time."

    or something like that.

    if i wasn't so lazy today, i'd dig up the link to put you in your place. but you wouldn't believe it, so why bother?

  79. About to release these on BitTorrent by PourYourselfSomeTea · · Score: 1

    just give me a sec to download them

  80. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0

    There's nothing keeping you from writing procedural and object-oriented software in O'Caml.

  81. However, for interpreters.... by Anonymous Coward · · Score: 0

    However, for interpreters the core interpreter loop will never be left even if you go into a virtual function in the method being interpreted. That means that it's possible for cache locality and branch prediction to make interpreters faster than compilers for heavily OO applications with no I/O or kernel calls.

  82. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0
    C/C++ runs 5x slower than hand crafted assembly.


    Additionally, Java is faster than C++, as well as not being completely braindead. C++ is dying. C++ is no longer used in industry projects, and is passing into history. C++ jobs are becoming scarce. It is impossible for anybody to understand a C++ compiler perfectly. Lets not get into templates. Java, the faster, mole scalable, bug-free and far more secure solution has devastatingly won the argument at this stage.


    Plain old c will live in in systems software, but such software is essentially understood and uninteresting nowadays. Nothing new or exciting is done in systems software, kernels are merely gradually tweaked and patched (and of course endlessly bug fixed for the endless buffer overflows and pointer problems that c, the most insecure language ever, creates).


    If you want to get a job, son, the best thing you can do is stop your hippyish gcc ways and download a copy of j2se1.4.2.

  83. Re:Wrong by Anonymous Coward · · Score: 0

    What does "respoding" mean?

    It means to spode again, as in I went to the store and respoded her arse up and down the aisles, dumbass.

  84. BitTorrent url by PourYourselfSomeTea · · Score: 2, Informative
  85. Anger problem. by Anonymous Coward · · Score: 0

    Anger problem.

    1. Re:Anger problem. by Anonymous Coward · · Score: 0

      :-)

      That's right. I'm a random joe AC. I used to post slightly hostile things to Slashdot. Lately I've been trying to tone it down. Peace and love, man. I'm serious.

      Sometimes, I'll look at a post here, and I'll just say... "man.. that guy needs to relax." Or people will, in person, be in some heated and above all NOISY debate, and I'll wonder what it's all about.

      Let's all relax, 'how bout? It's funny. That's one of the phrases I end up saying the most IRL.

  86. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0

    LOL. It does not and you know it. C is near assembly language. Read up on some computer history, and you will see how close to the machine it is. Your ignorance is beautiful.

    C++ is dying.

    Mainframes are dying.

    Suuuure.

    And what are you going to say when templates are added to Java asshole.

  87. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0
    Jobs on monster:
    1. Java - 8355
    2. J2EE - 7227
    3. Unix - 4173
    4. SQL - 3989
    5. PHP - 3888
    6. Oracle - 3676
    7. ASP - 3309
    8. Windows - 2940
    9. Perl - 2587
    10. SQL Server - 1916
    11. Basic - 1874
    12. VB - 1670
    13. HTML - 1317
    14. DBA - 1198
    15. DB2 - 1021
    16. C - 979
    17. Mainframe - 874
    18. PL/SQL - 790
    19. Linux - 781
    20. WebSphere - 688
    21. C++ - 647
    22. Sybase - 645
    23. WebLogic - 545
    24. Cisco - 478
    25. C# - 358
    26. Apache - 244
    27. JMS - 105
    28. Informix - 101
    29. Tomcat - 77
    30. Delphi - 74
    31. MySQL - 60
    32. .NET - 17

    This is fairly damning of your "C++ is not dying" claims. Your "c is near assembly" claims are also laughable. It can't be near assembly, and reasonably portable. It therefore has to abstract away from machine code fairly significantly. Back in the day, I used to rewrite the c weenies' code in assembly, and laugh when they came back to find their app running (often) 4 or 5x faster.


    Learn about the current state of the computing industry, and about C yourself before spouting off.


    Oh and by the way, if you were remotely familiar with computer history, you would realise that the trend is towards greater and greater abstraction. The reason the days of C and C++ are drawing to a close are the exact same that the days of assembly were drawing to a close in the late 70's and 80's. The new solutions (C# and Java) are better in every concievable way, and offer far more rapid development with a more secure and bug free product at the end of it.

  88. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0

    Wow, for a smart guy you sure can't fucking count:

    from monster.com

    C++ - 2461
    Java - 3951

    Overall, the java jobs pay less also.

    There are a lot of VB jobs too, so I guess that means that you are not following the industry dickhead.

  89. Nooo!!!! by luekj · · Score: 1
    GTK+ Look out!!! Don't look at the eclipse!!!

    Dont' you know that no matter how fast it is looking straight into a solar eclipse with unprotected eyes can cause severe damage to your eyesight and possibly even permanent blindness

    For goodness sake, if GTK+ doesn't even have the sense to look away, is there hope for Quartz, or even the somewhat bumbling MFC/VB toolkits?!?!?

    We'll all be running blind!

    The horror, agony, apathy.

    ....

    --
    Many Thanks,

    Luke

  90. Not all of them by MillionthMonkey · · Score: 1

    The javac compiler is in Java (and can be accessed programatically at runtime on systems where javac is around). So your statement is true for the compiler.

    Last I heard java.util.zip was a thin JNI wrapper around the ZLIB library. (They were talking about reimplementing in Java, but I don't know if they ever did.) So jar is mostly C except for a thin Java wrapper.

    Of course the JVM itself is written in C. If it were written in Java, it would need another JVM underneath it at the machine interface layer.

    1. Re:Not all of them by Simon+Brooke · · Score: 1
      Of course the JVM itself is written in C. If it were written in Java, it would need another JVM underneath it at the machine interface layer.

      You really, really don't understand computers, do you?

      Of course the JVM must be a native executable for the platform on which it runs. That's a very, very different thing from saying it's written in C. It could be written in any language which is capable of being compiled down to native object code. That, obviously, includes Java (the fact that Java isn't normally compiled down to native object code does not mean it can't be). I don't know for certain that the whole of the JVM you use is written in Java, but JVMs entirely in Java certainly exist.

      --
      I'm old enough to remember when discussions on Slashdot were well informed.
    2. Re:Not all of them by MillionthMonkey · · Score: 1

      Of course the JVM must be a native executable for the platform on which it runs. That's a very, very different thing from saying it's written in C.

      I was speaking loosely. By "written in C" I meant "written in a language that is compiled to native executable code and not JVM bytecode". The actual source language is irrelevant. You can write your code in Java and compile it to a native executable if you want, but the result could still have been "written in C" as far as the person using the executable is concerned unless the source code is available to him.

      Of course, there is nothing about Java as a language that makes it unsuitable for generating native executables, but naturally there is intense marketing pressure from Sun to associate Java the language as being useful only with Java the emulated platform. Although with native compilers it's quite possible to write "C programs" in Java. :)

  91. GCJ performance is excellent by 73939133 · · Score: 1

    I do a lot of compute intensive stuff in Java and I have found gcj performance to be comparable to Sun's and IBM's JIT. That's also what most of the benchmarks on the page you link to show.

    In fact, I only see one benchmark where there is a significant difference, and that is probably due to some JIT-centric code in that benchmark that is easily eliminated. There are some optimizations available to a JIT that gcj can't do (e.g., inlining of some methods), and for code written with a JIT in mind, that may make a noticeable difference. But it's easy to detect those places and make such code run fast on gcj.

    Another big performance feature of gcj is that it has a fast native code interface, as opposed to Sun's sluggish and cumbersome JNI interface.

    In general, JIT compilers should be able to do better than batch compilers and do a lot more optimizations on high-level code (specialization, partial evaluation, etc.). But none of the Java JITs realize that advantage, and overall, something like gcj seems to be a better overall compiler for most real-world use at this point.

  92. Re:Wrong by Call+Me+Black+Cloud · · Score: 1

    It means that when a 5 yr old and a 4 year old are bugging you to finish typing, proofreading is the first thing to go.

  93. pretty fast by 73939133 · · Score: 1

    In my experience, the performance of gcj-compiled code is roughly comparable to that of Sun's and IBM's JITs.

    In principle, a JIT should be able to beat a batch compiler on long-running, compute intensive tasks, but none of the existing Java JITs seem to realize that advantage. Furthermore, for interactive applications like Eclipse, eliminating JIT delays and class loading delays is probably more important than a little bit of difference in performance.

  94. Re:Java...Java....Java.... by ChannelX · · Score: 0, Redundant

    Being used less and less? Surely you jest. Java is a huge sucess and its use continues to grow.

    --
    My blog: http://jkratz.dyndns.org/~jason/blog/
  95. Memory Usage of Apps in GJC vs JVM by Anonymous Coward · · Score: 0

    Can anyone tell me what the memory usage of apps compiled with GJC is?

    The memory usage running an app on the JVM is at least 8MB and I have had apps using up to 100MB.

  96. Umm... no by iamacat · · Score: 2, Interesting

    You can have a JVM that can save JIT output to the executable format for a given platform. Like GCJ :-) Then, after a bootstrap, the JVM can be in fact written in Java.

  97. jit is not a slowdown... by Kynde · · Score: 2, Informative


    Just so you all know. A good jit/hotspot compiler can make things quite a bit faster than any static build compiler. This is because at runtime certain optimizations are possible that simply cannot be done at build. These optimizations are typically very aggressive, to that extent that later on in execution it may turn out so that those snippets have to be thrown away and recompiled. And thus they usually target only the hotspots, i.e. portions of code that are being executed inside tight loops, which is usually where compile time savings occur anyway. The speed of the rest of the code is pretty much governed by the programmer anyway along with his choice of algorithms and data structures.

    A good example of such snippets would be the inlining of a virtual method, turning a virtual method recursion into a loop along with some unrolling, inlining function pointer call (which is basically the same as virtual method call).

    Mind you, ofcourse a hotspot compiler could also be implemented to a C/C++ runtime environments, but I haven't heard of anyone actually taking that path.

    (for the record, I'm a C programmer and rarerly write much with java)

    --
    1 Earth is warming, 2 It's us, 3 it's royally bad, 4 we need to take action NOW
    1. Re:jit is not a slowdown... by Anonymous Coward · · Score: 0

      Although in theory what you say is true, the sad fact is that Java is still slower than C/C++ for even trivial operations.

      Try the following benchmark code:
      http://www.phizz.demon.co.uk/benchmark.txt

      The C++ benchmark runs 2x as fast when compiled with GCC on my system vs the Java benchmark being compiled with the latest Sun Java SDK.

      There may be places where Java outperforms native compiled C/C++ - but until something like the above benchmark runs at with a closer margin I'm going to relegate Java to applications where performance is the least important criteria.

    2. Re:jit is not a slowdown... by Kynde · · Score: 1

      Your test won't show the case I was refering to. To test it and make things even a tad more even you should've marked the C++ methods virtual. In java (and in many other OOP languages) all member functions are by nature virtual.

      (Largish differnce? Yes! Those cannot be inlined during compile time wether they're mission critical or not. A run time compiler can inline them however.)

      --
      1 Earth is warming, 2 It's us, 3 it's royally bad, 4 we need to take action NOW
  98. gcj Garbage Collector by Andrew+Haley · · Score: 1

    I've heard from a few people that "gcj has problems with garbage collection." However, I have no idea at all why people think so, or where this rumour started.

    If anyone here does know of specific problems with gcj's garbage collector, please let me know or post a bug at http://gcc.gnu.org/bugzilla/.

    --
    aph@redhat.com
  99. The language is the same. by Anonymous Coward · · Score: 0
    The libraries are different.

    I rarely need to run EJBs on my phone.

  100. Re:Troll...Troll...Troll... by Anonymous Coward · · Score: 0

    You do know what "j2ee" is, don't you? You also realise it pays out far more than your primitive C++ alternative.

  101. FUD by icoloma · · Score: 1

    Duh!

    >>>>
    Now, this will go through the vector, and call the appropriate version of do-foo for each time in the vector. The cool thing is that it doesn't matter what the types in the vector are, or how they're related. If they have a do-foo() defined for their class, the runtime will do the right thing automatically. In Java, to get the same effect, you'd have to use check to type of each variable, cast it to the right type, then call do-foo() for each type that could be in the vector. ////
    In Java we have interfaces. The fact is that the code that you propose is not encapsulated . Declaring an array of type the desired interface will achieve the same goal. And it would be encapsulated.

    >>>>>
    Certainly, its not any more flexible than C++. /////
    You are only looking at the compiler, and are right. But check the runtime for BCEL-like features (capacity to generate bytecodes on the fly at runtime as if they were compiled) and introspection (capacity of finding every attribute and method of a class without knowing its type). I think we don't understand "flexible" the same way.

    >>>>
    let vec = make(limited(, of: )); ////
    supported on jdk 1.5 to be released by the end of year

    >>>>
    again, Lisp, Dylan, even C in the case of the SAFEcode project ////
    They don't check on COMPILED code if someone does something nasty. I mean, the goal is to get different permission levels on different classes inside the same executable, something that the OS doesn't allow me to do.

    >>>>>
    Lots of languages are natively compiled and fully portable at the same time. ////
    You are telling me that you have libraries to connect to different databases, native sockets, multithreading, serial ports and, say, window handling (don't tell me seriously about using Qt, please) that works on sun, hp, win32 and alpha and don't mind if it's little or big endian?

    Do you have photos?

    Damn, the only reason on the end of the road to use java it's because you have thousands of libraries to get real work done. For those who have to deal with hundreds of functional points it really is worth the pain of lack of performance.

    The rest imho is fud.

  102. That's our job!! by garyebickford · · Score: 1

    As long as I've been doing software Moore's law has been a constant hassle. Every year the hardware gets bigger and faster, and we, the poor software developers, have to come up with ever bigger, slower and less efficient ways to do things to use up all those new cycles!

    Our diligence has paid off. Since 1980 when a Perq Workstation with a 1 MIPS processor and 4 MB RAM (IIRC) could run a complete high performance window based operating system, to today when a similar capability takes 250 MB RAM and 2 GHz to do the same work, we've managed to coninue to stem the tide of hardware!!

    Of course, we can't neglect the code and data space experts, who continue to struggle to fill disks that are as much as 60,000 times as large as those of the early 1980's. What a challenge - but we're meeting it!

    From early efforts with program generation systems, 4GL languages and interpreters to today's IDEs, Software Engineering continues to meet the challenge of hardware with new levels of indirection, such as XML and Web Services - a glorious re-creation of the excellent slowness of LISP, newly hobbled by a verbose text-mode protocol that can multiply a simple 2 byte code into as much as 2Kbytes or even more!! Those networks are so hard to fill!

    Thus we have managed to generate an order of magnitude more work for workstation, routers and servers worldwide. And the new data storage requirements have ballooned corporate data archives from piddly megabytes to terabytes!

    With recent new initiatives such as object oriented programming, 3D UIs, SQL-driven addressbooks and scripting languages we will continue to hack away at the hardware advantage. Only the amazing expertise of the software community could have achieved such incredible results in such a short time. All hail the glorious software revolution, making work for CPUs everywhere!!

    --
    It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
  103. Re:Looks great! by tshak · · Score: 1

    How about VS.NET Enterprise Architect? It's got additional features like the latest Visio for reverse engineering C# to UML (and back).

    The one area that VS.NET lacks is refactoring (although I'm of the camp that one should keep refactoring to a minimum). I'm hoping that this gets addressed by the next release.

    --

    There is no longer anything that can be done with computers that is nontrivial and clearly legal. -- Paul Phillips
  104. Re:RKZ IS THE ASSMASTER by Lord+Custos · · Score: 1

    If I had Mod Points, I'd be hard pressed to choose whether to mod this as +1, Funny or +9, Psychotic

  105. SHADDUP! by t0qer · · Score: 1

    You sir are a twit, you sir are a fool....

    Is it something that's come lately or has been around since the dawn of slashdot? I've noticed (and chirp in here if you've noticed too) that it's become fashionable for a few people on slash to go around challenging each other's intellects with name calling in some psuedo geek pissing match.

    Judging by the parent posts, both of you seem like reasonably intelligent people, why resort to calling each other names? I mean, instead of starting your posts off with "You're a stinky poo poo head" and then rambling on with your technical points, can't you just cut that first line of name calling out of your posts before you post it? Do your arguments lack the technical merit to stand on their own?

    Jeesh, cut with the fucking elitism already.