473,382 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Writing apps for Windows platform in Java? Why?


I like Java just as much as I like C#, but the truth is that unless
you absolutely need platform portability, DotNet is the way to go.

This is becoming even more true with the release of Windows Vista
later this year. Users will quickly get used to the flashy Mac-Like
UI of Vista and expect all their apps to support Vista specific
features. Java will try to play catchup but but the UI will stll be
primitive compared to .Net, and it will not perform as well on Windows
platform.

Just one more nail in the coffin to Java and the reason I've bailed on
it and I will stick with .Net for now.
Jun 2 '06 #1
12 4146
well,
Well You can give up Java, Java is not for the Faint of mind, the cowards,
the weak. Java is for intellectuals who believe in Open Source Program
Development, we are not folks to be held captive by a company in Redmond,
feeding their pockets, we are Linux,unix Messiahs. Even though the vista
Might look flashy I bet it gonna Gozzle a whole lot of memory and processing
power, and ask your self can you leave any microsoft server up for like a
year without rebooting definately not . with Unix/Java You can.Java Is not
playing catch up to nobody instead C# is the one trying to catch up on Java

"Von Clubusev" <vc@gaveup javaforgood.com> wrote in message
news:2h********************************@4ax.com...

I like Java just as much as I like C#, but the truth is that unless
you absolutely need platform portability, DotNet is the way to go.

This is becoming even more true with the release of Windows Vista
later this year. Users will quickly get used to the flashy Mac-Like
UI of Vista and expect all their apps to support Vista specific
features. Java will try to play catchup but but the UI will stll be
primitive compared to .Net, and it will not perform as well on Windows
platform.

Just one more nail in the coffin to Java and the reason I've bailed on
it and I will stick with .Net for now.

Jun 12 '06 #2
On Mon, 12 Jun 2006 18:27:03 GMT, "Juju" <Ne****@dodo.com> wrote:
well,
Well You can give up Java, Java is not for the Faint of mind, the cowards,
the weak. Java is for intellectuals who believe in Open Source Program
Development, we are not folks to be held captive by a company in Redmond,
feeding their pockets, we are Linux,unix Messiahs. Even though the vista
Might look flashy I bet it gonna Gozzle a whole lot of memory and processing
power, and ask your self can you leave any microsoft server up for like a
year without rebooting definately not . with Unix/Java You can.Java Is not
playing catch up to nobody instead C# is the one trying to catch up on Java


There are a few dozen COBOL programmers out there saying the same
thing about their language too. Old farts die hard.

Jun 13 '06 #3
Pugh wrote:
On Mon, 12 Jun 2006 18:27:03 GMT, "Juju" <Ne****@dodo.com> wrote:
well,
Well You can give up Java, Java is not for the Faint of mind, the cowards,
the weak. Java is for intellectuals who believe in Open Source Program
Development, we are not folks to be held captive by a company in Redmond,
feeding their pockets, we are Linux,unix Messiahs. Even though the vista
Might look flashy I bet it gonna Gozzle a whole lot of memory and processing
power, and ask your self can you leave any microsoft server up for like a
year without rebooting definately not . with Unix/Java You can.Java Is not
playing catch up to nobody instead C# is the one trying to catch up on Java


There are a few dozen COBOL programmers out there saying the same
thing about their language too. Old farts die hard.


Uhm, Pugh, I'm not sure exactly what you mean by your comment.
Do you mean that Cobol coders claim that COBOL is totally leet?

And Juju, are you being ironic, sarcastic or both (in this context, yes
there would be a difference between the two, at least in my eyes)?
Just looking at the sys reqs for Vista tells you that it will eat
memory, cpu and gpu.
Hell, if your computer isn't ancient, it will use DirectX 9 for
rendering the Windows in 3D,
quite similar to Project Looking Glass (which I believe uses OpenGL).
And yes, you can leave a Windows computer running for a year straight,
but you had better not connect it to da intahrweb if you do, cause
there'll be a lot of vulnerabilities you should have fixed through
Windows Update along the way.
Only retards need to reinstall Windows twice a year, and only idiots
need to ever reinstall it at all.
Heck only time I reinstalled Windows XP was after my PSU fried my
computer, and all my hard drives (actually anything connected to large
molex connectors got fried and the motherboard).
I've never had to reinstall any Linux distros either, but there are new
distros coming all the time,
so usually you have to reboot more than once a year because of nice new
kernels, or simply that you suddenly have an unsupported legacy distro.
But I've had Linux comps up for several months straight.

