473,769 Members | 7,315 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4178
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.c om...

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.co m> 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.co m> 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.co m> 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(collectio ns) 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.setTex t(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******@sciri ous.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.setTex t(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.setTex t(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******@sciri ous.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:

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

C#

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

textArea.Tex t = 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.getT imeInstance(Dat eFormat.DEFAULT , new Locale
("pt","BR")) ;
String s = dt.format(now);
jTextArea1.setT ext(s +"\t");
StringBuilder st = new StringBuilder(" a");
for (long i = 0; i < 100000000; i++) {
st.append("a");
}
Date now2 = new Date();
DateFormat dt2 = DateFormat.getT imeInstance(Dat eFormat.DEFAULT , new Locale
("pt","BR")) ;
String s2 = jTextArea1.getT ext() + dt2.format(now2 );
jTextArea1.setT ext(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 OutOfMemoryErro r exception and would not execute
properly.

Scirious.
Jun 26 '06 #10

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

Similar topics

48
8506
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 problem. The program may crash unexpectedly while writing to the file. If so, my program should detect this during startup, and then (during startup) probably delete the data added to the file and redo the writing operation.
31
2746
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, GTK or Qt-based). A web application will not do it (although I would love it). To make a long history short: I used to develop business apps for a living for a long time (up to the mid 90s). My last experiences were with Delphi and VB. I know...
16
2130
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 application on my OS. I can't think of a Java application that I would actually want or need? The Java Community just seems like a big, huge self-congratulatory group of
385
17303
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 extraneous jargons, such as in the Unix & Perl community. Unlike mathematicians, where in mathematics there are no fewer jargons but each and every one are
18
2368
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 was happily heading to refresh my C++ memory and learn MFC when I ran into this on Wikipedia: ".... applications written in Managed C++ have automatic garbage collection and will run via the .NET virtual machine, just as applications written...
10
3163
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 not using any upgrade tools, I'm just re-writing). I have be learning/testing .net with SDI type forms and now I'm actually working on the conversion, I'm starting to worry that VB.net
14
3887
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. Having a background in Pascal and some C++, I would have preferred those languages, but VBA made do. The SQL was fine. I believe that Security issues on the backend, and data integrity/ corruption complaints over the network may be a stumbling...
2
1406
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 know Delphi 2007 RAD Studio can do it but what about Visual Studio, and will there be a vb version? Thanks, Kees
19
1846
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 to for porting? I have nothing on hand at the moment, but I see this as a need without an obvious answer. -- Dotan Cohen http://what-is-what.com
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.