Why not written in Java?

J

Joshua Jung

Hello all you wonderful experts :D

I am currently doing some research for a startup company and am looking at
what language we should use to program our client/server GUI application.
Our target audience is all home PC and Mac users and small businesses.

My current programming knowledge includes a decent amount of C++ (Borland
and Visual Studio IDE) and some Visual Basic and recently I picked up
Java. I also have experience in several web-based languages.

After doing extensive research and even spending several weeks
learning Java for research and building a client/server app in it
(which was quite easy and fun btw!) here is the question that has been in
the back of my mind for quite some time: why is Java not used more?

Here is a list of the programs that I use regularly that are not built in
Java (AFAIK) and are cross-platform compatible:

iTunes (Mac or Windows)
Skype (Mac, Windows, Linux)
OpenOffice (Just about anything AFAIK)
Firefox (same)
Thunderbird (same)
Blender 3D Modeler
Gaim (I think its cross-platform compatible)

AFAIK, I could be wrong, these are all built in C++. Why? If
these companies were strongly for cross-platform compatibility and many of
them are all about open source, why are they not using Java? From what I
know right now, I would have built them in Java (or tried to), why didn't
they? What do they know that I don't?

Could someone who was involved in any of these projects please let me know
the reasoning that a software development team gives for NOT using Java
even when they intend for their project to be cross-platform compatible?
It seems to me that if Java was so adaptable and capable all of these
programs would have been built in it!

Thanks in advance for your advice...

Josh <><
 
A

Alan Meyer

Joshua said:
...
AFAIK, I could be wrong, these are all built in C++. Why? If
these companies were strongly for cross-platform compatibility and many of
them are all about open source, why are they not using Java? From what I
know right now, I would have built them in Java (or tried to), why didn't
they? What do they know that I don't?
...

C++ offers many advantages over Java, including:

Much smaller memory footprint.
Faster program startup time.
Faster execution speed for many kinds of operation
(though Java is also fast for some things)
No required JRE runtime package installation
(if statically compiled, C++ will not require
libraries on the target computer - though
very often C++ programmers do require them.)
Finer grained control over memory and thread
management.
Native user interfaces (e.g., Windows, not Swing)
More access to the environment.
Multiple inheritance.
Programmer supplied destructors.

The cost for this is:
Much more difficult to write cross platform applications.
More complicated programming - slower development.
More challeng programming environment. The programmer
must manage memory himself.

For applications in a controlled environment, e.g.,
running on a server, I would normally prefer Java.
For applications running on many different computers
that I don't control, and with enough users to justify
the extra cost of C++ development, I might prefer C++.

Alan
 
O

Oliver Wong

Joshua Jung said:
why is Java not used more?

Here is a list of the programs that I use regularly that are not built in
Java (AFAIK) and are cross-platform compatible:

For every program you list, I'll try to think of a reason why a similar
program could not be written in Java. You'll notice that for the many of
them, I can't come up with a reason, and sometimes I'll even link to a
program written in Java which does something similar. Obviously, I can't say
why that specific program wasn't written in Java. You'd have to ask the
developers that question. Perhaps they simply don't know/like Java very
much?
iTunes (Mac or Windows)

JMF, the Java Media Framework, is something of a mess (IMHO). Poorly
documented and poor support means processing media files is a bit of a pain.
That said, check out http://jajuk.sourceforge.net/
Skype (Mac, Windows, Linux)

Can't think of any reason why not.
OpenOffice (Just about anything AFAIK)

Apparently, politics was a factor in limiting the amount of Java in OO.
See http://en.wikipedia.org/wiki/OpenOffice.org#Java_controversy That said,
some portions of OO are indeed written in Java.
Firefox (same)

Can't think of any reason why not. Perhapse the fast start-up time was a
key requirement.
Thunderbird (same)

Can't think of any reason why not.
Blender 3D Modeler

Can't think of any reason why not. See http://aoi.sourceforge.net/index
Gaim (I think its cross-platform compatible)

Can't think of any reason why not. See http://jclaim.sourceforge.net/

- Oliver
 
J

Joshua Jung

For applications in a controlled environment, e.g.,
running on a server, I would normally prefer Java.
For applications running on many different computers
that I don't control, and with enough users to justify
the extra cost of C++ development, I might prefer C++.

Alan

Thanks for your help! That makes quite a lot of sense... which is why I am
now looking into wxWidgets. Appears to be a fairly solid platform and if
necessary we could modify source as well.