Anyway, there are reasons to code in Java,
but if you're going to only support Windows anyway,
a lot of those reasons tend to disappear.
Especially since C# is very similar to Java in just about every way
imaginable,
so coding something in C# instead, should be relatively simple for those
who are familiar with Java.
So coding in Java should be done either because:

1. You love Java so much and find it to have real ultimate power and
it's totally sweet. Java for teh win.

or

2. You want to run your apps on Linux/OS X/Amiga OS(I'm not sure if
there's Java support even on PPC based Amiga OS machines)/Solaris ++ ++

Sure C# is supposed to be cross-platform, but I doubt any DirectX stuff
you decide to put into it is very cross-platform unless someone makes a
managed DirectX to OpenGL wrapper for other platforms.
Jun 13 '06 #4
Pugh wrote:
On Mon, 12 Jun 2006 18:27:03 GMT, "Juju" <Ne****@dodo.com> wrote:

well,
Well You can give up Java, Java is not for the Faint of mind, the cowards,
the weak. Java is for intellectuals who believe in Open Source Program
Development, we are not folks to be held captive by a company in Redmond,
feeding their pockets, we are Linux,unix Messiahs. Even though the vista
Might look flashy I bet it gonna Gozzle a whole lot of memory and processing
power, and ask your self can you leave any microsoft server up for like a
year without rebooting definately not . with Unix/Java You can.Java Is not
playing catch up to nobody instead C# is the one trying to catch up on Java

There are a few dozen COBOL programmers out there saying the same
thing about their language too. Old farts die hard.

I would suggest more than a few dozen. And they primarily exist in the
mainframe world, which is now considerably reduced from the hardware
vendors of some 40 years back. You can't really give OO a shot if you
haven't got the appropriate COBOL compiler can you ? There is an Hitachi
compiler lurking around, not sure if it is mainframe but anyway it's
restricted to use in Japan only. Currently there is an OO compiler being
developed by Fujtsu-Siemens in Germany.

As for dear old Big Blue, couple of years old now but you can use OO
with their Enterprise compiler. While it follows the J4 (COBOL 2002
Standard) to produce Class/Factory/Instance syntax all classes inherit
from Base. Guess what; in IBM's case it reads :-

MyClass inherits from JavaBase !

Java creates/destroys objects plus uses Java support classes for
lists(collections) and GUI-ing.

Now if as a result of some mental aberration you can persuade your
installation to upgrade to IBM Enterprise ($??????) then you can get
into OO.

PC-wise down basically to (a) Liant (RM/COBOL), Acu COBOL, HP/Compaq -
these three use ancillary tools for GUI-ing - not true OO. (b) Fujitsu
and Micro Focus both have fool-bloodied OO (as well as Procedural)
giving support classes for both collections/lists and GUI controls, plus
the Web. In addition inter-language operability to invoke or be invoked
from Java or C++ etc. Both since have now got into the dotNet game.

Can't tell you how well Fujitsu functions because they don't have any
sort of newsgroup to guage what developers are doing. On the other hand
Micro Focus has their own Forum. Most questions are directed at one of
their GUI tools Dialog System - which comes with a set of template
applications per GUI control. But this allows them to avoid truly
dabbling in OO. Now they get stuck - great reticence to 'expand' on what
the templates allow. For example you want to change which icons are
displayed in a Treeeview. Can't do it by accessing Public methods.
Achievable by sub-classing - but they shudder at super and sub-classing.

Meanwhile of course the above two compilers provide a link to dotNet and
VB, C# whatever. Given that Visual Studio look-and-feel and a Treeview
of methods per class you are coding - suddenly the light begins to
shine. Next question, why stick with COBOL - go dotNet!

Hindsight - but way back around early eighties - if COBOL had taken note
of what the Xerox PARC team were doing - the world could be known as
COBOL/Smalltalk. Perhaps the foundation stone for the Bellingham
University may have have been laid. Sadly, James Gosling might still be
up here in Calgary twiddling this thumbs. :-)

