Slashdot Mirror


Java Binding in KDE2.1

Some folks pointed out an interview on Dot.KDE with Richard Dale. Richard is the author of the code which adds bindings to KDE and Qt for Java. What does this mean? Well, the interview has more details, but the simple answers is "KDE/Qt apps written in Java". Hopefully this means more programs.

127 comments

  1. Wouldn't everyone flip if... by kdgarris · · Score: 2

    ...it was win32 bindings for Java instead? Doesn't either one defeat the purpose of writing a "write once, run anywhere" Java application?

    -Karl

    1. Re:Wouldn't everyone flip if... by Sc00ter · · Score: 1
      Ahh yes, but this is for KDE, not windows.

      So it must be good!

      But this was my point. Why write in a platform that's suppose to be cross platform, but write stuff that can't be used with anything, only KDE.. Why not just stick with C++ or something?
      --

    2. Re:Wouldn't everyone flip if... by Zachary+Kessin · · Score: 2

      Well I would not, say you want to write a KDE or Windows or GNOME or whatever front end in a client server system. If you wrote the backend in Java it makes a lot of sense to write the frontend in Java as well.

      While the Idea of Write Once Run anywhere (Or Write Once Debug everywhere) is really nice in a lot of cases you know that infact you will be using say Linux as the frontend and a specific server as the backend and all you need to do is get it to work in that context. It really depends on what you are trying to do.

      --
      Erlang Developer and podcaster
    3. Re:Wouldn't everyone flip if... by Emil+Brink · · Score: 3

      Maybe they just like Java, the language, and don't give a fsck about Sun's visions about Java as a platform? I sure could agree with that, if only the compiler wasn't so darn slow... ;^) I couldn't read the interview though, it seems to have been /.ed or something.

      --
      main(O){10<putchar(4^--O?77-(15&5128 >>4*O):10)&&main(2+O);}
    4. Re:Wouldn't everyone flip if... by Mike+Connell · · Score: 1

      Use jikes from IBM. It is fast fast fast.

      Mike.

    5. Re:Wouldn't everyone flip if... by Rentar · · Score: 1

      Use Jikes (thats http://www.research.ibm.com/jikes/ for ... well, you know)! It's fast as hell!

    6. Re:Wouldn't everyone flip if... by whydna · · Score: 2

      that URL seems to be a little defunct (perhaps they moved some files) try this one

    7. Re:Wouldn't everyone flip if... by captredballs · · Score: 1

      I'm a bit confused, what distinguishes this from another (even IBM's other java compilers) java compiler? Is it just speed?

      --

      I suppose I'm not too threatening, presently, but wait till I start Nautilus
    8. Re:Wouldn't everyone flip if... by HiThere · · Score: 2

      I think that it's more or less a licensing issue. If it were released for Windows under the GPL, then I suspect that to the extent that folk noticed, they would applaud. Only problem is, that's a bit difficult to immagine. (Mainly because, who'd do it?)

      OTOH, the comments about this version being tied to Qt rather than any of the Java toolkits sort of limits the use. Maybe someone could write an awt binding to Qt?

      OTOH, I really prefer languages that don't depend on single inheritance and type casting everything anyway, so no matter how Java (or C or C++) gets implemented I won't care too much. What I want is a good method of linking Python or Ruby to Ada code :-).

      Caution: Now approaching the (technological) singularity.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    9. Re:Wouldn't everyone flip if... by macpeep · · Score: 2

      jikes is just a whole lot faster.. startup is really speedy because it's implemented in C and thus pretty compact. compiling is also very speedy, probably for the same reason, possibly because of better algos.

  2. Perhaps by Anonymous Coward · · Score: 1

    Perhaps they should fix the bugs that they have already have in KDE2.1 before attempting this.

    The most annoying one being that konqueror tries to access a requested document on the previous site. It also occasionally will treat every request as a request for some page you've been just been to, as though every link was a back button.

    And all this is in what they are calling "Final", not beta. Come on guys, you're gonna give linux a bad name! (no snickering out there)

    --posting anonymously in anticipation of poor moderation

    1. Re:Perhaps by DeeKayWon · · Score: 1

      I used to have that problem when using Konqueror with Junkbuster, but in 2.1, Konq and Junk buster play nice just like they should.

    2. Re:Perhaps by SilverSun · · Score: 1
      Stupid idiot

      Do you think the guy sits there: "Hmmm should I fix Konq or write some Java bindings?"

      Best of all, you troll get moded up by some even more stupid moderator!

      If it was ever coredumping GNOME getting another kinding everyone would clap their hands.

      Slashdot became a rediculous platform of wannabes.

      --

      KdenLive/PIAVE - non-linear video editing

  3. Not really useful by Shoeboy · · Score: 2

    Java is awful for gui applications. That's why things like "Corel Office for Java" were given the mercy killing they so desperately needed.
    What the Linux desktop really needs is something like Visual Basic.
    Wait - hear me out.
    I'm not saying that you should code in Visual Basic. I don't do it myself - that's one of the perks of being a systems programmer. All I'm saying is that there should be a language for the non-programmer to quickly design graphical applications that use pre-fabbed components and a minimum of glue code.
    Java is object oriented. This makes it a mistake for a general purpose gui language. What you need is something that is object based like Visual Basic.
    Any idiot should be able to create usable graphical apps for Linux. Unfortunately, currently even gifted C++ hackers can't make usable gui's for Linux - witness freeciv. Whether you like the language or not, you've got to admit that a language designed primarily for component reuse would be a good thing for linux - espescially for the corporate environment where rapid development is a must.
    --Shoeboy

    1. Re:Not really useful by jamiguet · · Score: 1
      I agree but I would see it better as an off-spin of what the Yellow box was.
      Yellow box is a development tool that was supposed to be running on NEXT but that never quite picked up with the box.
      I saw it running on Rhapsody one of the little research OS by apple 4 years ago and I was flipping out. You just drag and drop and bind the elements toghether code is made for you.
      Beside forte runs on Linux so I guess you could develop application with the look and feel of Q\t and KDE from java.
      I dunno but I would like it
      Specially if it solves the cut and paste problem
      Yellow box or here

      -------------------------------------

      --

      Where is my mind?

    2. Re:Not really useful by mbyte · · Score: 3

      I think you are wrong ..

      If its anyway simmilar to the excelent java/GTK bindings then they use JNI to call the GTK/QT/whaterver functions. Ok .. you get some perfomance penality from JNI, but it still should be magnitudes faster than swing.

      if you want speed in java, use the IBM 1.3 JDK .. its REALLY fast ... java is gaining much ground in backend and server programming .. its nice, easy threads and is quite immune against buffer overflows ;)

    3. Re:Not really useful by multicsfan · · Score: 1

      My employer (www.catharon.com) is working on an easy to use cross platform language. An old version (16 bit windows), soon to be replaced (win/mac immediatly, linux/beos later), is running the catalog site www.countrycurtains.com. My employer is looking for a few alpha testers for the version to really shake the bugs/problems out.

    4. Re:Not really useful by Masem · · Score: 2

      If you want rapid application development for GUIs, there's several options which basically include an interpreted language (perl, python, tcl), and some GUI library ( gtk, qt/kde, tk). Since most of these languages are easy to learn and forgiving on the newbie programmer, it takes much less time than learning Java and all the special API codes for it.

      --
      "Pinky, you've left the lens cap of your mind on again." - P&TB
      "I can see my house from here!" - ST:
    5. Re:Not really useful by jsse · · Score: 1

      Unfortunately, currently even gifted C++ hackers can't make usable gui's for Linux - witness freeciv

      Download IBM VisualAge for Java Entry Version for free here, quickly browse the first example in its tutorial, you could then start writing a pretty good GUI program without needing to write a single line of Java code, or have a slight knowledge Java language.

      I can write an entire database access GUI front end without writing a line of code.

      If I lied you can have my cat's first born child.

      You might say it's all depending on the development program. Heck you can choose many other Java development programs but only Microsoft provide you with VB development program.

    6. Re:Not really useful by Greyfox · · Score: 2
      There are visual development tools available for both Gtk/Gnome (See Glade) and KDE (I seem to recall seeing one or two for Java, too.) Given the fairly shallow learning curve for Gtk--, I found that these tools got in my way more than they helped me.

      A visual tool won't help you much when it comes to designing a usable interface though. Coming up with an interface that lets you use the program without getitng in your way takes a lot of thought and experience. Most of the interfaces I've seen designed by amateurs using such tools tend to be... bizarre.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    7. Re:Not really useful by ChannelX · · Score: 1
      If you want rapid application development for GUIs, there's several options which basically include an interpreted language (perl, python, tcl), and some GUI library ( gtk, qt/kde, tk). Since most of these languages are easy to learn and forgiving on the newbie programmer, it takes much less time than learning Java and all the special API codes for it.

      Uh....Java is much easier to learn syntax-wise, especially if you're coming from a C world, than perl or python or tcl. And what makes learning the Java APIs so much harder than the vast amount of stuff available for Perl?

      --
      My blog: http://jkratz.dyndns.org/~jason/blog/
    8. Re:Not really useful by goul · · Score: 1

      Take a look at either
      TogetherJ or Netbeans for Java/Swing based GUI apps strong enough for daily use.

    9. Re:Not really useful by toriver · · Score: 1
      Plus JBuilder.

      You can write decently fast GUI applications in Swing as long as you use 1.3.x and know what you are doing.

  4. If anyone doesn't know this is a troll yet by Paul+Crowley · · Score: 1

    ... check qpt's user info.

    cheers,
    --

    1. Re:If anyone doesn't know this is a troll yet by Shoeboy · · Score: 1

      Hi Paul,
      You're a real moron.
      Just because you're an obsessive /. reader who obsesses over whether or not a user might be a troll doesn't mean everyone else is.
      Most users on this site don't recognize user names other than cmdrtaco, hemos and signal 11.
      They don't even see the qpt at the top and, if they do, it means nothing to them.
      They certainly don't wast time stalking suspected trolls and posting worthless responses that are actually more damaging to the quality of discussions on /. than the trolls themselves.

      But don't let that stop you. Keep on doing what you're doing. Every response after a trollspotter appears is worth double.
      --Shoeboy

    2. Re:If anyone doesn't know this is a troll yet by Paul+Crowley · · Score: 1

      No, only when I catch them early enough. S/he posts a *lot* of trolls - I only catch a few.
      --

    3. Re:If anyone doesn't know this is a troll yet by Martin+Spamer · · Score: 1

      Sigh....

      You should also know ShoeBoy is another well known troll, just checkout the history. I would not be surprised if they are not both alter ego's of the same person.

    4. Re:If anyone doesn't know this is a troll yet by OlympicSponsor · · Score: 1

      I've known SB as a troll for a long time. But he's a (usually) entertaining troll, so I don't begrudge him his points.
      --
      Non-meta-modded "Overrated" mods are killing Slashdot

      --
      Non-meta-modded "Overrated" mods are killing Slashdot
      (Hey Ryan! Here's your proof!)
    5. Re:If anyone doesn't know this is a troll yet by Paul+Crowley · · Score: 2

      I think it's too easy to end up chasing your own tail trying to identify who's "really" who, since new accounts are easy to create. Just call the trolls as you see them; it makes it harder for them to get a +1 bonus, and so reduces the entertainment value of pissing in the intellectual swimming pool.
      --

  5. This is good... and not... by javatips · · Score: 1

    I think this is a good idea to add binding to KDE for the Java plateform.

    Sure it could break the WORA promise of Java. This is the bad thing.

    But used wisely, it could enable 100% Java application to integrate well with theire desktop environment. A well written application could easily abstract all the desktop integration feature they need and have implementation of these for each desktop environment they run on. If no desktop integration implementation is found then the Java application can still run, it will just not be interopperate nicely with the desktop.

    1. Re:This is good... and not... by jamesoutlaw · · Score: 1

      Sure it could break the WORA promise of Java. This is the bad thing

      You are right, but I believe that there is a place for Java as a general purpose programming language in addition its platform-agnostic role. It's an easy language to use and you can put together applications in a fraction of the time it would take to develop in C/C++.

      To the end-user the development language is pretty much immaterial. As long as you clearly specify the system & OS requirements, there's not a problem. if you write an application in Java that will only run under OS X or OS Y, just say so.

  6. Java is simply unusable on the desktop by MSBob · · Score: 1
    Java is a good idea in principle but not in practice. Java's problems stem mostly from its unusable runtime environment. I'm currently involved in rewriting a Java application in C++ because customers refuse to use that 40MB monster that runs like maple syrup on an 800MHz Pentium (win32). JVM is just too big and slow to be usable and Swing is just no good for anything other than teaching windowing principles. Even simple dropdown lists will not scale beyond several hundred items before becoming unusable speedwise.

    Garbage collection, often touted as Java's biggest advancement over C++ makes Java completely unsuitable for a whole slew of applications. Even the "softest" realtime apps will get an unbearable penalty from the garbage collector spontaneously "kicking in" at more or less random intervals. Even a simple MPEG1 player app eperiences jitter and playback glitches due to garbage collection issues. The only place where java's performance is acceptable is server side apps because the memory footprint is less of an issue and because "the web is always slow" attitude that web users became used to.

    Java does not have serious development tools. I've yet to find a reasonable Java debugger. The supposedly "excellent" Borland JBuilder cannot hold a candle to Visual C++ especially when it comes to debugging features.

    Last but not least problem with Java is its image. Because of its simpler syntax it quickly became attractive to all kinds of rookies and cowboy programmers and underachievers trying to make big money "hacking" Java after having only marginal exposure to any other programming languages. Hence java programs usually exhibit very low quality compared to C++ based software. This gives the language a bad name to such an extent that many software shops won't even hear about writing anything in Java purely on the grounds of prejudice. Java is was a neat idea executed very badly.

    Good day.

    --
    Ally ourb asear ebel ongt ous

    --
    Your pizza just the way you ought to have it.
    1. Re:Java is simply unusable on the desktop by Mike+Connell · · Score: 5

      Just to correct a few points:

      > Java is simply unusable on the desktop
      No. Badly written Java is unusable on the desktop, especially if it uses Swing. Swing is definately a pig. OTOH I run JBuilder every day on a P2-350: it's very usable.

      Debuggers: Check out visual age, it is meant to be excellent. However, having used both VC and JBuilder, I don't find any limitations in the java debugger. Why? Because I spend much less time using it. In fact I rarely need it at all.

      Image: I don't see that as a problem at all, and I doubt this you can back up this line: "Hence java programs usually exhibit very low quality compared to C++ based software." with anything other than "in my experience". It's rather FUDish.

      I guess if you're used to seeing so many low quality unusable Java programs maybe you should start to mix with better programmers ;-)
      0.02, Mike

    2. Re:Java is simply unusable on the desktop by MSBob · · Score: 1
      Debuggers: Check out visual age, it is meant to be excellent. However, having used both VC and JBuilder, I don't find any limitations in the java debugger. Why? Because I spend much less time using it. In fact I rarely need it at all.

      You rarely need a debugger? Well in that case I wouldn't offer you a job as a programmer. It should be mandated by LAW that every programmer steps through their own code at least once. If you don't do that you have no clue what your program really does. You're doing programming by coincidence.

      --
      Your pizza just the way you ought to have it.
    3. Re:Java is simply unusable on the desktop by shaper · · Score: 5

      Even simple dropdown lists will not scale beyond several hundred items...

      A drop-down list with (several) hundred items is sheer lunacy. Lists, drop-down, scrolling or whatever, are inappropriate GUI elements for selecting from hundreds of items. Indeed if you find the user having to select from an unfiltered set of that many items, then you probably need to reexamine the design of that portion of the application. Just going on this one clue, it appears that your more fundamental problem might be immature abilities in your designers.

    4. Re:Java is simply unusable on the desktop by MSBob · · Score: 1
      Just going on this one clue, it appears that your more fundamental problem might be immature abilities in your designers.

      Nonsense. Sometimes there is no logical way to filter certain items out. Sometimes it IS desirable to select one thing out of several hundred. Don't critisize the UI you haven't seen!

      --
      Your pizza just the way you ought to have it.
    5. Re:Java is simply unusable on the desktop by Mike+Connell · · Score: 2

      > You rarely need a debugger? Well in that case I wouldn't offer you a job as a programmer

      Thats good - because I wouldn't take it - especially if you only hire coders who code so badly that they need to use a debugger a lot :-)

      > It should be mandated by LAW that every programmer steps through their own code at least once. If you don't do that you have no clue what your program really does. You're doing programming by coincidence.

      On the contrary. If you're just coding - and saying "ooh, it seems to be doing the right thing", you dont know jack. What you *should* be doing is a design, and then coding from it with test cases. If you need safety, you should generate a proof for the design and then derive the code automatically.

      Needing to use a debugger frequently is a sign that something serious is wrong with your habits.

      Mike.

    6. Re:Java is simply unusable on the desktop by MSBob · · Score: 1

      Let me recommend a book to you sire: Code Complete by Steve McConnell. It's an excellent intro to programming for fresh guys such as yourself. He will tell you many good reasons for stepping through your own code which I'm can't be arsed to reiterate here. And the correctness of your own code is a separate issue from the correctness of your design. Even though the correct design is a prerequisite for good code it's by NO MEANS a guarantee of robust code.

      --
      Your pizza just the way you ought to have it.
    7. Re:Java is simply unusable on the desktop by gattaca · · Score: 1

      That's an intersting perception -waht sort of application are you thinking of?

    8. Re:Java is simply unusable on the desktop by J.Random+Hacker · · Score: 2

      A debugger is good for figuring out what your program is doing when it is not doing what you needed it to do. You can't figure out that your code is correct meerly by stepping through it line by line. It is far better, IMHO, to write code that is simple enough to be obviously correct to the extent possible, self testing where reasonable, and with clear intent everywhere else.

      If you think that the only way to determine what a program is doing, then you have only the weakest grasp of whatever language you are working with. Ofcourse, there is an exception to that general statement -- I find that exposure to Win32 makes people paranoid about whether code works like they think it should.

      However, the types of large-scale programs I write (traffic planning systems, mostly) demand that the code be self testing to a large extent because the data structures are large and complex enough that we have been unable to find effective output/display mechanisms, but we *can* write algorithmic tests that we can trust because they are simple to state, even for complex data.

      I say -- debug to dig out info about a misbehaving program, but that is no substitue for clearly written code, and a well thought out design. Do that, and you too will need your debugger less.

    9. Re:Java is simply unusable on the desktop by bare_naked_linux · · Score: 1
      If there's no logical way to filter certain items out of the list, how is the user doing it? Come on, at the very least, you could filter alphabetically. I agree in that if the list holds hundres of entries, some serious thought needs to be made concerning the design of the UI.

      --

      --

      --
      Unscrample my email, win a prize.

    10. Re:Java is simply unusable on the desktop by Mike+Connell · · Score: 3

      CC is an OK book (IMO). However, I suspect the actual reason why you aren't reiterating any of his points is that they don't contradict what I've said. A deubgger is a last resort. Everytime I end up having to use it, I always ask myself - why? Why didn't this get caught earlier?...

      This wasn't even fresh when I was taught it all those years ago at school ;-)

      Anyway, here's a quote from a book perhaps you might like to read: The Practice of Prgramming, Kernighan & Pike: "Debugging is hard and can take long and unpredictable amounts of time, so the goal is to avoid having to do much of it.[...] An ounce of prevention really is worth a pound of cure."

      I couldn't agree more :-)

      Mike.

    11. Re:Java is simply unusable on the desktop by J.Random+Hacker · · Score: 2

      OK, I'm from old school. I've been at it for 15 years or so, most of that time doing seriously complex programs of the engineering automation sort. McConnell is a nutcase. I have his book on my shelf, and it sucks. He recommends coding styles that only make sense in Redmond.

      Remember -- code should follow design. Good code follows a Good Design. Good design handles boundary cases in a normal fashon. Good design is semantically clear. Debugging is a last resort when your code is not working right. Good code behaves in obviously correct ways. Good Designs are self-testing to a large degree.

      To sum -- it is *you* who need to learn to design and program, my friend.

    12. Re:Java is simply unusable on the desktop by f5426 · · Score: 1

      > Java is was a neat idea executed very badly.

      I would agree, if you replace 'neat idea' by either 'dumbed down smalltalk' or 'sluggish objective-C'.

      Cheers,

      --fred

      --

      1 reply beneath your current threshold.

    13. Re:Java is simply unusable on the desktop by f5426 · · Score: 4

      > A drop-down list with (several) hundred items is sheer lunacy

      This is not an excuse not to handle it properly. (I don't know why, but this recall me the mswindows combox boxes where you have about 3 of 4 lines of avalaible data, probably because someone decided that using a combo with a few dozen of lines would be 'sheer lunacy')

      > Indeed if you find the user having to select from an unfiltered set of that many items, then you probably need to reexamine the design of that portion of the application.

      Nonsense. You have a number in the interface. You click on it, and want to drill through. Unfortunately, there are 6000 facts hidden behind it. The user *want* to see them, probably because he want to sort them and find a particular one. Sure, he could do a quety for that, but scanning in a list is sometimes easier/more confortable. I can use list of 100K items if the list is sorted meaningfully. There are user hitting the 65K lines limit in excel spreadsheet every day ?

      Hell, with you reasoning, we should suppress any kind of visualisation of log files, as those are basically list of thousands of items.

      > Just going on this one clue, it appears that your more fundamental problem might be immature abilities in your designers.

      Nope. Its problem is that he is using a toolkit that doesn't scale to the user needs. Sure, and application that _requires_ the user to dig into list with hundred of elements is severly ill-desgined, but one that _prevent_ a power user to look at its data is plain broken.

      If a developer want to make anything resonable (like a scroll list with 1000 items sorted by date), he should not be prevented because the toolkit implementors are using o(N^2) algorithms.

      Cheers,

      --fred

      --

      1 reply beneath your current threshold.

    14. Re:Java is simply unusable on the desktop by Rich · · Score: 2
      Sure it's worth stepping through code occaisionally, but this is a ridiculous statement. Trying to step through the whole of any program of a decent size would take years (and even then you won't be able to cover every possible excecution path). If you don't undertstand what your code does, then single stepping won't help you, conversely, if you do understand then you don't need to single step anyway.

      In addition to this, as soon as you start to write non-trivial code in Java you begin using threads, so single stepping becomes a pointless activity. The timing difference means the threads interact differently to the way they would in a real invocation. It's still a useful technique every so often of course, but not for anything bigger than a few classes.

      Have you actually written any decent sized Java apps? I would guess you haven't from this comment.

    15. Re:Java is simply unusable on the desktop by Mike+Connell · · Score: 3

      I was so intrigued by your "Even simple dropdown lists will not scale beyond several hundred items before becoming unusable speedwise." comment, that I just created a drop down list (JComboBox) with 5000 (five *thousand*) entries - there were absolutely no problems at all. This was with stock 1.3.0 on NT4 on a P2-350 with 192M.

      Then I created one with 50000 (fifty thousand!) entries - this took a while to create the 50000 objects to put in the list, but as far as using it is concerned - it was just as fast.

      Whatever problems you're having with this stuff, well, I'm not sure it's all down to Java...

      Mike.

    16. Re:Java is simply unusable on the desktop by haleb · · Score: 1
      > That's an intersting perception -waht sort of application are you thinking of?

      Now that's easy to answer. I'm SE in semiconductor test biz, so let's take an example thereof. A hypothetical chip tester hase 1k channels, most of them connected to pins of a/multiple chips. The user wants to select one of the connected pins, ergo ... Sometimes those pins are grouped, e.g. data bus, address bus aso. But to group them, you need to select them first and to put them in a group then.

    17. Re:Java is simply unusable on the desktop by shaper · · Score: 2

      This is not an excuse not to handle it properly

      I completely agree. It was the context and wording of the original post which caused me to suspect that there might be other poor design choices that were the culprit in the poster's perception of poor Java performance.

      Hell, with you reasoning, we should suppress any kind of visualisation of log files, as those are basically list of thousands of items.

      Begging your pardon, but I did not say or suggest that we suppress any kind of vusualisation of log files. I did not mention log files at all. Please don't distort what I said. Since you brought it up, I will, however, suggest that visualizing a log file in a drop-down list is perhaps a less than optimal design choice.

      ...application that _requires_ the user to dig into list with hundred of elements is severly ill-desgined, but one that _prevent_ a power user to look at its data is plain broken.

      Again, I did not suggest that one prevent users from looking at data. Actually, I was thinking of drop-down lists as an optimized form of data entry, not visualization, so maybe we are not so much disagreeing as we are misunderstanding each other.

      I can use list of 100K items if the list is sorted meaningfully.

      This misses the point of the sheer awkwardness of manipulating a drop-down list that large. The list viewport is so small in relation to the total list size that movement in the list is very difficult. The scroll thumb moves tens or hundreds of items with the tiniest of mouse inputs, frustrating even the most dextrous user with overcompensated mouse movements. And often the arrows are either too slow for the size of the list or too fast to read as you scroll. Please understand that I am not suggesting that this is something one should never do. I am just pointing out the tradeoffs of the awkwardness ot manipulating the user interface.

    18. Re:Java is simply unusable on the desktop by f5426 · · Score: 1

      All in all, we agree. I've been a bit start to jump on my gun.

      I was specifically upset by the sentence:

      "Lists, drop-down, scrolling or whatever, are inappropriate GUI elements for selecting from hundreds of items"

      I agree with you about the drop-down/combo stuff.

      I tried to make a point about the fact that other GUI elements (ie: lists and scrolling) should handle an arbitrary number of elements. On that, we seem to agree.

      > I will, however, suggest that visualizing a log file in a drop-down list is perhaps a less than optimal design choice

      :-)

      > The list viewport is so small in relation to the total list size

      This is broken. I hate combo boxes because of that. The list viewport should be as big as the user want.

      > The scroll thumb moves tens or hundreds of items with the tiniest of mouse inputs

      A system like NeXTstep used 'alt'-click to slowly move thumb. All UI should also have all windows resizable so the list viewport can be made arbitrary large. I hate we I have a big screen, with a non-resizable little window, in which there is a tiny list that ask me to choose in which laguage I speak, starting with 'Afrikaans', 'Albanais', ...

      Cheers,

      --fred

      --

      1 reply beneath your current threshold.

    19. Re:Java is simply unusable on the desktop by Dan+D. · · Score: 1

      Let me recommend something to you.
      /usr/src/linux/Documentation/CodingStyle... much smaller and cleaner written. In fact I'd give it a score for tight writting and no bloat.

      --
      People who quote themselves bug the crap out of me -- Me.
  7. Re:isn't KDE already a resouce hog by smiski · · Score: 1

    My first guess was that they were not built in, so that _YOU_ _DON'T_ _HAVE_ to have them installed.

    --
    ---- [I... See...]
  8. Oh the irony... by Mike+Connell · · Score: 2

    > Java is awful for gui applications...

    That's rather the point. Modulo GUI, java is rather fast nowadays [0]. Swing OTOH, is a bit of a bloaty pig, layering far too much code on top of the underlying (native) GUI.

    ObFacts: the nightmare corel project was a long time ago in terms of java speed & functionality.

    Mike.
    [0] Relative to FORTRAN & C, not just relative to "old java"

    1. Re:Oh the irony... by Frums · · Score: 1
      Swing OTOH, is a bit of a bloaty pig, layering far too much code on top of the underlying (native) GUI.

      Umh, Swing is a lightweight GUI. The old AWT was the nightmare that built on top of native GUI's. Swing does away with the native GUI for 99% of its widgets. In fact, the only native widget it uses is a frame so that it can open a non-contained frame. That can be avoided for everything except the main frame of the application if you don't mind contained frames for dialogs.

      I've not worked with Qt before, but IMHO Swing rocks for GUI construction. Now if we could just find a Java 1.3 native compiler I would be ectstatic.

    2. Re:Oh the irony... by Mike+Connell · · Score: 1

      > Umh, Swing is a lightweight GUI.

      You're confusing terms. Commonly: heavy==slow,large. light==fast,small. However, in terms of Java GUI components, heavyweight components are native (a la AWT), whilst lightweight components are rendered entriely by Java.

      Thus, Swing, consisting of "lightweight" components layered on top of "heavyweight" components (native windows), is actually heavier than AWT, because swing is larger and slower.

      When swing is a little lighter, better documented and more functional, I will think it rocks too :-)

      Mike.

    3. Re:Oh the irony... by jilles · · Score: 2

      >You're confusing terms. Commonly: heavy==slow,large. light==fast,small. However, in terms of Java GUI components, heavyweight components are native (a la AWT), whilst lightweight components are rendered entriely by Java.

      Lets elaborate a little here. Java leaves the rendering to Java2D. On windows this means that your widgets are actually rendered using directdraw (i.e. hardware accelerated) since the Java2D rendering is just a layer on top of platform specific rendering. What AWT did was much more ugly, it tried to wrap native components in such a way that it would be platform independent, it was ugly, buggy and never really became a good solution for crossplatform GUIs. That, by the way is also the trouble with this KDE wrapper, it will look nice on linux, but what about other platforms? It sounds like AWT2 to me, I don't see how the problems AWT had are addressed in any way by the KDE wrapping. But then it probably never was intended as a crossplatform solution. So in short, the KDE2 wrapper has the same inherent problems the original AWT had, yet it is posed as an alternative to the much better (than AWT) swing solution.

      --

      Jilles
    4. Re:Oh the irony... by Rich · · Score: 2
      • The first difference from AWT is that this binding doesn't try to be platform independent - this means that it doesn't have to provide a lowest common denominator API.
      • A second difference is that unlike the AWT this code is bound into the JVM under programmer control, so you can choose at run time if you want to load it. You could for example include a Swing binding in the same app as well as the KDE binding.
      • A final difference is that if you stick to the Qt part of the binding then you gain a degree of platform independence anyway because both the JNI and Qt are multi-platform.
      People also seem to have failed to understand that these bindings could be used to implement an AWT. I began a direct AWT port called QtAWT (see the KDE developer site for details) a while back, but I haven't touched it for ages. Now that the AWT side of things can be handled in Java with the Qt/KDE binding it would be much easier.

      The arguments about breaking Java's platform independence are also somewhat weak because of developments like Suns Java extension mechanism. This mechanism allows people to cleanly bind native code into their Java apps. There is no problem with including platform dependencies as long as you do it cleanly IMHO.

    5. Re:Oh the irony... by jilles · · Score: 2

      Qt is indeed platform independent, however this wrapper also wraps KDE stuff and as far as I know KDE only runs on UNIX (though it might be possible to port it).

      I don't understand your argument about binding code into the JVM. Of course you can create 2 GUIs for your app and choose dynamically which one to use. However, in practice this limits the way you can design your code and will cause you to write a lot of non trivial gluecode. And why write a second GUI if you have a crossplatform swing based GUI anyway?

      --

      Jilles
    6. Re:Oh the irony... by Rich · · Score: 2
      The Qt part of the binding can be used independently of the KDE part.

      If you use a Swing UI then you also get the AWT bound into your JVM because the low level parts of Swing are build using AWT peer classes (look at the classes underlying the DnD interfaces for example). This increases the memory consumption etc. unnecessarily. The KDE binding allows you to choose what is loaded into the JVM.

      It should actually be very easy to make both a Swing and a KDE binding to a Java app. The design philosophy of the two APIs (use of actions etc.) is similar so the glue is trivial. In addition you can still use the Swing model classes if you want to. In general, for well written Java code adding a new GUI is easy.

      There are many reasons for writing a second GUI, the major one being to integrate well with the target environment. Swing is a decent enough programming API, but I have found that performance issues and the look and feel leave a lot to be desired. The Win32 look for example is close to, but not exactly like MFC and for many customers this is not good enough. A clean way to integrate with the native toolkit of the platform and to use platform independent code in the back end. In this situation Swing becomes a fallback rather than the primary UI toolkit for your app.

  9. No no no by OlympicSponsor · · Score: 1

    Far too obvious. Java trolls are passe, please try again. (KDE vs GNOME isn't much better)
    --
    Non-meta-modded "Overrated" mods are killing Slashdot

    --
    Non-meta-modded "Overrated" mods are killing Slashdot
    (Hey Ryan! Here's your proof!)
  10. Re:Use Gnome? by Fnkmaster · · Score: 3
    Ding, ding! You don't know what the fuck you're talking about. I know I shouldn't bother with a troll like this, but every single one of your comments is without basis.

    1) Java removes so-called "powerful" functionality from C++ because while great for developing apps yourself those features generally result in morons shooting themselves in the foot. Have you ever built software applications in a large team environment with extremely tight deadlines and minimal time to track down bugs? No, I didn't think so.

    2) Java has been massively successful because of the above. Think again. Primarily in backend server apps and web applications. Not in client applications or applets. This is an attempt to make it more viable in those areas because a fully cross platform library with graphically rendered widgets doesn't work well yet. If you think Java has failed you must not work in anything remotely related to enterprise software.

    3) I love Gnome as much as the next guy. But it's neither clean, stable, nor intuitive. This gives away your troll because frankly KDE is generally more intuitive than Gnome, somewhat more stable (clean is arguable... and aesthetic, I think Gnome takes the cake).

  11. GNOME already working by Mike+Connell · · Score: 4

    The same idea is already underway for GNOME

    Mike.

  12. Excellent news! by benmhall · · Score: 5

    What is it with people on Slashdot lately? Did anyone READ the article, or did you all just denounce it as "evil" before you lost patience waiting for the (now slashdot'd) server to go down? Seriously!

    This article has been up on dot.kde.org for a few days now, and (while I initially wasn't too excited about the idea) is a very interesting read. What the author has basically done is lay the foundations for good solid bindings for any language. His initial cut was for Objective-C , and now Java.

    There are no licensing issues here, as these are simply language bindings that allow you to use KDE and the very capable Qt to write GUI apps that integrate well with the rest of KDE. As was pointed out at the dot, this is meant for java the language, not java the platform. As was also pointed out, the possibility of gcj+kde bindings could eventually make for a fast compiled app in an easy to write for language.

    Oh, and for the record, this was started for Gnome back in 1998:

    http://mail.gnome.org/archives/gtk-list/1998-Nov em ber/msg00481.html
    http://news.gnome.org/gnome-news/961253384/index _h tml

    One of the things that Gnome-toting Slashdotters often criticize QT and KDE for is the lack of language bindings. Well, now they have Python, Java, Objective-C, C, Perl (in some state) and more on the horizon. So now that this has been addressed you feel you have to blast them for doing precisely this?

    The page also praises GTK for it's portability. When was the last time you read a Gnome page that made reference to anything done by KDE in a good light?

    Come on, everybody needs to grow up here. KDE doesn't suck, Gnome doesn't suck, Java doesn't suck. They all have their place. Java is a fun language to program in. A nice compromise between C and SmallTalk. Be nice here.

    1. Re:Excellent news! by Rentar · · Score: 2
      What is it with people on Slashdot lately? Did anyone READ the article, or did you all just denounce it as "evil" before you lost patience waiting for the (now slashdot'd) server to go down? Seriously!

      Funny ... even though noone seems to read the articles, they get slashdoted.... how comes?

    2. Re:Excellent news! by costas · · Score: 2

      Well, it *may* mean that the people reading the article are not the ones coming back to the discussion thread. Have you noticed the comment counts lately? the user ID #s? how long have those been stuck at between 350-400k?

      I am not trying to troll here, I am just pointing out something I've noticed...

    3. Re:Excellent news! by GeekBoy · · Score: 1

      Because everyone is looking for screenshots! :)
      ********************************************

    4. Re:Excellent news! by ghassanm · · Score: 1

      Funny ... even though noone seems to read the articles, they get slashdoted.... how comes?
      A lot of people read the articles, and never submit comments... the problem is with the people who don't read the article and then comment on it

  13. Re:isn't KDE already a resouce hog by f5426 · · Score: 2

    > the memory-consumtion of KDE + X + everything else is still below 40 MB.

    This is funny as hell. This is what is called a resource hog. And YES, gnome is a resource hog too. And Mac OS X also. And win32 too.

    A NeXT machine was running fine (in 2.x) with only 8Mb of ram. A color station under 3.3 would run fine with 32Mb of ram. This means the OS + the workspace + edit + a few apps (real apps, like Mathematica or Improv)

    And before that, Geoworks ran real fast in extremely low memory conditions.

    Still below 40MB before having started any usefull application ? Nothing to be proud of...Of course adding java binding will make 40MB of bloat looking ridiculous...

    Cheers,

    --fred

    --

    1 reply beneath your current threshold.

  14. Re:Why are they doing this? by Fnkmaster · · Score: 3
    Completely uninformed. There is a lot of GPLed, LGPLed and BSD licensed code out there written in Java. Java is not a "closed language". Some of the implementations of some of the APIs that are released by Sun are licensed under varying degrees of closedness. Generally they are freely available, and nobody forces you to use them (they aren't part of "Java" per se, but libraries for Java, such as the J2EE APIs). There are free implementations of many of these as well, for example, look at (JBoss. It's an LGPLed implementation of the J2EE APIs.

    Also, with respect to Java itself, there are free implementations of the Java compiler and the Java runtime environment as well. But using Sun's Java compiler and Java runtime IN NO WAY affects the licensing of code that has been compiled with it.

    There is sometimes confusion over what "linking" and similar concepts referenced in some Free or Open Source licenses mean in the context of Java. I won't seek to open these arguments up here. I'm just pointing out that your points are completely off base and the two issues - Java bindings for KDE and Freeness are orthogonal to each other.

  15. Replying to everyone at once.. by Stormie · · Score: 5

    Why would you add Qt/KDE bindings to Java? Doesn't that just limit the crossplatformness of Java?

    (a) Some people see merit in Java beyond its crossplatformness. Some people think it is a nice language, easy to develop in, easy to write maintainable code in. (b) Objectively, the existence of bindings for any language is a good thing for any toolkit. The absence of such bindings is a bad thing. Hence this is good.

    can you say sludge? I would imagine the speed of these apps running on anything less than a Wonderbox would be like watching snails.

    You are aware that Java code can be compiled to a native executable, using a compiler such as gcj? You are also aware that much of the blame for slow Java applications has been placed upon the Swing toolkit, which you wouldn't be using if you were using QT?

    Why not just stick with C++ or something?

    Perhaps because you are a Java programmer who is not experienced with C++ (or who doesn't like C++), and yet still wish to develop for KDE

    this is all we need, kde apps that need to start a jvm to run.

    Not if they're compiled to native executables..

    What was the KDE developement team thinking..

    Maybe that.. oops! nearly replied to a qpt troll!

    KDE has had problems in the past with licensing issues..

    oops! nearly replied to an Ananova troll!

    Disclaimer: I'm not a Java programmer, or a KDE developer. I actually get paid for writing VB (OK, feel free to moderate me -1, "Spawn of Satan")

    1. Re:Replying to everyone at once.. by Blackjax · · Score: 1

      If I had mod points I'd use them but I don't, so I'll just have to settle for saying that Stormie is right. His points go straight to the heart of the matter, and neatly summarize the way I (and probably many other Java programmers) feel. Java is a good language and can be used for more than it is currently if people would just stop typecasting it.

    2. Re:Replying to everyone at once.. by Stormie · · Score: 3
      Not if they're compiled to native executables..

      Then you wouldn't need the bindings, stupid FUCK.

      I see no reason to reply to this beyond the sheer joy of posting (and the fact that I'm bored at work), but you don't actually know what a binding is, do you, AC?

      Or do you think that gcj is some sort of magic toolkit pixie that compiles all the Swing references in your Java code into calls to whatever toolkit library you happen to be using? (I hear that the next version will be able to guess which you prefer out of QT and GTK+ if both are installed!).

      p.s. When you grow up, you'll realise that trolling is more fun than flaming. But it also takes more skill (even in an article involving Java and KDE!), so maybe it's out of your reach..

    3. Re:Replying to everyone at once.. by hding · · Score: 1

      This is probably true. Of course, the statement "X is a good language and can be used for more than it is currently if people would just stop typecasting it." is true for many languages X./p?

  16. java-desktop integration by gawi · · Score: 2
    I think we need the ability to run Java apps directly on the desktop. That's not the same thing as running KDE apps written in Java. I'm talking about truly portable apps, not apps written especially for QT or KDE.

    This became obvious for me when I used the Java version of ICQ which was not truly integrated with my desktop. I would have liked to switch to "away" state whenever the screensaver would kick in, just like in Windows. The java program cannot be aware of all the desktop properties and event. Maybe there should exist an API for this precise purpose.

    --
    All humans are mortal. Socrates is a human. Socrates is dead.
  17. There are also good Java hackers by sebtesting · · Score: 1

    I'm not a big fan of Java, but these applets rocks. Maybe these guys would be able to write a decent Mpeg1 player in Java.

  18. Re:What's the point? by robbieduncan · · Score: 2

    No-one seemed to care about this when Apple added these bindings in OS-X. It lets you write non-cross platform apps in more languages. That's OK. Or you can detect if the bindings are available and use them as well as providing work arounds if they aren't giving you cross platform apps which integrate better on some platforms. Not really a problem.

  19. Re:This is good but..... by jamesoutlaw · · Score: 1

    Umm.. have you used any of the recent versions of the JDK & runtime? They are quite fast and greatly improved over the previous releases.

    I have JDK 1.2.2 running on a Pentium III 450 mhz, 256 meg of RAM, and Windoze 2000. I would not call that a "wonderbox", but it's not a slow-poke either. Java applications run great on this system- and I mean applications not applets

    I'm working on a rather complicated desktop mapping application, written completely in Java and using Swing. It's quite responsive and for most user operations, you would not be able to tell it was an interpreted application or one that was compiled to native code.

    I'm quite happy with Java as a programming language and with it's perforance in both desktop and server-side applications.

    When the users tested the app they were pleased with the performance as well. On older hardware, performance suffers, but even on a Pentium 166 with NT4 & 128 meg of ram, the application was useable.

  20. Re: What's the point by bare_naked_linux · · Score: 1
    Although cross-platform compatability is great, some of us would like to use the language to create faster platform specific programs simply because we like the language. I think it's great that the capability to compile Java natively is being developed into gcc. Java's a great language. One of it's strengths is its cross-platform compatability, but not its only one. BTW, server side java has been compiled to binary for years now, not that that'd require QT bindings.

    --

    --

    --
    Unscrample my email, win a prize.

  21. It is about time by Blackjax · · Score: 2

    Let me say up front, I couldn't care less about write once, run anywhere, I just want to write cool apps in a language I am comfortable with. The whole idea that Java MUST be used in 'write once, run anywhere' mode has been really holding it (and me) back. I feel that developments like this really open up new possiblities for me to develop applications which interest me. C and C++ are good languages but not everyone is a C/C++ programmer (or wants to be), so it is time for OS and GUI designers to stop acting as if they were.

    Now, if only Be Inc. would make it easy to program directly to BeOS using Java...

    1. Re:It is about time by Blackjax · · Score: 1

      I don't NEED it, I WANT it. I like Java, like programming in Java, and programming in C or C++ simply is unappealing to me.

  22. Kylix by Wizard+of+OS · · Score: 2
    you want:
    • Quickly design graphical applications
    • use pre-fabbed components
    • a language that every idiot can use
    • a RAD (rapid application development) tool
    You need: kylix
    I went to a free seminar a few weeks ago, and it looked really impressive.

    --
    --

    --
    If code was hard to write, it should be hard to read
    1. Re:Kylix by abelsson · · Score: 2
      Or BlackAdder - that's atleast from an OSS friendly company. It also provides all of the above: Not Free, but well worth buying to sponsor theKompanys OSS work: http://www.thekompany.com/products/blackadder/ .

      No, i dont work for 'em. (Tho i'd like to :)

      -henrik

  23. Re:This is good but..... by groomed · · Score: 2

    Performance is adequate, but memory management -- oh my god. Check out Tube, a portable Hotline client I wrote last year. Uses anywhere upwards from 19MB of memory. The "official" client needs less than 1MB!

  24. Re:This is good but..... by bare_naked_linux · · Score: 1
    Um... They do...

    --

    --

    --
    Unscrample my email, win a prize.

  25. Re:More applications written in Java?!?! by SCHecklerX · · Score: 2
    Hmmm...

    While teaching myself java, my original web page had a 3d vector-ball animator for a pretty nice scroller implemented in java on it.

    This app had explosion effects, vector trails, morphing, and of course all the 3d linear algebra crap for moving and rotating the objects on each axis.

    Oh yeah, it used double-buffering for smooth animation too, so I was pushing 320x300 pixels in each and every frame. This was on a Tseng ET6000 video card. Nothing radical there.

    On my Pentium 133, in a browser window, this used maybe 25% of my CPU tops.

    Of course, this was under OS/2, which had a very good java integration with the OS and netscape (netscape for OS/2 used OS/2's system JRE by default, not its own).

    Bottom line is a poorly written app, whether it be in java or any other language will be a CPU pig. Just because it's java doesn't make it so, however.

  26. Excellent Idea by Anonymous Coward · · Score: 3

    Hi,

    I know that most of the slashdot readers are java haters and have the impression that java is unusable for GUI applications.

    While it is true that most current java GUI programs are slow as hell, this does not mean that java (the language) is slow. Run something like a well written quicksort on a java 1.3 VM, and it will be as fast as a C++ implementation(1). Try it out for yourself before you flame me. The implications of this are huge: It means that bytecode languages like java or C# can be as fast or even faster as compiled languages! This will change computing forever, even if you don't like it.

    Now if java is that fast, why are GUI applications written in Swing so slow? The reason is that all the 2D rendering is currently done in java using the CPU using an api called java2d. The main bottleneck is not that it is done in java, but that for the sake of platform independence and garbage collection, java 2d has no efficient way to access fixed position memory like the graphics card memory, and that all calculations like blitting are done by the CPU. This will supposedly change in the java 1.4 (merlin) release, but like every intelligent software developer, I believe it when I see it with my own eyes on my own machine :-) (2)

    But sometimes you do not need platform independence. If you write a java application using KDE, it will run on all unix machines where you can compile KDE. And contrary to popular slashdot belief, java is a very good language even if you do not need "write once, run anywhere" style platform independence.

    So to all you java haters: Stop wasting your time by flaming about java performance and instead run a simple non-gui java benchmark.

    greetings,
    Anonymous java nerd

    (1) Depending on your choice of compilers/jvm you might not get identical performance. But you will get within a factor of 2.

    (2) It would be nice if all the C# followers would have the same attitude instead of blindly believing microsoft promises.

  27. Re:This is good but..... by Anonymous Coward · · Score: 1

    try starting with java -Xms1m the Java VM defaults to an initial size of about 20Megs, for efficiency. If your app is much smaller than that, it's better to start with an initial size of 1 meg (-Xms1m) and let it grow if necessary.

  28. Coincidently... by Uri · · Score: 1

    ....today also saw a major release of Java-GNOME, a set of Java bindings for GNOME and GTK. Presently at version 0.6, this project has been going on for quite a while now, and an enormous amount of work has been put into this release. (It's been almost four months since the last major release). Check out screenshots, and lots of doumentation.

  29. Re:Yet another first for KDE by bare_naked_linux · · Score: 1
    Gnome has had java bindings for some time. I've posted the link once already... Look it up.

    --

    --

    --
    Unscrample my email, win a prize.

  30. Re:More applications written in Java?!?! by Anonymous._.Coward · · Score: 1

    On your NT box: bring up the Task Manager, switch to the "performance" tab and the hold down the left mouse button anywhere on the desktop. 100% CPU usage baby!

    --

    take a triptonica to subthunk

  31. Re:And by Chelsea+Clinton · · Score: 1

    Shut the fuck up you idiot.

  32. Binding only reroute library calls by Rares+Marian · · Score: 1

    No changes to binary code at all.

    --
    The message on the other side of this sig is false.
  33. In the immortal words of Nelson... by meadowsp · · Score: 1

    Ha Ha !

  34. Native compilers by harmonica · · Score: 2

    Some native compilers for Linux should be here.

  35. QT AWT bindings? by graveyhead · · Score: 1

    This is good news, except that I would like to see QT (and GTK) peer implementations for the Java AWT. Currently, the blackdown Java implementation uses Motif, so apps built with it tend to be ugly. I know one can use JFC (swing) and use a prettier look and feel, but I'd much rather have a native widget that looks, responds, and acts like whatever desktop environment I have installed.

    Just my 2 pennies.
    --
    std::disclaimer<std::legalese> sig=new std::disclaimer; sig->dump(); delete sig;
  36. Re:What's the point? by cyber-vandal · · Score: 2

    Isn't this just allowing the language to use KDE themes and widgets where available, just like it uses Motif and Win32 as well as it's own Metal theme.

  37. ROTFL by slaytanic+killer · · Score: 1

    Slashdot...

  38. Your Just Wrong by theforest · · Score: 1

    I just accessed one of my swing applets and did a query on a database table for a bit over 1000 rows; it took from 2-3 seconds from the time I pressed the query button to having the JTable entirely populated. I then grabbed the scroll bar and ran it all the way through the entire JTable and it took less than a second, actually; as fast as I could move the mouse. And Java scrolls actually scroll through each row, not freeze the display until you finish scrolling and then show the result (ms excell). I see nothing wrong with this gui response nor the database query response time. Using Java 1.3 runtime plugin, all Swing components. Database is DB/2 on the mainframe accessed via IBM's JDB net driver through a UDB client on a linux apache/jserv server. Your response seems like you dont have any experience programming in java and Swing. The 1.3 runtime responds as fast as native applications. Try it.

  39. Portability issues by The+Deep+Blue+Funk · · Score: 1
    As usual, all sorts of Java-related angst on Slashdot ("waaaah, it's too slow", "it's proprietary, boo-hoo", "I'm still in school and I have no industry experience but I know everything about everything and I can tell you that nobody uses it anywhere and it's not good for anything, and goshdarnit, I just love bitching about stuff that isn't even relevant to me anyway"). :)

    (just wanted to get that out of my system, sorry)

    Regarding the whole portability thing: yes, using these sorts of native libraries does introduce some platform dependencies to the programs which use it. There are actually a number of widely-used packages which are basically Java interfaces to libraries which, deep down inside, are partially or entirely composed of native code.

    For example, Java3D is implemented on top of both Direct3D and OpenGL, and is portable between the supported platforms. If you want to write 3D apps in Java, it is just not practical to go with a non-native solution. Likewise, if someone wanted to write KDE apps in Java, it makes a lot more sense to use the actual Qt and KDE libraries than it does to try and emulate them in Swing (which, as many have pointed out, is pretty big and slow to begin with). Java is still plenty useful even if you're targeting a specific platform. Also, if we ever see KDE on non-UNIX platforms, any Java apps written using these bindings will be portable to them too.

    Is there a double-standard here with regard to Microsoft and Visual J++? Yes and no. Yes, because Microsoft added Windows-specific extensions to Java. And no, because what Microsoft was really trying to do was make the Java programs people wrote with their tools specific to Microsoft's JVM. They changed the language itself in some pretty radical ways, they didn't just add a few native libraries and hoped that everyone would use them. And they were quite blatant and pushy about trying to get everyone to use their extensions. Finally, since most people who are doing Java development are doing it on Windows, what MS did could have been far, far more destructive to Java as a whole than some guy adding KDE bindings for Java under UNIX.

  40. Wrong approach, use a display on demand control by Trith · · Score: 2

    I am working with Swing in a database app for a manufacturing company. In an instance where we have many items to select from we use the load on demand approach. For this particular case, we made our on Java Bean that consists of a JTextField and a very small button with the caption of "?" in red just to the right of it. So, if a user doesn't know the part number off the top of their head, they click the "?" next to the TextField. Then and only then does the application poll the database for the whole list which is then displayed in a new modal frame. This design results in the initial frame loading quicker up front because it's not waiting to for a combobox to load up all it's values first. It also makes for a more efficient use of memory.

    Borland JBuilder does this as well. The first time you go to help it takes a little longer because they wait until it's needed to create the object. The designer is coded the same way. Again, the result is more efficient use of memory and the distribution of work so that everything doesn't have to be loaded at the same time when the application first launches.

    -----

  41. Java is so trendy by chavster77 · · Score: 1

    It's not just coffee anymore!

    --
    Through the perception of illusion, we experience reality.
    1. Re:Java is so trendy by toriver · · Score: 1
      It's not just coffee anymore!

      It's also an island! Presto!

  42. Re:More applications written in Java?!?! by macpeep · · Score: 2
    Don't believe me? Take a look at what Java does to your system. That's right, that screenshot shows one stinking Java Applet using up 73% of the CPU. Boy, am I glad that treeloot switched to an animated GIF.

    So somebody coded a bad applet that eats up all resources by not yielding or sleeping. What's your point? And.. that's on ONE virtual machine (Microsoft's since it's inside IE) so it could also be the case of a poorly implemented VM, though in this case, I would suspect it's the applet.

  43. Re:What's the point? by technomancerX · · Score: 3
    Nope, but I'll give a brief explanation. Java basically has 2 GUI toolkits, AWT and Swing. The main difference is that every component in AWT corresponds to a native system component while in Swing the only system dependent components are very low-level, like a window. So in AWT if you create a checkbox, it will ALWAYS look like whatever a checkbox looks like on the platform it's being run on because it actually calls a native component. Under Swing, checkboxes and such are rendered and controlled by Java through Look And Feel classes. Metal is an example of a Swing Look And Feel (there are a bunch of them out there). So a Swing app will look like whatever Look And Feel you tell it to use (although some Look And Feels like Windows and Mac will only run on those platforms because Sun doesn't want to risk a legal battle).

    The KDE bindings don't use AWT or Swing. They actually let you program using a Java variant of the actual QT/KDE APIs. Another big difference is that code written using these bindings can only be run on platforms that have the QT/KDE libraries and a JVM, while AWT and Swing programs can be run wherever there is a JVM.

    Hope that makes sense.

    .technomancer

    --
    .technomancer
  44. Confused about what java is? by sumengen · · Score: 1

    I see that eople are confused what the term java means. This is probably Sun's mistake as Jamie Zawinski explains here:
    http://www.jwz.org/doc/java.html
    Taken from this url (which is written in 97 I think):
    The fact is that there are four completely different things that go by the name "Java":
    - A language;
    - An enormous class library;
    - A virtual machine;
    - A security model.

    -- Java-the-language is, overall, a very good thing, and works well.

    -- Java-the-class-library is mostly passable.

    -- Java-the-virtual-machine is an interesting research project, a nice proof of concept, and is basically usable for a certain class of problems (those problems where speed isn't all that important: basically, those tasks where you could get away with using Perl instead of C.)

    -- Java-the-security-model is another interesting research project, but it only barely works right now. In a few years, maybe they'll have it figured out or replaced.

    After reading this page, I am convinced that it is a good thing for Java and for Linux to have native toolkit.

  45. Re:What's the point? by Ctrl-Alt-Del · · Score: 1

    So in other words, rather like the proprietary extensions that Microsoft got slapped down for, and that Slashdot got all upset about.

    Either the pot is calling the kettle black, or am I missing something?

    --
    "Life is like a sewer - what you get out of it depends on what you put into it" - Tom Lehrer
  46. Re:pointless? by technomancerX · · Score: 2
    Actually Sun sued Microsoft over them changing core APIs (in java.x packages) that made code built on their platform incompatible with other platforms. If Microsoft had written an extension (in other words a language binding to their libraries, which is what KDE did) there would have been no problems.

    This basically just allows people that want to to write KDE apps in Java. There are no legal issues here.

    .technomancer

    --
    .technomancer
  47. Re:Yet another first for KDE by bare_naked_linux · · Score: 1
    Unfortunately, my A tag was screwed up in my other post. I haven't written HTML in a long time and made a stupid mistake. (Imagine that) Here's the link: http://gcc.gnu.org/java/

    --

    --

    --
    Unscrample my email, win a prize.

  48. Re:What's the point? by cyber-vandal · · Score: 2

    Except that the source will be fully available and no-one will be conned into believing that it's pure Java.

  49. Re:What's the point? by cyber-vandal · · Score: 2

    Yes, in which case I agree. This is a bit pointless. What's wrong with a Look and Feel that blends seamlessly with the KDE 2 theme.

  50. Some hopefully helpful comments. by topher71 · · Score: 1
    The keys to using Java GUIs:
    • Use the 1.3 JVM for Swing apps, anything lower is a waste of time.
    • Learn how to tune Java code. The Java Performance Tuning book by J. Shirasi is a good start.

    I use Forte for Java v2, Internet Edition, every day for hours on end to earn my living. It's a 100% Swing based app that runs on a 1.3 JVM. It isn't as fast as a native app, but it's the most responsive and useable Java GUI app I've ever seen.


    This, by way, is Win2k on a 800MHz Athlon w/512M RAM. The most memory I've seen Forte use is ~150M RAM, and I had the servlet/jsp engine running in debug mode with 25 or so source files open.


    Oh, and Forte has a pretty nice debugger, certainly worth checking out (especially for JSP debugging). You can set breakpoints, step through code, set watches, look at the threads, look at the callstack, and look and change variables currently in scope. It's stable and extremely useful, certainly the best Java debugger I've used.


    And Forte is based on the open-source NetBeans project, so you can even check out the source if you're so inclined.

    --
    -- topher71
  51. Re:What's the point? by technomancerX · · Score: 2
    No, Microsoft got slapped for changing the core Java APIs (java.awt packages specifically if I recall) which is not allowed if you're still calling it Java. This is an extension library that lets you use the QT/KDE APIs. Had Microsoft just written an add-on lib that wrapped Win32 calls there would have never been a lawsuit.

    .technomancer

    --
    .technomancer
  52. Re:What's the point? by technomancerX · · Score: 2
    Actually, this is kind of nice as it lets you call the Qt/KDE libs directly from Java code if you want/need to...

    I do agree with you that a Look and Feel that automatically pulls and uses your KDE theme would be nice, as would a set of Qt/KDE AWT peers.

    .technomancer

    --
    .technomancer
  53. Interesting by be-fan · · Score: 2

    Java bindings for GUI environments is an interesting idea. I once read several years ago that the average application spends about 90% of its time in windowing toolkit routines. I'm sure the real figure, at least today, is a good bit lower, but even at, say, 50%, implementing toolkit routines in native code could have a big performance boost for Java applications. Still, I don't really know if Java is the way to go for quick/easy apps. C++ really isn't hard at all to do, and Java isn't appreciably easier. Sure there less ways to break things, but you can program buggy Java just as easily as buggy C++. I think the main benifet of Java is the huge class library that comes with it. Maybe if a class library like this were created in native code, and put up as kind of a GUI complement to POSIX, the dreams of quick-to-write and portable GUI apps could be realized without resorting to interpreted languages like Java.

    --
    A deep unwavering belief is a sure sign you're missing something...
  54. If only this meant the end of Swing.... by AugstWest · · Score: 2

    For *years* now I've been saying that Sun should just drop Swing and use QT or *any* other GUI component that is already on the market and proven.

    If only we could get Sun to adopt this and replace swing with it, Java on the client side would gain SO much.

  55. Cool. Now what we need.... by MAXOMENOS · · Score: 2
    ...is a wxWindows binding for Java. This would solve the cross-platform problem and the speed problem simultaneously.

    Seriously, right now there are only two major candidates for GUI building in Java: AWT and Swing. AWT is clunky and Swing produces the most incredibly bloated code you've ever seen. We need alternatives. Qt is one good alternative, but it has problems (read on). wxWindows is another alternative, not quite as extensive as Qt, but not with the same problems either.

    Qt does have the most developed GUI tools I've seen short of those evil MFCs, in addition to some other cool stuff with sockets and XML. The problem is that your code is only portable to Win32 if you use Trolltech's commercial license. (I'm not slamming Trolltech's decision here...there is some delicious irony behind Trolltech contributing to an atmosphere where free software is easier to write for X than for Win32. I'm just saying that this violates Java's "write once run anywhere" philosophy.) Qt also won't work for Mac, at least not as far as I know. wxWindows has ports for Win32, GTK, Mac and Motif, and is distributed under the LGPL for all platforms. While you don't get all the goodies of Qt, you do retain all the flexibility of Java.

    ObJectBridge (GPL'd Java ODMG) needs volunteers.

  56. he he he by twitter · · Score: 2
    I actually get paid for writing VB (OK, feel free to moderate me -1, "Spawn of Satan")

    Oh my, a VB troll. Spawn of Satan? You really overrate yourself. Oh well, at least you did not call that money sucking, point and click activity "programing". If you really do use VB, I'm supprised you could keep a browser stable long enough to post.

    --

    Friends don't help friends install M$ junk.

  57. Re:Use Gnome? by Will+The+Real+Bruce · · Score: 2

    Yeah, uh huh. Like you're *so* much more informed on the topic.

    1) Java removed actual powerful functionality from C and C++, and made the whole mess less maintainable , less useful, and far less efficient. No decent way to implement proper tail recursion, no macros, and a broken class/package protection model all spring to mind immediately.

    2) I can list other massively successful products that have sucked as well. Success is not a guage of worth, efficiency, or really anything else besides marketing. Java sucks just as hard as Word 6.0 did when it came out. And using "Java" in the same breath as "enterprise software" is a pretty good indication that you have no idea what you're talking about, or are also trolling.

    3) We really don't care about your opinions in the Gnome/KDE flamewar. Personally, I hate them both, but I'm not going to let you draw us all into a pointless "GUI War" argument. Just remember that KDE is generally modeled after Windows, so if you like their way of doing things, then maybe you'll find KDE intuitive. I find a command prompt to be more intuitive.

  58. Appropriateness of tools by the+red+pen · · Score: 2
    All tools have limitations. Ideally those limitations are encountered when one begins to step outside the realm the tool was designed for. One of the joys of hacking is stretching the boundaries of that realm. This could mean obscure hacks such as porting a video game to a digital camera or useful hacks, such as turning a hypertext delivery system into an application platform.

    When all you have is a hammer, everything may look like a nail, but it isn't reasonable to expect that you can play a CD, cook a grilled cheese sandwich or mow the law by smashing it with a hammer just because it's the tool you thought to use.

    • If a developer want to make anything resonable (like a scroll list with 1000 items sorted by date), he should not be prevented because the toolkit implementors are using o(N^2) algorithms.
    According to this "logic," if I want to use email as a transport for real-time streaming media, it's the fault of implementors of sendmail who are responsible for it not working?
  59. Re:Use Gnome? by GeekBoy · · Score: 1

    RE 1) Like the anonymous poster below anyone who uses those features in a big project needs to be shot.

    RE 2) Umm excuse me but *you* obviously have no idea of what you are talking about. I do work in an enterprise company, (a telco with >100,000 employees, I think that's pretty enterprise) and we *do* use java. Also, java is very much in demand in the market place. Just ask any corprate recruiter. (One of my best friends is one and tells my this regularly). Success is a factor of marketing? Well I guess it depends on who determines the success, oneline forums? magazines? press releases? How about cold hard cash? Our customers determine whether we are successful and they aren't complaining.

    RE 3) Your point? other than to be a nuisance? Don't give me that condescending 'I feel superior b/c I use a commandline' crap. BOTH commandline and gui have their place.

    Obviously you are a bigot. Just save it for somewhere else.

    This is why I rarely read slashdot anymore. The quality and rationale of the general readership has plummeted from 3-4 years ago, .
    ********************************************

  60. Just Set the Halt by carlfish · · Score: 2
    Debuggers: Check out visual age, it is meant to be excellent. However, having used both VC and JBuilder, I don't find any limitations in the java debugger. Why? Because I spend much less time using it. In fact I rarely need it at all.

    I live In the VisualAge debugger. The ability to edit the source, hit save, have the changes linked into the running application, and immediately step over the code I just wrote to make sure it does what I want it to is pretty damn good. If you're unsure of exactly what to do with a method (say you're working with some unfamiliar API or toolkit), you can just leave it empty, set a breakpoint, and then be able to inspect all the objects available to you while you write the method in the debugger's source pane.

    Just set the halt contains some very, very good advice for working in this kind of environment. (Okay, it's about SmallTalk, but VAJava is really VASmalltalk with another language kludged onto it)

    Charles Miller
    --

    --
    The more I learn about the Internet, the more amazed I am that it works at all.
  61. Re:Use Gnome? by Will+The+Real+Bruce · · Score: 1

    1) Ah, yes. Shoot all those who use proper tail recursion. There go all the good compiler writers.

    2) When you said "enterprise", I assumed you meant using Java for enterprise-level tasks. I guess you could mock up an interface with it, and use it as a front-end, if that's what you want. But I wouldn't trust it with anything serious.

    3) My point? That I didn't need your opinion. And you obviously don't need mine.

    Obviously, we're both bigots, so be careful where you point that finger, sonny. But isn't that what slashdot is for these days? ;)

    I agree that slashdot isn't as good as it was 3-4 years ago; I was there too, before User Accounts, even. But I think that owes more to the sheer scale of things than it does to the quality.

    Even the Slashdot story submissions have gotten somewhat better, though not by much. However, whatever was left of a community on slashdot has been lost.

  62. Re:What's the point? by Andreas+Rueckert · · Score: 1

    Why not a PLAF that interfaces to the running KDE and adopts it's look?

  63. Wrong, wrong, wrong. *smack* by Will+The+Real+Bruce · · Score: 1

    I'm not talking about writing tail-recursive code in Java; I'm talking about *implementing* tail-recursion decently on top of Java.

    And I did indeed refer to it in my post, which is what he replied to... so... wrong again! :)

  64. Java2D comment by LionMage · · Score: 1

    I agree that most existing Java2D implementations are sub-optimal, and this contributes to Swing's inefficiency. I'm amazed at how Smalltalk-ish Swing's approach to creating a GUI is. (Then again, many Java developers are Smalltalk expatriates who saw a way to take what they were already doing and move it to a more popular language/platform. It's no accident that Java's object model owes more to Smalltalk and Objective C than to C++.)

    You really can't blame all of Swing's problems on Java2D, however. There are many who'd claim that its architecture lends itself to certain inherent inefficiencies. Not being a Swing expert myself, I can't rightly comment on those in depth. But I believe that much of its architecture was done more with theoretical concerns than practical matters in mind.

    One thing I do know is that some Java2D implementations rock, and as a result, Swing performs very acceptably on those systems. One such implementation is Apple's, under MacOS X. Under MacOS X, Java2D is peered onto the Quartz drawing engine, giving you great speed at drawing vector graphics in addition to freebies such as anti-aliasing. (This also means the G4's AltiVec unit is leveraged whenever possible to improve rendering speeds even more.) I've run Swing apps on an iBook running MacOS X beta, and can report that they ran fabulously even though the iBook was under-spec (96 MB of RAM instead of 128, slower G3 processor with no AltiVec to take advantage of, beta OS with debug assertions still in place, etc.).

    The only disadvantage of Java2D on MacOS X is that, because of the anti-aliasing, some types of vector-based animation that work on most other Java2D implementations leave "trails" or "turds" on your drawing canvas in the Apple implementation. It's that darned anti-aliasing working against you, in that case, because over-drawing a spline (for example) with the same spline in the background color will not fully erase all the pixels that were originally drawn. The pixels bordering the spline will remain a blend of the spline's foreground color and the canvas background color.

  65. Re:This is good but..... by groomed · · Score: 1

    As I recall, memory use balloons rather quickly no matter what you do. Worse, it never really comes down again. There was also some discussion at the time (Swing has "built in" memory leaks); don't know if that is still pertinent.

  66. GNOME and Mac OS X have this already by Mr.+McD · · Score: 1

    This is really nothing new to anyone who has done Java on Mac OS X and it's also very simeilar to the Java-GNOME project too. Mac OS X has Java bindings in Cocoa in addition to allowing you to do Mac specific things. For example, if you use the MRJ classes, you can do things like set the type and creator codes for files (Mac's son't rely on file extensions for file types). That's something that Java doesn't do by default and it's something you don't need to do on other platforms. Apple has had to add those classes to do Mac specific things so that Java apps feel comfy on the Mac. Similarly, with these KDE bindings, it allows developers to add some KDE features that make it feel more like a KDE application.

    In my experience with Java, I have found that things like the JFileChooser aren't quite the same as the native file chooser dialogs. With the MRJ classes on Mac, I can use a Real Mac OS X file chooser as well as use sheets. With the KDE bindings and Java-GNOME, I can do the same things on any OpenSource Platform. It looks like MS is left out on this one.