Thanks again,

Josh <><
 
D

Daniel Dyer

Hello all you wonderful experts :D

I am currently doing some research for a startup company and am looking
at
what language we should use to program our client/server GUI application.
Our target audience is all home PC and Mac users and small businesses.

My current programming knowledge includes a decent amount of C++ (Borland
and Visual Studio IDE) and some Visual Basic and recently I picked up
Java. I also have experience in several web-based languages.

After doing extensive research and even spending several weeks
learning Java for research and building a client/server app in it
(which was quite easy and fun btw!) here is the question that has been in
the back of my mind for quite some time: why is Java not used more?

Java is used more, just not where you can see it. It's very widely used
for server applications (e-commerce sites, trading applications, etc.).
I'd guess that the vast majority of the professional Java developers who
frequent this group are developing software that is mostly server-side.
And quite a few of the others are probably working with mobile devices.
Here is a list of the programs that I use regularly that are not built in
Java (AFAIK) and are cross-platform compatible:

iTunes (Mac or Windows)
Skype (Mac, Windows, Linux)
OpenOffice (Just about anything AFAIK)
Firefox (same)
Thunderbird (same)
Blender 3D Modeler
Gaim (I think its cross-platform compatible)

AFAIK, I could be wrong, these are all built in C++. Why? If
these companies were strongly for cross-platform compatibility and many
of
them are all about open source, why are they not using Java? From what I
know right now, I would have built them in Java (or tried to), why didn't
they? What do they know that I don't?

iTunes is a special case in that, as far as I am aware, it was originally
intended to be cross-platform. It is only comparitively recently that
Apple decided to release a Windows port. On the Mac it's part of the
iLife suite, which is very much a Mac-only thing, intended to woo Windows
users to switch to the Mac experience. The integration with the OS and
its UI is obviously much closer with a native application.

Skype could probably have been written in Java and still been just as
successful (just like Limewire is). Maybe one reason they decided against
it is that Skype uses proprietary protocols and algorithms and Java is
typically easier to reverse engineer than native code.

Likewise, Gaim could be done in Java with no problems, but probably isn't
due to its Gnome/Linux roots.

The developers of the other applications on your list would probably,
rightly or wrongly, cite performance considerations (Blender in
particular).

OpenOffice has it's roots in Star Office, which although now owned by Sun,
was originally developed by the German company Star Division. Corel tried
to sell a Java office suite in the 90s, but it flopped quite badly. It
would be a more feasible endeavour now given the progress in both Java and
PC technology. OpenOffice performs abysmally any way, even though it
wasn't developed in Java. And the experience is pretty poor on the Mac,
where there isn't a proper native version.

Could someone who was involved in any of these projects please let me
know
the reasoning that a software development team gives for NOT using Java
even when they intend for their project to be cross-platform compatible?
It seems to me that if Java was so adaptable and capable all of these
programs would have been built in it!

Thanks in advance for your advice...

Some reasons not to use Java on the desktop:

1). If you need access to native APIs such as Win32 and DirectX, or to
interface with hardware devices.

2). In the past Java applications didn't look quite right. Swing has
improved considerably in this respect in recent versions, and there is now
SWT as an alternative.

3). Footprint. Java applications tend to use lots of memory. But then
so does iTunes.

Cross-platform desktop applications that are written in Java:

Limewire, Oracle admin tools, Sybase admin tools, several online poker
rooms and casinos, most Java development tools, many non-Java development
tools.

