Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java .... practically for what?

 
Rohit Prakash Khare
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that Java is an internet language. But can it be used to write standalone programs like C/C++? What are the advantages of Java over C/C++? Is it suitable to write enterprise level standalone database applications or only for Web databases?
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rohit Prakash Khare:
I know that Java is an internet language. But can it be used to write standalone programs like C/C++?


Yes, absolutely, you can write standalone applications in Java.

What are the advantages of Java over C/C++?

a) safety in your code, less chance of error from using pointer arithmetic
b) not limited to one platform -- write once run anywhere (with a few limitations) -- Windows, DOS, MacIntosh, Linux, etc.

Is it suitable to write enterprise level standalone database applications ...?

Yes.
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For some good examples of standalone Java apps, see
Sun's Swing Sightings:
http://java.sun.com/products/jfc/tsc/sightings/S19.html
and to see the index of all the Swing sightings, go here:
http://java.sun.com/products/jfc/tsc/sightings

Brian
 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse is written in Java I believe using SWT. That is a great standalone program.
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it suitable to write enterprise level standalone database applications or only for Web databases?
Java is suitable for almost anything. Here is a good example, -- Java Runs Spirit Rover on Mars
 
Randall Twede
Ranch Hand
Posts: 4363
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java's only possible weakness in this regard, compared to C++, is execution speed.
 
Ruben Steins
Greenhorn
Posts: 15
Chrome IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A good (and long) report about the speed issue:
Evaluating Java for Game Development
There is even a quote in it from John Carmack (ID Software) which says a lot about the usability of Java for commercial apps:
"We are still working with significant chunks of an existing code base. If I did want to go off and start fresh, I would likely try doing almost everything in Java."
 
fred rosenberger
lowercase baba
Bartender
Posts: 12090
29
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My company develops a set of client and server apps. They were all written in C. We now support something like 20 flavors of various Operating Systems... Windows, Mac, Sun, etc. Oh, and we support 2 generations back.
it's very difficult to check in a bug fix to 20 versions x 3 generations.
we are now developing a Java client that will run against on all these OS. One code base that does everything.
someday, we'll re-write the servers too (if we can get enough staff). And these products have nothing to do with the Web. They're basically a kind of inventory management system.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic