Newbie question - Disadvantages of java

Discussion in 'Java' started by Martin Wildam, Oct 22, 2003.

  1. Hi folks,

    as I am about to switch to java, can somebody tell me the biggest
    disadvantages of java so that I know where I will get the problems and where
    the bottlenecks are?

    Thanks in advantage,
    _______________________________________
    Martin Wildam

    mailto:
    http://www.may.co.at
    Martin Wildam, Oct 22, 2003
    #1
    1. Advertising

  2. Martin Wildam

    Ferro Guest

    Java is slow!

    The other side of the moon is portability!

    Ferro.

    > as I am about to switch to java, can somebody tell me the biggest
    > disadvantages of java so that I know where I will get the problems and

    where
    > the bottlenecks are?
    Ferro, Oct 22, 2003
    #2
    1. Advertising

  3. Martin Wildam

    Neal Gafter Guest

    Martin Wildam wrote:
    > as I am about to switch to java, can somebody tell me the biggest
    > disadvantages of java so that I know where I will get the problems and where
    > the bottlenecks are?


    Disadvantages compared to what? Compared to a spoon, it is much harder to use.
    Neal Gafter, Oct 22, 2003
    #3
  4. Sorry, I am currently using VB under Windows.

    "Neal Gafter" <> schrieb im Newsbeitrag
    news:...
    > Martin Wildam wrote:
    > > as I am about to switch to java, can somebody tell me the biggest
    > > disadvantages of java so that I know where I will get the problems and

    where
    > > the bottlenecks are?

    >
    > Disadvantages compared to what? Compared to a spoon, it is much harder to

    use.
    >
    Martin Wildam, Oct 22, 2003
    #4
  5. Martin Wildam wrote:
    > Sorry, I am currently using VB under Windows.


    Then the main disadvantage is that a Java program requires a Java runtime
    to run, and Windows does not necessarily come with one preinstalled
    (especially not an up-to-date one).

    Furthermore, many tasks that are trivial in VB (GUIs and DB access) are
    seemingly complex in Java, which is mainly because Java is more general
    and can do all kinds of stuff that are very difficult or impossible in VB.
    Michael Borgwardt, Oct 22, 2003
    #5
  6. I'm not sure whether this is helpful but recently switched from
    Smalltalk to Java and encountered the following problems immediately
    involving basic everyday matters. Most of the classes appear to be 99%
    there for expected behaviour but the 1% remaining may need some time
    to master!

    1) Found multiple data types for what might be expected to be
    primitive objects confusing (eg int,Integer,
    double,java.langDouble)not always obvious which to use (eg int or
    Integer?) and supporting methods subtley different (eg not all int
    methods supported by Integer)
    2) String/number type cast (required for manipulating String data
    collected in GUI for processing in methods) (eg requiring
    Integer.parseInt() or similar code Double.parseDouble() and if
    dependent on user typing in some text in a text field even simple
    error handling nontrivial )
    3) Collection handling a little awkward (after Smalltalk) requiring
    full set of operations for class casting, get methods, iterators etc
    for both basic and advanced processing of elements. Had trouble adding
    ints to ArrayLists. Order of addition preserved only by ArrayList and
    LinkedList. TreeList sorts elements as added to list which may not
    always be required. Difficult to extend/change collection behaviour
    without crashing/unexpected behaviour resulting . Dictionary/Hashmap
    type collections with several nesting required quite lengthy
    statements for initialisation/iteration.
    4) GUI builders (eg VisualAge) easy to use but editing GUI for clients
    several months into software development cycle usually requires
    original IDE and difficult to maintain long .java files. If there are
    import/export problems (as sometimes happens) with the IDE there is
    real trouble!
    5) Writing text to files determining whether to put newlines using
    Strings "\n" or "\n" + "\r" or "\r" + "\n" or "\r" to get formatted
    text readable by Microsoft Notepad using simple buffered writers
    6) Basic GUI component JList does not have scrolling support as
    standard so only useful for short lists unless adding JScrollPanes.
    Once selected item in list second click does not deselect list
    resulting in GUI cannot be reset to initialised state (ie list item
    not selected).

    "Martin Wildam" <> wrote in message news:<bn59uf$t1rgk$-berlin.de>...
    > Hi folks,
    >
    > as I am about to switch to java, can somebody tell me the biggest
    > disadvantages of java so that I know where I will get the problems and where
    > the bottlenecks are?
    >
    > Thanks in advantage,
    > _______________________________________
    > Martin Wildam
    >
    > mailto:
    > http://www.may.co.at
    Lance Parkington, Oct 22, 2003
    #6
  7. "Ferro" <> wrote:
    > Java is slow!
    > The other side of the moon is portability!


    I agree.
    Other my opinions:
    - class library in Java is very complicated and a bit buggy (i.e. Swing)
    The other side of the moon is Java have very powerful class library.
    Mladen Adamovic, Oct 22, 2003
    #7
  8. "Martin Wildam" <> wrote in message
    news:bn59uf$t1rgk$-berlin.de...
    > Hi folks,
    >
    > as I am about to switch to java, can somebody tell me the biggest
    > disadvantages of java so that I know where I will get the problems and

    where
    > the bottlenecks are?


    I can only point out the things that are the most difficult for most of my
    students:

    1. Understanding the concept of passing by value. (And stop saying "I pass
    an object" until you really know what is happening.)
    2. Understanding that only variables are passed from method to method.
    3. Understanding reference variables and not getting confusion between
    reference variables and objects.
    4. Understanding casting, particularly of reference variables. This is
    probably the most difficult concept.
    5. Learning the way classes are located for syntax checking at compile time
    and loading at runtime.
    6. Understanding how "callbacks" are used in Java. This involves listeners
    being "well known names" that a caller identifies as callback code.
    7. Forgetting about how the language you are currently using does things;
    getting rid of the assumptions you are used to making.
    8. Learning to read the documentation.
    9. Graphics are difficult until you understand points 4, 6, and 8.
    10. Understanding why you need an up-to-date runtime. Getting it installed,
    i.e. talking people into installing it when they don't have one. The one
    Microsoft used to provide doesn't count.
    11. Understanding access modifier rules.
    12. Understanding threading and synchronization.

    The simple points:

    1. There are only nine kinds of variables. They all have exactly defined
    properties.
    2. There are so many classes already implemented that you don't have to
    reinvent many wheels. It's like a gigantic Tinkertoy set with which you can
    build just about everything.
    3. You CAN just about run anywhere (that has a runtime installed).

    It looks like a lot of negatives, but it is such a powerful system once
    these details are understood and one learns how to manipulate it that I
    think it is worth it.
    Now if only Sun doesn't drop the ball while distracted with other things --
    like staying solvent.
    --
    Gary
    Gary Labowitz, Oct 22, 2003
    #8
  9. Gary Labowitz <> scribbled the following:
    > "Martin Wildam" <> wrote in message
    > news:bn59uf$t1rgk$-berlin.de...
    >> Hi folks,
    >>
    >> as I am about to switch to java, can somebody tell me the biggest
    >> disadvantages of java so that I know where I will get the problems and

    > where
    >> the bottlenecks are?


    > I can only point out the things that are the most difficult for most of my
    > students:


    > 1. Understanding the concept of passing by value. (And stop saying "I pass
    > an object" until you really know what is happening.)
    > 2. Understanding that only variables are passed from method to method.


    Not "variables" - "values". For example:

    public class Foo {
    }
    public class Bar {
    public Foo getFoo() {
    return new Foo();
    }
    }
    public class Baz {
    public void useFoo(Foo foo) {
    }
    }

    Now the code:
    new Baz().useFoo(new Bar().getFoo());
    passes a value of type "reference to a Foo" to the useFoo() method in
    Baz. But this value is not stored in any variable.

    > The simple points:


    > 1. There are only nine kinds of variables. They all have exactly defined
    > properties.


    I.e. primitive types, references and array references?

    --
    /-- Joona Palaste () ------------- Finland --------\
    \-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
    "The trouble with the French is they don't have a word for entrepreneur."
    - George Bush
    Joona I Palaste, Oct 22, 2003
    #9
  10. Mladen Adamovic <> coughed up the following:

    > "Ferro" <> wrote:
    >> Java is slow!
    >> The other side of the moon is portability!

    >
    > I agree.
    > Other my opinions:
    > - class library in Java is very complicated and a bit buggy (i.e.
    > Swing) The other side of the moon is Java have very powerful class
    > library.


    I /mostly/ agree.

    "Java is fast" does seem to be a load of hype, much to my bitter
    disapointment through the years. :(! :(! :(! I've done amazing things with
    it, but no it isn't fast. And no, that is /not/ because I don't know how to
    program properly.

    I disagree that java is complicated. I very much like the class library,
    and don't find swing buggy, since 1.3 or so.
    Thomas G. Marshall, Oct 22, 2003
    #10
  11. Martin Wildam

    Roedy Green Guest

    On Wed, 22 Oct 2003 16:50:17 GMT, "Thomas G. Marshall"
    <> wrote or quoted
    :

    >
    >"Java is fast" does seem to be a load of hype, much to my bitter
    >disapointment through the years. :


    Why don't you just have a look at what Java is like natively compiled?

    See http://mindprod.com/jgloss/nativecompiler.html

    THEN perhaps you can speak with some authority on whether Java the
    LANGUAGE is slow, rather than some particular combination of out of
    date hardware and software.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    Roedy Green, Oct 22, 2003
    #11
  12. Roedy Green <> coughed up the following:

    > On Wed, 22 Oct 2003 16:50:17 GMT, "Thomas G. Marshall"
    > <> wrote or quoted
    >>

    >
    >>
    >> "Java is fast" does seem to be a load of hype, much to my bitter
    >> disapointment through the years. :

    >
    > Why don't you just have a look at what Java is like natively compiled?


    If you natively compile java, then you have broken java's wora paradigm.
    "Java" proper is a platform, not just a language.

    When people are complaining about java, they are talking about java compiled
    to byte codes running on a jvm, not some 3rd party native compilation.


    > See http://mindprod.com/jgloss/nativecompiler.html
    >
    > THEN perhaps you can speak with some authority


    I've been contracted to develop large scale java applications since just
    before java 1.0, so I ought to have plenty of "authority".


    > on whether Java the
    > LANGUAGE is slow, rather than some particular combination of out of
    > date hardware and software.


    Hardware???? What's that supposed to mean? You pick the hardware, and C++
    will outperform java tremendously. And I am enthralled with Java and /hate/
    C++ by the way.
    Thomas G. Marshall, Oct 22, 2003
    #12
  13. Martin Wildam

    Roedy Green Guest

    On Wed, 22 Oct 2003 21:34:13 GMT, "Thomas G. Marshall"
    <> wrote or quoted
    :

    >If you natively compile java, then you have broken java's wora paradigm.
    >"Java" proper is a platform, not just a language.


    You could do it moving the responsibility for native compilation from
    the developer to the consumer. I have suggested to the Jet people
    they should try to market their compiler for this purpose. The catch
    is , the free version is quite suited for that. You can natively
    compile from any Jar or set of class files. You don't have to be the
    developer!

    I think I read somewhere that someone had natively compiled Eclipse.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
    Roedy Green, Oct 22, 2003
    #13
  14. Roedy Green wrote:

    > I think I read somewhere that someone had natively compiled Eclipse.


    Yes, it was done using GCJ, a java-to-native compiler from the gnu project:
    http://people.redhat.com/~jhealy/eclipse/

    --
    Regards,
    Christophe Vanfleteren
    Christophe Vanfleteren, Oct 22, 2003
    #14
  15. Martin Wildam

    VisionSet Guest

    "Joona I Palaste" <> wrote in message
    news:bn673s$r5c$...
    > Gary Labowitz <> scribbled the following:


    > > The simple points:

    >
    > > 1. There are only nine kinds of variables. They all have exactly defined
    > > properties.

    >
    > I.e. primitive types, references and array references?


    ie primitive types, object references

    But what the hell are the nine?!
    All the individual primitives? If so that isn't a simple point as there are
    simple rules that govern there relationships.

    --
    Mike W
    VisionSet, Oct 22, 2003
    #15
  16. "Joona I Palaste" <> wrote in message
    news:bn673s$r5c$...
    > Gary Labowitz <> scribbled the following:
    > > "Martin Wildam" <> wrote in message
    > > news:bn59uf$t1rgk$-berlin.de...
    > >> Hi folks,
    > >>
    > >> as I am about to switch to java, can somebody tell me the biggest
    > >> disadvantages of java so that I know where I will get the problems and

    > > where
    > >> the bottlenecks are?

    > > 2. Understanding that only variables are passed from method to method.

    >
    > Not "variables" - "values". For example:


    Correct. Okay.

    > > 1. There are only nine kinds of variables. They all have exactly defined
    > > properties.

    >
    > I.e. primitive types, references and array references?


    Please give example of array references. I only meant the eight primitives
    and references.
    --
    Gary
    Gary Labowitz, Oct 23, 2003
    #16
  17. "VisionSet" <> wrote in message
    news:svDlb.1230$...
    > "Joona I Palaste" <> wrote in message
    > news:bn673s$r5c$...
    > > Gary Labowitz <> scribbled the following:

    >
    > > > The simple points:

    > >
    > > > 1. There are only nine kinds of variables. They all have exactly

    defined
    > > > properties.

    > >
    > > I.e. primitive types, references and array references?

    >
    > ie primitive types, object references
    >
    > But what the hell are the nine?!


    byte, short, int, long, float, double, char, boolean, reference variable.

    Is there another?
    --
    Gary
    Gary Labowitz, Oct 23, 2003
    #17
  18. Gary Labowitz <> scribbled the following:
    > "Joona I Palaste" <> wrote in message
    > news:bn673s$r5c$...
    >> Gary Labowitz <> scribbled the following:
    >> > 1. There are only nine kinds of variables. They all have exactly defined
    >> > properties.

    >>
    >> I.e. primitive types, references and array references?


    > Please give example of array references. I only meant the eight primitives
    > and references.


    An array reference is simply a reference to an array. For example:
    int[] a;
    Object[] b;
    a and b are array references. I count them separately from object
    references because they support the [] operator, which object references
    do not.

    --
    /-- Joona Palaste () ------------- Finland --------\
    \-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
    "And according to Occam's Toothbrush, we only need to optimise the most frequent
    instructions."
    - Teemu Kerola
    Joona I Palaste, Oct 23, 2003
    #18
  19. Martin Wildam

    Daniel Dyer Guest

    On 22 Oct 2003 03:57:46 -0700, Lance Parkington
    <> wrote:

    > 4) GUI builders (eg VisualAge) easy to use but editing GUI for clients
    > several months into software development cycle usually requires
    > original IDE and difficult to maintain long .java files. If there are
    > import/export problems (as sometimes happens) with the IDE there is
    > real trouble!


    I agree, which is why most Java GUI developers would recommend that you
    don't use a GUI builder. It may have a steeper learning curve to start
    with but it pays off in the long term.

    > 5) Writing text to files determining whether to put newlines using
    > Strings "\n" or "\n" + "\r" or "\r" + "\n" or "\r" to get formatted
    > text readable by Microsoft Notepad using simple buffered writers


    This seems to be more a criticism of Notepad than Java. Most editors will
    display text files OK whether you are using UNIX or DOS line-endings.

    > 6) Basic GUI component JList does not have scrolling support as
    > standard so only useful for short lists unless adding JScrollPanes.
    > Once selected item in list second click does not deselect list
    > resulting in GUI cannot be reset to initialised state (ie list item
    > not selected).


    I'm not sure I understand why this is a problem. None of the GUI
    components support scrolling directly but all can be added to a
    scrollpane. Seems like a reasonably good solution to me.

    Your other points I agree with.

    Dan.


    --
    Daniel Dyer
    Empathy Software


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
    Daniel Dyer, Oct 23, 2003
    #19
  20. In article <>,
    Lance Parkington <> wrote:
    >4) GUI builders (eg VisualAge) easy to use but editing GUI for clients
    >several months into software development cycle usually requires
    >original IDE and difficult to maintain long .java files. If there are
    >import/export problems (as sometimes happens) with the IDE there is
    >real trouble!


    We use JBuilder, which creates GUI initialization code that is
    maintainable without the IDE. I never really understood why people
    would want to use a GUI builder which builds code that only itself
    understands and/or that the programmer isn't allowed to touch.

    >6) Basic GUI component JList does not have scrolling support as
    >standard so only useful for short lists unless adding JScrollPanes.


    Well, but then that's rather the point.

    Text areas don't support line wrapping text either, unless you call
    JTextArea's setLineWrap() method.

    I guess I just don't understand your objection.

    >Once selected item in list second click does not deselect list
    >resulting in GUI cannot be reset to initialised state (ie list item
    >not selected).


    This is standard behaviour. You need to use ctrl-click to unselect.
    While obscure, it's unfortunately how it's supposed to work.

    Cheers
    Bent D
    --
    Bent Dalager - - http://www.pvv.org/~bcd
    powered by emacs
    Bent C Dalager, Oct 23, 2003
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    53
    Views:
    3,992
    =?Utf-8?B?YWJ1bmV0?=
    Feb 3, 2006
  2. Sean Winship

    J2EE limitations and disadvantages

    Sean Winship, Dec 13, 2004, in forum: Java
    Replies:
    0
    Views:
    1,477
    Sean Winship
    Dec 13, 2004
  3. Mark Sizzler

    Disadvantages of "instanceof"

    Mark Sizzler, Feb 16, 2005, in forum: Java
    Replies:
    7
    Views:
    832
    Tilman Bohn
    Feb 18, 2005
  4. Karim

    Disadvantages of Iframe

    Karim, Feb 11, 2004, in forum: HTML
    Replies:
    9
    Views:
    17,357
    David Dorward
    Feb 12, 2004
  5. sumankumar
    Replies:
    0
    Views:
    447
    sumankumar
    Aug 25, 2007
Loading...

Share This Page