See Swing Sightings (http://java.sun.com/products/jfc/tsc/sightings/) for
many more.


Dan.
 
D

Daniel Dyer

iTunes is a special case in that, as far as I am aware, it was
originally intended to be cross-platform.

That should read "...not originally intended..."

Dan.
 
T

Thomas Hawtin

Oliver said:
JMF, the Java Media Framework, is something of a mess (IMHO). Poorly
documented and poor support means processing media files is a bit of a
pain. That said, check out http://jajuk.sourceforge.net/


There is an iTunes clone written in Java.

http://sourceforge.net/projects/jtunes4/

Apple hasn't been great in its support for Java.
Apparently, politics was a factor in limiting the amount of Java in
OO. See http://en.wikipedia.org/wiki/OpenOffice.org#Java_controversy
That said, some portions of OO are indeed written in Java.

It's based StarOffice which predates Java.
Can't think of any reason why not. Perhapse the fast start-up time
was a key requirement.

It's derived from Mosaic, which predates Java.
Can't think of any reason why not.

It's derived from the same source as Firefox, which predates Java.

Tom Hawtin
 
S

Scott Ellsworth

Oliver Wong said:
Joshua Jung said:
why is Java not used more?

Here is a list of the programs that I use regularly that are not built in
Java (AFAIK) and are cross-platform compatible:
[...]
Firefox (same)

Can't think of any reason why not. Perhapse the fast start-up time was a
key requirement.

Firefox derived from the Mozilla sources and team, and had strong roots
in Linux. Development, for those in the Linux world, often requires a
GPLed language that is installed for free on virtually all systems that
you want the end product to work on.

Java has its own licensing, and it is not GPLed. Thus, many in the
Linux world do not find it acceptable for any purpose. (I happen to
disagree with this stance, but I can see their point.) Therefore, if
you are developing for Linux, you risk alienating some fervent platform
advocates if you require Java.

This is primarily a political, not a technical, problem. A great many
projects run in Java that are hosted on Linux - I have worked on several
myself. Without a GPLed Java distribution for Linux, though, it is
awfully hard to convince Linux developers that Java is a good language
for something intended for the typical Linux user. After all, a typical
user should be able to use the tool without agreeing to non-GPL
agreements.

I keep hearing rumors that Sun will open source Java, at least for the
Linux world, which would make a difference.

Scott
 
T

Timo Stamm

Daniel said:
iTunes is a special case in that, as far as I am aware, it was
originally intended to be cross-platform.

iTunes didn't really originate at Apple. It started off as SoundJam, a
Mac-only MP3 player, and was published by Mac-only distributor Casady &
Green (who went bancrupt in 2003) until it was acquired by Apple. It was
never intended to be cross-platform.

Another very popular mp3 player at this time was Audion by Panic. Cabel
Sasser, co-founder of Panic, wrote a very interesting article about the
whole story (you might feel different about iTunes after reading it):

http://panic.com/extras/audionstory/


Timo
 
D

Daniel Dyer

iTunes didn't really originate at Apple. It started off as SoundJam, a
Mac-only MP3 player, and was published by Mac-only distributor Casady &
Green (who went bancrupt in 2003) until it was acquired by Apple. It was
never intended to be cross-platform.

That's what I meant to say, that it *wasn't* intended to be
cross-platform. I think that's one reason why it's so memory hungry on
Windows.
Another very popular mp3 player at this time was Audion by Panic. Cabel
Sasser, co-founder of Panic, wrote a very interesting article about the
whole story (you might feel different about iTunes after reading it):

http://panic.com/extras/audionstory/

Thanks for that, I'm not so familiar with Mac history pre-OS X.

Dan.
 
A

Alan Meyer

Scott said:
.... Development, for those in the Linux world, often requires a
GPLed language that is installed for free on virtually all systems that
you want the end product to work on.

Java has its own licensing, and it is not GPLed. Thus, many in the
Linux world do not find it acceptable for any purpose.
...

You make some important points here.

A related point is that C and C++ are ANSI standard languages
while Java is not. Sun can make changes to Java and replace
all the JREs on user computers. Some developers may feel
that this exposes them to extra risks with Java.

Still, on technical merits alone, I think there are solid reasons
for choosing C or C++ for difficult, high performance, applications
where the developer may need to control things down to the
"bare metal" as we used to say, and where the user base is
large enough to justify the extra cost development as compared
to the simpler programming model in Java.

Alan
 
L

Luc The Perverse

Alan Meyer said:
You make some important points here.

A related point is that C and C++ are ANSI standard languages
while Java is not. Sun can make changes to Java and replace
all the JREs on user computers. Some developers may feel
that this exposes them to extra risks with Java.

Still, on technical merits alone, I think there are solid reasons
for choosing C or C++ for difficult, high performance, applications
where the developer may need to control things down to the
"bare metal" as we used to say, and where the user base is
large enough to justify the extra cost development as compared
to the simpler programming model in Java.


Yes - in general Java is made for designing high end user applications. It
is not really the best choice for hardware based designs.
 
R

Robert J. Hansen

Warning: nobody's ever accused me of being a Java zealot, but people
have in the past accused me of being a C++ zealot. They're wrong, but
the accusation has been made, and so I should bring it up. :)
(which was quite easy and fun btw!) here is the question that has been in
the back of my mind for quite some time: why is Java not used more?

Honestly? Usually it's a combination of history, politics and
prejudice. Sometimes it's because the application depends on a
C++-only library.

