Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Fast Native Eclipse with GTK+ Looks 300

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."
This discussion has been archived. No new comments can be posted.

Fast Native Eclipse with GTK+ Looks

Comments Filter:
  • Looks great! (Score:-1, Insightful)

    by geeveees ( 690232 ) on Sunday August 03, 2003 @12:06PM (#6600198) Homepage Journal
    One little comment, I still think MS makes the best IDE's there are. I tried Eclipse but it wasn't quite as intuitive as VC++ for example. How do you singlestep trough code with Eclipse? Never found it out. vim + gcc + gdb still fulfills my daily coding needs!
  • by millenium ( 689108 ) on Sunday August 03, 2003 @12:14PM (#6600229)
    GCJ aka "native Java" now really seems to be ready for its day under the spotlights.

  • by jfengel ( 409917 ) on Sunday August 03, 2003 @12:40PM (#6600342) Homepage Journal
    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?"
  • by Call Me Black Cloud ( 616282 ) on Sunday August 03, 2003 @12:41PM (#6600347)
    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 [java.net] community for some links to games that really exhibit excellent performance.
  • by Binary Gibbon ( 413182 ) on Sunday August 03, 2003 @01:00PM (#6600447)
    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.
  • by Anonymous Coward on Sunday August 03, 2003 @01:09PM (#6600493)
    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.
  • by Anonymous Coward on Sunday August 03, 2003 @01:09PM (#6600495)
    > 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.
  • by Anonymous Coward on Sunday August 03, 2003 @01:12PM (#6600510)
    At what magical speed does Java become faster than a compiled language?

    Development time.

  • by Iffy Bonzoolie ( 1621 ) <iffy@@@xarble...org> on Sunday August 03, 2003 @01:18PM (#6600548) Journal
    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
  • by swordgeek ( 112599 ) on Sunday August 03, 2003 @01:20PM (#6600562) Journal
    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 /..
  • by millenium ( 689108 ) on Sunday August 03, 2003 @01:22PM (#6600571)
    Why is it that people like to abuse Moore's law as a lame excuse for lousy engineering?
  • Re:Looks great! (Score:1, Insightful)

    by Anonymous Coward on Sunday August 03, 2003 @01:33PM (#6600623)
    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.
  • by roystgnr ( 4015 ) <royNO@SPAMstogners.org> on Sunday August 03, 2003 @02:01PM (#6600752) Homepage
    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.
    • 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.

  • by be-fan ( 61476 ) on Sunday August 03, 2003 @02:24PM (#6600842)
    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.
  • by Latent Heat ( 558884 ) on Sunday August 03, 2003 @02:46PM (#6600952)
    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.

  • by mccrew ( 62494 ) on Sunday August 03, 2003 @03:05PM (#6601048)
    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 [vim.org] 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.

  • by Anonymous Coward on Sunday August 03, 2003 @03:07PM (#6601051)
    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.
  • by __Reason__ ( 181288 ) on Sunday August 03, 2003 @05:35PM (#6601731)
    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.
  • 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.

  • by lokedhs ( 672255 ) on Sunday August 03, 2003 @06:05PM (#6601826)
    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 [www.minq.se] (I wholeheartly recommend this database tool, very good and supports pretty much all databases) and IntelliJ IDEA [intellij.com] (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 [orionserver.com] and existing [www.minq.se] applications in Java. Also check out the statistic on programming language usage [postgresql.org] 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.

  • by gidds ( 56397 ) <slashdot@gidds . m e .uk> on Sunday August 03, 2003 @06:18PM (#6601888) Homepage
    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...)

  • Re:Why JVM? (Score:2, Insightful)

    by khuber ( 5664 ) on Sunday August 03, 2003 @09:23PM (#6602794)
    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.

  • 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.

Thus spake the master programmer: "After three days without programming, life becomes meaningless." -- Geoffrey James, "The Tao of Programming"

Working...