Jimmy
Jun 14 '06 #5
I don't know about the future but I've just done a test now and Java ran
a lot faster then .NET. If you wanna test yourself just do the
following: Create a simple GUI with a text area and a button. On a
button click event put the following code:

JAVA

String st = "a";
for (int i = 0; i < 30000; i++ ) {
textArea.setText(st);
st += "a";
}
System.exit(0);

C#
string st = "a";
for (int i = 0; i < 30000; i++ ) {
textArea.Text = st;
st +="a";
}
this.Close();

The results I got executing this code, on the same machine, were:

Java, executed in 1 minut and ~40 seconds, used near to 30 MB of RAM.

C# .NET, didn't finished executing in more than 5 minuts, so I ended it
by force. Used near to 10 MB of RAM during this time.

I don't know what you might think, but for mem Java performed a lot
better even though it used more RAM.

The Versions used ware: JVM 1.5.0_07
.NET 2.0 (Visual C# Express 2005)
Jun 25 '06 #6
On Sat, 24 Jun 2006 22:55:05 -0500, Scirious <sc******@scirious.com>
wrote:
I don't know about the future but I've just done a test now and Java ran
a lot faster then .NET. If you wanna test yourself just do the
following: Create a simple GUI with a text area and a button. On a
button click event put the following code:

JAVA

String st = "a";
for (int i = 0; i < 30000; i++ ) {
textArea.setText(st);
st += "a";
}
System.exit(0);

C#
string st = "a";
for (int i = 0; i < 30000; i++ ) {
textArea.Text = st;
st +="a";
}
this.Close();


I cannot speak for the optimal way in Java, but in C# this is an
extremely poor way to implement string concatenation. All but the
most inexperienced C# developer would use an instance of the
StringBuilder class to do string concatenation in a loop. The String
type has some other advantages in .Net but concatenation is not one of
them. I think you'll find the results quite a bit speedier, it would
be interesting to know how the results compare to Java. Also be sure
that when you test C# code you are compiling to Release rather than
Debug and that you have appropriate optimizations turned on.

As always, the effectiveness of the software often has more to do with
the programmers proficiency level in the language he is using rather
than some dependency on the language itself. About 7-8 years ago
there was some sort of VB versus C++ competition, and essentially the
outcome was that a well-seasoned VB programmer could write an
application that ran circles around an equivilent app produced by an
average C++ developer.

Jun 25 '06 #7
Both are poor programming in their respective languages. Java also has
the StringBuilder class that is a lot better to use concatenation. The
code would be the folloing for the optimal usage:

Java:

StringBuilder sb = new StringBuilder("a");
for (int i = 0; i < 30000; i++) {
sb.append("a");
}
textArea.setText(sb.toString());

C#

StringBuilder sb = new StringBuilder("a");
for (int i = 0; i < 30000; i++) {
sb.Append("a");
}

textArea.Text = sb.ToString();

With the code above both run so fast that I can't measure with the
resources Ihave. However, notice that I put the toString()/ToString()
outside the loop.If I set the text of the textarea inside the loop with
StringBuilder, none of the codes end before I decide to stop it by
force.
Jun 25 '06 #8
On Sun, 25 Jun 2006 16:33:15 -0500, Scirious <sc******@scirious.com>
wrote:
Both are poor programming in their respective languages. Java also has
the StringBuilder class that is a lot better to use concatenation. The
code would be the folloing for the optimal usage:

Java:

StringBuilder sb = new StringBuilder("a");
for (int i = 0; i < 30000; i++) {
sb.append("a");
}
textArea.setText(sb.toString());

C#

StringBuilder sb = new StringBuilder("a");
for (int i = 0; i < 30000; i++) {
sb.Append("a");
}

textArea.Text = sb.ToString();

With the code above both run so fast that I can't measure with the
resources Ihave.
Doesn't seem like you're trying to be very resourceful, its quite easy
to time code down to the milliseconds or just increase the number of
iterations to the point where you would be measuring it in terms of
seconds.
However, notice that I put the toString()/ToString()
outside the loop.If I set the text of the textarea inside the loop with
StringBuilder, none of the codes end before I decide to stop it by
force.


And at no point during this experiment did it occur to you that
there's a possibility setting the Text property of the textArea is
your bottleneck?

That was one of my basic problems with this rather haphazard
benchmarking experiment. The reader was left to guess what textArea
might be. Assuming it is a TextBox control on a WinForm app, you
would be comparing apples to oranges by comparing performance against
whatever Java control resembles it the most. A TextBox control in
..Net is designed to do certain things well, and sticking large strings
in it one character at a time in a loop would be a very unrealistic
functionality scenario (anyone in their right might would build the
string up first, then assign it to the textbox).

I would be interested in knowing what kind of performance differences
you notice on your machine wth the controls removed from the equation.
Just make the number of iterations longer, and it C# you can save the
time before the loop starts and put the result in a TimeSpan value to
see how much time has elapsed.
Jun 25 '06 #9
Well, yet I don't get the milliseconds but with the following code results
were different. the code was:

Java:

Date now = new Date();
DateFormat dt = DateFormat.getTimeInstance(DateFormat.DEFAULT, new Locale
("pt","BR"));
String s = dt.format(now);
jTextArea1.setText(s +"\t");
StringBuilder st = new StringBuilder("a");
for (long i = 0; i < 100000000; i++) {
st.append("a");
}
Date now2 = new Date();
DateFormat dt2 = DateFormat.getTimeInstance(DateFormat.DEFAULT, new Locale
("pt","BR"));
String s2 = jTextArea1.getText() + dt2.format(now2);
jTextArea1.setText(s2);

C#

DateTime dt = DateTime.Now;
textBox1.Text = dt.ToString()+"\t";
StringBuilder st = new StringBuilder("a");
for (int i = 0; i < 100000000; i++) {
st.Append("a");
}
DateTime dt1 = DateTime.Now;
textBox1.Text += dt1.ToString();

I'm not sure if those are the best way to do it in their respective
langages, but the results were:

..NET uses up to 335 MB of RAM and takes up to 5 seconds to finish.

Java uses up to 510 MB of RAM and takes up to 7 seconds to finish.
Actually, I had t start the JVM using the -Xmx550m switch because otherwise
it would cause the OutOfMemoryError exception and would not execute
properly.

Scirious.
Jun 26 '06 #10
On Sun, 25 Jun 2006 23:28:04 -0500, Scirious <sc******@scirious.com>
wrote:
I'm not sure if those are the best way to do it in their respective
langages, but the results were:

.NET uses up to 335 MB of RAM and takes up to 5 seconds to finish.

Java uses up to 510 MB of RAM and takes up to 7 seconds to finish.
Actually, I had t start the JVM using the -Xmx550m switch because otherwise
it would cause the OutOfMemoryError exception and would not execute
properly.


Thanks for re-working it. These results mirror other benchmarks I've
seen of Java vs. .Net. It's to be expected when you think about it,
Java is designed for multi-platform development where .Net is going to
have a natural speed advantage on Windows. Even when Microsoft was
creating their own JVM, it was substantially faster than Sun's.
Jun 26 '06 #11
G.T. wrote:
On Sun, 25 Jun 2006 23:28:04 -0500, Scirious <sc******@scirious.com>
wrote:
I'm not sure if those are the best way to do it in their respective
langages, but the results were:

Instead of Date objects I would just use the System.nanoTime() function
(unlike currentTimeMillis it gives you accurate timing in nano seconds)...
There's probably something similar available in C#...
Thanks for re-working it. These results mirror other benchmarks I've
seen of Java vs. .Net. It's to be expected when you think about it,
Java is designed for multi-platform development where .Net is going to
have a natural speed advantage on Windows. Even when Microsoft was
creating their own JVM, it was substantially faster than Sun's.


Actually .NET is cross-platform, or at least supposed to be.
There are VMs available for Linux for instance, I think only things like
managed directx is unsupported on other platforms.
It wasn't just the MS JVM that was faster, but they if I remember
correctly, kind of screwed with the byte code too, and had some
optimizing there in their J++ compiler, which wasn't 100% supported on
other JVMs.
MS weren't that great at keeping up with specs, and added a lot of their
own stuff in there, which was why they got sued, but yeah, it was faster,
but I believe that IBM's JVM is faster than Sun's, and there are other
JVMs out there that are supposed to be faster than Sun's...
It's sort of like comparing GCC with VC, GCC has great support for
platforms(works on almost any platform imagineable, very easy to add new
support as well), it also has support for features in newer C/C++ specs
than VC, but VC is insanely fast and has one of the best optimizers
around...
Jun 27 '06 #12
"Sigmund Hansen" <si******@student.hf.uio.no> wrote in message
news:k0%ng.2768$YI3.160@amstwist00...

Actually .NET is cross-platform, or at least supposed to be.
I think it's rather ".NET is kind of cross-platform, despite the fact
that it's not supposed to be." I don't think, when Microsoft designed .NET,
that crossplatform capabilities was one of their goals. It's just that by
using a VM-based language makes it easier for 3rd parties (like the Mono
development team) to write VMs on other platforms.

There's various copyright issues with the .NET API library for example
which prevents some parts of it from being ported over to Mono, for example
(I think most notably the GUI parts).
There are VMs available for Linux for instance, I think only things like
managed directx is unsupported on other platforms.
AFAIK, nothing is supported on other platforms. That is, if you run a
Mono on Linux, and you have problems and you call Microsoft, they're not
gonna help you.
It wasn't just the MS JVM that was faster, but they if I remember
correctly, kind of screwed with the byte code too, and had some optimizing
there in their J++ compiler, which wasn't 100% supported on other JVMs.
MS weren't that great at keeping up with specs, and added a lot of their
own stuff in there, which was why they got sued,
Right: Sun owns the trademark for the term "Java", and you can't call
your product a "Java Virtual Machine" without Sun's permission. Sun provides
a license which allows you to call your product a "Java Virtual Machine" as
long as it's actually compatible with Java (they actually have a testing
suite to test your JVM against). Microsoft's JVM wasn't compatible with
Java, and thus they were illegally using the trademarked term.
but yeah, it was faster,
but I believe that IBM's JVM is faster than Sun's, and there are other
JVMs out there that are supposed to be faster than Sun's...
It's sort of like comparing GCC with VC, GCC has great support for
platforms(works on almost any platform imagineable, very easy to add new
support as well), it also has support for features in newer C/C++ specs
than VC, but VC is insanely fast and has one of the best optimizers
around...