History: it's only recently (as of Java 1.4 and later) that Java has
really been able to compete with native code for heavy lifting. For
software projects that started prior to Java 1.4, they probably used a
different language out of sheer necessity.

Politics: a lot of the projects you've made mention of are open source.
The majority of open source users and developers are sane, calm,
rational and friendly. Some of them, though, need to be reminded that
Thorazine is available in seven different delicious fruit flavors. Any
open-source project is going to reflect the beliefs of its developers
and will be heavily influenced by feedback from users... and the
Thorazine-needing crowd tends to be very, very vocal.

Prejudice: "Java is slow and bloated." C++ got unfairly painted with
this brush for years. Now Java is the new favorite "slow and bloated"
whipping boy. Generally speaking, there's little to no truth to the
prejudice--but the prejudice exists.
iTunes (Mac or Windows)

No idea: I haven't seen the source.
Skype (Mac, Windows, Linux)

AFAIK, Skype is C++ because they wanted to use Qt, a C++ UI library, to
allow them to write once and get native-looking code everywhere.
OpenOffice (Just about anything AFAIK)

Substantially predates Java. OpenOffice is based on the old StarOffice
codebase, which is about as old as the hills.
Firefox (same)

Based on Mozilla, which began in 1998 during the (thinks...) Java 1.1
days. Java 1.1 was unequivocally not up to the task then.
Thunderbird (same)

Based on the Mozilla email client code. Likewise.
Blender 3D Modeler

No idea.
Gaim (I think its cross-platform compatible)

Open source issues. When Gaim was first being written, there was no
open-source Java environment.
 
B

Brandon McCombs

Limewire, Oracle admin tools, Sybase admin tools, several online poker
rooms and casinos, most Java development tools, many non-Java
development tools.

Don't even get me started on the quality (look n' feel, performance,
etc.) of Oracle admin tools. They don't seem to know the Java language
that well and/or do a piss-poor job of making their own widgets which
affects the quality of the tools they provide. That wouldn't be too much
of a problem except just about all their admin tools are java now and
the tools suck because of it.
 
M

Mark Space

Joshua said:
Thanks for your help! That makes quite a lot of sense... which is why I am
now looking into wxWidgets. Appears to be a fairly solid platform and if
necessary we could modify source as well.

Thanks again,

Josh <><

Personally, I would prototype in Java. Maybe even release version 1.0
in Java. Then when you have some real world profiling and user
feedback, re-write the critical sections in C/C++.
 
D

Daniel Dyer

Don't even get me started on the quality (look n' feel, performance,
etc.) of Oracle admin tools. They don't seem to know the Java language
that well and/or do a piss-poor job of making their own widgets which
affects the quality of the tools they provide. That wouldn't be too much
of a problem except just about all their admin tools are java now and
the tools suck because of it.

I know. I was just giving an example of something that was written in
Java (pre-1.2 I think). The Sybase tools are at least as bad.

Dan.
 
H

Hendrik Maryns

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thomas Hawtin schreef:
There is an iTunes clone written in Java.

http://sourceforge.net/projects/jtunes4/

Apple hasn't been great in its support for Java.


It's based StarOffice which predates Java.


It's derived from Mosaic, which predates Java.


It's derived from the same source as Firefox, which predates Java.

And now there is Grendel: http://wiki.mozilla.org/Grendel

- --
Hendrik Maryns

==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFEtPCle+7xMGD3itQRArnHAJ4pcJ/6Q9FUPX0CWmnyso2uO7vGOwCfdHrr
0h7lgVy2iLS5FOuC7fYeOAQ=
=kBrW
-----END PGP SIGNATURE-----
 
A

Andy Dingley

Alan said:
C++ offers many advantages over Java, including:

IMHO, the most significant ones are that:

C++ offers many advantages over Java for _desktop_GUI_apps_, including:

1) A vast horde of experienced desktop GUI app coders, already used to
working in C++
(In contrast, the majority of Java experience is in back-ends)

2) Java has historically had ugly and unpopular GUI toolkits
 
E

Ed Jensen

Robert J. Hansen said:
Prejudice: "Java is slow and bloated." C++ got unfairly painted with
this brush for years. Now Java is the new favorite "slow and bloated"
whipping boy. Generally speaking, there's little to no truth to the
prejudice--but the prejudice exists.

I like Java. Even so, I'm realistic enough to know that the "Java is
bloated" argument is unfortunately true.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top