Interesting, I never knew this about GCC/VC.

- Oliver

Jun 29 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

48
by: Joseph | last post by:
Hi I'm writing a commercial program which must be reliable. It has to do some basic reading and writing to and from files on the hard disk, and also to a floppy. I have foreseen a potential...
31
by: Carlos Ribeiro | last post by:
Hello all. I'm in the process of writing a business app in Python. (defining business app: data entry, validation, interactive reports, etc). For my purposes, it must be a native app (wxWidgets,...
16
by: The Ruling Class | last post by:
With all the books and code written in Java, why are there no /killer/ applications? Can you name one Java application that is a must have? I run Suse 9.0 -- I don't see a single Java...
385
by: Xah Lee | last post by:
Jargons of Info Tech industry (A Love of Jargons) Xah Lee, 2002 Feb People in the computing field like to spur the use of spurious jargons. The less educated they are, the more they like...
18
by: steve.anon | last post by:
Hi I'm a Java developer moving to windows only applications. Of course the first thing I thought was "well at least, without the VM now I can write desktop applications that run real fast". So I...
10
by: Sarah Smith | last post by:
Hello, I am a bit of a newbie to VB.NET, but not totally new. I took the plunge recently and decided (along with my colleagues), to try to convert/port a VB6 client/server app to .Net. (I'm...
14
by: ApexData | last post by:
I am considering building some distributable commercial applications. For about a year now, I have been using Access2000. This was my first venture into object oriented database development. ...
2
by: Kees de Winter | last post by:
I'd like to know which programming environments can target the windows vista platform without being dependent on .net. So that my application will also run on XP and 2000 without .net installed. I...
19
by: Dotan Cohen | last post by:
I often see mention of SMBs that either want to upgrade their Windows installations, or move to Linux, but cannot because of inhouse VB apps. Are there any Python experts who I can reference them...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.