Performance impact of IntelliJ IDEA vs NetBeans? [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
So, recently I've resumed my studies (2nd year HS) and in this year we'll be using Java as the primarily language for everything; I've been using Java independently for about a year and I love IntelliJ, however our teacher just refuses to even take a look at it, just demands to use NetBeans, regardless of the several technical arguments I've had with her.
She argues that it's because the computers are fairly old and crappy (which they are) but with that in mind, is that really a meaningful argument to give?
My ASUS laptop can handle IntelliJ pretty well with 16GB of RAM, as you can see here:
However, due to some weird installation problems I can't personally test NetBeans (yuck), and I'm not a fan of downgrading my RAM to 4GB (The capacity of the school's computers).
So my question is, would the performance impact of IntelliJ be substantial enough to justify the use of NetBeans, even though IDEA it's (In my opinion) a much better IDE?
And if so, wouldn't something lighter like Eclipse make more sense?

There is no straightforward answer to your question:
IntelliJ IDEA is a great Java IDE. Its main advantage over NetBeans and Eclipse is the better support for Android development (Android Studio which is built on IntelliJ IDEA became the official IDE for Android in 2013). In contrast to Eclipse, IntelliJ IDEA and NetBeans offer a more comprehensive range of out-of-the-box functions that making it easier for beginners. There are more plug-ins available each for IntelliJ IDEA and for Eclipse than for NetBeans. These are just some of the advantages of IntelliJ IDEA.
IntelliJ IDEA is a commercial product (although some parts are open source, but development is not driven by the community). For those who pay for a Java IDE, the higher memory requirements will probably not be a problem. Unlike Eclipse and NetBeans, IntelliJ IDEA's Git integration is realized by delegation to the Git command line (instead of using JGit), which has also some disadvantages. By default, files are automatically saved, but compiled before starting. Some like that, others prefer incremental compilation on saving as in Eclipse. Which one is the best Java IDE depends on the user's usage and preferences.
To answer your question, the higher memory requirement at only 4 GB of available RAM (your screenshot shows 637.3 MB / 4096 MB = 15.6 % only for the (idle?) IDE) is a valid argument against IntelliJ IDEA (especially when you consider that the memory requirements will continue to increase with each new version), but not an argument for NetBeans. The decision was certainly made not only because of this single argument. I would probably have given the arguments a different weighting and come to a different decision as your teacher.
However, you should appreciate the teacher explaining her decision. I guess you won't convince her to revise her decision. But why not develop at home with your favorite IDE and show/review the code to/with your teacher in her favorite IDE? You would get to know the advantages and disadvantages of at least two Java IDEs. Nobody is more annoying than those guys that tell people using the wrong thing just because it's not the thing they prefer.
A Mac user, an IntelliJ user, and a vegan walk into a bar. How do I
know? Well after 2 minutes THE WHOLE F'ING BAR KNEW!

Let's not talk about Eclipse and stick to NetBeans and IDEA. Cause I thing Eclipse is not match for these two at all! I guess It is good just for its lightness.
IDEA is not necessarily better IDE than NetBeans, I guess it's all about the magnitude of program you want to develop.
Netbeans is so much more lighter, faster, more intelligent and its features for network programming are amazing.
In other hand, IDEA is truly a great IDE for developing big softwares. It is more stable, more powerful, it has more functionality, and it has plugins that you can use without any worries.
As someone who has used both of them, I think Both are great, but I prefer Netbeans for light programs.

Related

How to be proficient and efficient with NetBeans? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Dear people of stackoverflow,
I am learning to code Java and recently switched from programming in text editors and compiling in terminal windows to an actual IDE, NetBeans (I know, I'm a dinosaur. I inherited the habit from C++). The point is, I'm really lost.
I installed NetBeans because I saw some friends from school open the application and write about 50 lines of code in half the time it took me. I'm guessing they use some sort of templates or customized settings.
I would really appreciate it if you could shed some light in the subject, because I want to be as fast and efficient as possible when coding, especially when dealing with really long assignments.
This isn't something that can be quickly answered in this format.
The main advantages are:
Intellisense/Code completion (start typing code, press ctrl-space)
As-you-type error checking and reporting with automatic fixes in some places
Code generation (source->generate code)
Navigation (go to source, go to decleration, find references, etc).
Integrated debugging
Refactoring (renaming variables, methods and classes; introducing classes and methods; etc).
Try all of those things to get you started but there are many many more.
There's not going to be any one silver bullet; this is the accumulation of many small efficiencies, including keyboard shortcuts, advanced features, templates, etc.
You should take a closer look at what your friends do, and each time you see them doing something you don't, ask them about it. Better yet, each time you come across a task that intuitively seems like there should be a better way to do it (e.g. typing a similar pattern over and over), google around and see if there is a better way. There likely is!
For a more rigorous approach, of course, you can read the NetBeans manual end-to-end in order to get a comprehensive understanding of its features. I've never done that for my IDE of choice, though.
Ok, you have an IDE (that's good!). With it you can make a lot of shortcuts for developing. Here some tips:
You can create a project using a template by going File -> New Project -> <LANGUAGE> -> <TEMPLATE>. This template will autogenerate a basic source for what you want.
You can put breakpoints in any place only clicking in a line number.
You can debug by going to Debug -> Debug Project
You can auto-generate a double-clickable .jar by going to Build -> Clean and Build
You can run a console program directly in the IDE, by using Build -> Run Project
You can even install plugins for extending the IDE's functionality
There're lots of things I'm not telling you, cause it's a long list. You can see NetBeans Documentation for more info.

Jdeveloper 11g dislikes [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
Firstly, in my opinion, this question is relative to programming, as much as the answers (and the question itself) is subjective, I would like to see some of these subjective opinions, and other ideas that come from it.
My company is deep in bed with oracle. They are making a strong move towards java, and well forcing JDeveloper down on us (me) as the 'best tool' for the job. Now, dont get me wrong, JDeveloper looks amazing, it has all these nice trinkets that would make anyone smile when unwrapping. But...
I tend to always end up having to investigate some tiny problem that the IDE suffers to do right. Essentially bugs. Like at times when for no reason EJB's do not deploy anymore. Or the ADF front end stop calling data controls for action buttons. Then I have the times that It crashes out completely when editing persistance information. In the end, I spend more time figuring out what is wrong with it, to no avail. And well, my company is not about the take out money to get support for the development tool. I end up sitting with problems that take hours up to days to resolve, which should be taking 10 minutes.
I have seen and experienced similar productivity killing problems in IBM's websphere products too. And not It's not just me, I have seen teams unable to work for days because of issues.
My solution to this has always been to use the eclipse j2ee set. It allows me to be more in control of everything that's being used. And so, even if eclipse gives me problems, I can resolve these issues. And well, personally, I would prefer my company accepting that as a preferred tool, as solving problems would be easier, and there would be more 'professionals' arround, as our problems would more likely be j2ee related, and server related rather than IDE related (We get tons of server side support). I feel the 'abstraction' that larger IDE's provide can cause lots of headache's and tend to be a project killer.
Why do I struggle so much with JDeveloper. Am I alone?
Is it wrong of me to take a stand and recommend going against JDeveloper as the core development tool in our company?
Because well, this is the 'campaign' I would like to walk into now, up to the point of demonstrating the flaws, as the video's only show the perfect moments.
You are not alone! I could rail against JDeveloper but i'll restrain myself.
Unfortunately, JDeveloper is the only IDE that supports all the Oracle-centric technology. So, while i'm sorry for your pain, and, trust me when i say, i understand more than you know, but, in an Oracle house, no other IDE will do. It's a real shame that you don't have support though. You'll likely need to file lots of bugs.
It's really unfortunate that Oracle seems insistent on continuing with JDeveloper even now that they own NetBeans. JDeveloper is far behind Eclipse and NetBeans. They'd have far greater developer acceptance of their technology if they actively supported Eclipse and/or NetBeans, at the very least, in parallel with JDeveloper. There's actually quite a nice, extensive set of technology in ADF that is being hidden behind and hampered by such a horrendous development tool.
And as a means to try and help you solve all the problems you'll encounter with JDeveloper, try this. Use two local mercurial or git repositories. One for your JDev system folder (init in the parent of system/) and a repo for your application/project. Before finishing (or starting) any wizard, add and commit (hg com -Am 'savepoint' or git commit -am 'savepoint') both repos. This'll give you a way to rollback and also diffs of how JDeveloper broke a working project which might give you clues about how to fix things.
Also, you might want to keep a log for your managers to show how much time you spend managing JDeveloper instead of progressing on your projects.
Good luck.
Note: Version control on the jdev system folder is a little questionable for rollbacks since it seems jdev buffers some writes and keeps some files open. Which means you might take a snapshot of an inconsistent or incomplete state. It's better to use that repo as an ongoing view of what is changing.
EDIT: Also see Oracle Enterprise Pack for Eclipse

Should I study Scala? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am an experienced C++ programmer with average Python skills. The reasons I studied Python in the first place were:
to get a different perspective on programming (static vs dynamic, interpreted vs compiled, etc.)
to increase the breadth of projects that I can work on (Python allows me to do web development, develop for Symbian phones or knock up quick system administration scripts)
to complement my C++ skills.
I think that Python is great and I believe that I have achieved the above goals. I will continue to use it for small projects, scripts and web development.
I doubt that I can use it for medium to large projects though. While the dynamic typing is convenient, it allows a certain class of bugs that I find disturbing. Unit testing and linting can alleviate this problem, but static typing completely eliminates it.
After looking at some programming languages, I think that Scala looks like a good candidate:
I like the type inference and it runs on the JVM so it should be available wherever the JVM is available. I can also learn more about functional programming when using it.
But... I also have some doubts, and this is where I hope that the Stack Overflow community can help:
Portability: Linux and Windows at least I hope. What about mobile phones, is it possible to get it to run there?
C++ compatibility: can I mix C++ code with Scala? (JNI?)
Programming paradigm: I don't feel comfortable with switching to functional programming (FP) at this time. Can I use object oriented and procedural with some FP at first and then change the proportions as I learn?
Tool chain maturity: what's your experience with IDEs and debuggers? I'm using Eclipse right now and it seems OK.
Learning speed: considering my experience, how fast do you think that I can reach a workable level with Scala?
Deployment: how exactly do you deploy a Scala program? Is it a jar, is it an executable?
Finally, what do you think that are some of Scalas disadvantages?
Portability: Linux and Windows at least I hope. What about mobile phones, did anyone succeed in getting it to run there?
Yes. There is quite some movement about Scala on Android. As for J2ME, I saw something in that respect, but not much. There is some code pertaining to J2ME on the source code repository. I'm not sure how viable it is, but it looks to me that there isn't much demand for that.
I'll also mention that there is/was a pool on Scala-Lang about the desired target platforms, and J2ME was one of them, very low on the totem pole.
C++ compatibility: can I mix C++ code with Scala? (JNI?)
As well as you can mix C++ with Java, for whatever that is worth. If you haven't any experience with that, you can just read the Java resources, as anything in them will be applicable with Scala with no changes (aside Scala syntax).
Programming paradigm: I don't feel comfortable with switching to FP at this time. Can I use OO and procedural with some FP at first and then change the proportions as I learn?
Definitely, yes. Scala goes out of it's way to make sure you don't need to program in a functional style. This is the main criticism of Scala from functional folks, as a matter of fact: some do not consider a language functional unless it forces the programmer to write in functional style.
Anyway, you can go right on doing things your way. My bet, though, is that you'll pick up functional habits without even realizing they are functional.
Perhaps you can look at the Matrices series in my own blog about writing a Matrix class. Even though it looks like standard OO code, it is, in fact, very functional.
Tool chain maturity: what's your experience with IDEs and debuggers? I'm using Eclipse right now and it seems ok.
IDEA (IntelliJ), NetBeans and Eclipse all have good support for Scala. It seems IDEA's is the best, and NetBeans/Eclipse keep frog-jumping each other, though NetBeans has certainly been more stable than Eclipse of late. On the other hand, the support on Eclipse is taking a very promising route that should produce results in the next 6 months or so -- it's just that it's a bumping route. :-)
Some interesting signs of Scala tooling for these enviroments is the fact that the Eclipse plugin in development uses AOP to merge more seamlessly with the whole IDE, that the NetBeans plugin is being completely rewritten in Scala, and that there's a Scala Power Pack on IDEA that supports, among other things, translating Java code into Scala code.
The EMACS folks have extensive tools for Scala as well, and lots of smaller editors have support for it too. I'm very comfortable with jEdit's support for small programs and scripts, for instance.
There is also good Maven support -- in fact, the standard way to install Lift is to install maven, and then build a Lift archetype. That will pull in an appropriate Scala version. There's an scala:cc target that will do triggered recompilation as well.
Speaking of recompilation, neither Maven, and particularly nor Ant do a good job at identifying what needs to be recompiled. From that problem sprung SBT (Simple Build Tool), written in Scala, which solves that problem through the use of Scala compiler plugin. SBT uses the same project layout as Maven, as well as Maven/Ivy repositories, but project configurations are done in Scala code instead of XML -- with support for Maven/Ivy configuration files as well.
Learning speed: considering my experience, how fast do you think that I can reach a workable level with Scala?
Very fast. As a purely OO language, Scala already introduces some nice features, comparable to some stuff that's present in C++ but not Java, though they work in different fashion. In that respect, once you realize what such features are for and relate them to C++ stuff, you'll be much ahead of Java programmers, as you'll already know what to do with them.
Deployment: how exactly do you deploy a Scala program? Is it a jar, is it an executable?
The same thing as Java. You can deploy JARs, WARs, or any other of Java targets, because the scala compiler generate class files. In fact, you use Java's jar to generate a Scala's JAR file from the class files, and the Maven targets for Lift support building WAR files.
There is an alternative for script files, though. You can call "scala" to run Scala source code directly, similar to a Perl of Shell script. It can also be done on Windows. However, even with the use of a compilation daemon to speed up execution, start up times are slow enough that effective use of Scala in a heavy scripting environment needs something like Nailgun.
As for Scala's disadvantages, take a look at my answer (and other's) in this Stack Overflow question.
Scala is an evolving language well worth to invest in, especially if you are coming from Java world. Scala is widely covered at Artima. See this article from Bill Venners and also read about Twitter and Scala.
Regarding your questions:
Java can run wherever there is a JVM. No luck with the mobile phones however. You need a full JRE, not the subset that is available there.
This is possible with JNI. If something is possible with Java, then it is possible with Scala. Scala can call Java classes.
Functional programming is a strong point of Scala - you do need to learn it. However you could also start using it without taking full advantage of it and work your way with it.
There is a plug-in of Eclipse. It is not best, but it will do the job. More details here.
If you are experienced, I would say really fast. I recommend that you find a book to start with.
See this faq entry for deployment.
Programming paradigm: I don't feel comfortable with switching to FP at this time. Can I use OO and procedural with some FP at first and then change the proportions as I learn?
Scala has full support for imperative programming, writing programs with no FP elements in it is a breeze (however, FP is useful and worth learning anyway).
Learning speed: considering my experience, how fast do you think that I can reach a workable level with Scala?
Quickly. There is a number of interesting features in Scala that may be not familiar to people coming from a C++, Java environment, like for example some of the features of the typing system. Some argue that the fact that there is a lot to learn in Scala before you know all of it is a problem with the language; I disagree. The presence of those feature is an advantage of the language. The more features the merrier. After all, you don't have to use them all at once, just like you don't have to buy everything that is being sold in the store.
Learning speed: considering my experience, how fast do you think that I can reach a workable level with Scala?
I also come from a C++ background, one thing I noticed is that since you will write a lot less code as compared to C++ for a comparable task, your learning will be expedited as you will get more done in the same time period. This was the same phenomenon that I experienced with Ruby.
Actually - if I were you - I'd study programming paradigms instead of languages. Of course you have to study an example language to study the paradigm. Knowing the drawbacks & benefits of different paradigms enables you to view your problems from a different side and makes you a better programmer (even in the languages you already know).
Picking up a language of a paradigm already known is a relativly easy task if needed. Since Scala is FP (at least you mentioned it) and C++/Python is OOP, it's a good language for you, I'd say.
You should register for this course by the Creator of Scala himself.
https://www.coursera.org/course/progfun
James Strachan (productive Java open source developer, for those not in the loop) has an interesting discussion of Scala here, and why he feels it's a progression from Java (the langauge, not the platform).
Scala looks like it's gaining a lot of traction. I don't think it's a flash in the pan, and is currently on my list of languages to learn (partly for the functional aspect)
Here's an anecdotal evidence regarding learnability of Scala.
In our company, we got several interns from U.Waterloo. They were told to write in Scala; never saw it before.
They picked up Scala and Lift remarkably fast; now they are producing Scala code; it may be not perfect, but nobody's perfect.
So, the fact that a manager does not know Scala may be not the best argument when you decide on adoption.

Pros and Cons of JavaFX and Silverlight [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I know there is already a question about the performance of Flex, JavaFX, and Silverlight. My question is a bit more broad:
We are evaluating the merits of JavaFX and Silverlight to serve as the GUI technology that controls/configures our back-end service (currently written in Java). The service and GUI are usually on the same machine, but remote management (via browser) must also be supported. We are currently split into 2 teams: one .Net and one Java, although the Java developers also have some .Net experience.
As I see it, the pros & cons are currently the following:
Silverlight 4:
Pros:
Excellent IDE integration
Good developer-designer workflow
Performance
Extensive 3rd-party support (tools, controls, etc)
Lots of momentum and drive from Microsoft
Very good out-of-browser integration
Cons:
Only supported on Mac & Windows (Moonlight support is not up to standard)
JavaFX 1.2:
Pros:
Wide platform support
Cons:
Only supports Latin character sets (at this time)
Fewer designer tools
Little or no out-of-browser integration. Update: apparently there is out-of-browser support.
Performance (at least on the demos I viewed at www.javafx.com)
Maturity
Please let me know if I'm missing anything or mistaken about something, and what else I haven't considered. We also looked at Adobe AIR, but ruled it out because all our developers already have experience in Java and/or .Net.
Please don't start any flame wars here. This is not a religious question, and I really would like some practical advice and facts.
I have been playing around with JavaFX the last months and i would not recommend anyone to start using it unless the limitations (like lack of Linux support) are too harsh. The IDE support for JavaFX is ridiculous at the moment. You have no refactoring help, no autoformat and not even help with indentaion.
I like JavaFX and will continue to play around with it, but for 2 equally good languages, the huge IDE different is hard to overcome.
Silverlight has got Expression Blend as well, for (kind of) WYSIWYG.
I think a solution in JavaFX would be better, but creating it will probably be alot more difficult.
Several thinks about JavaFX.
Only supports Latin character sets (at this time) (false) JavaFx uses standard Java string representation and also rendering is fully capable to handle non Latin characters.
Fewer designer tools (true) but take a look at newest NetBeans (more # link text)
Little or no out-of-browser integration (false) JavaFX runs in web/desktop, mobile and new platforms are planned.
Performance is improving with each release.
Maturity has same as Silverlight, but with better market share based on installed JVMs.
Your evaluation of JavaFX is kind of wrong.
I've been developing some materials in JavaFX recently.
The performance of JavaFX has improved markedly over the last 6 months (between 1.0 and 1.2), and is supposed to improve yet again with the 1.3 release.
"Out of browser integration" is essentially JNLP (ie, Web-start). It's perfectly reasonable from what I can tell. For instance, WidgetFX have written a Vista/7-like desktop sidebar entirely in JavaFX http://widgetfx.org/
There is supposedly "momentum and drive" from Oracle -- Larry Ellison has been publicly enthusing about it -- but that of course is held up by the EU's investigation of the Oracle-Sun merger.
Note that JavaFX does not use Java syntax. It is, however, a very concise and quick language to write a GUI in, but does have a (relatively short) learning curve of its own. It can however include any Swing components (and there are quite a few libraries of them out there), and can use Java classes.
I wanted to expand a bit on your point about the IDE and dev/designer workflow - I've been working with Silverlight for a year and half now, and I have to say the key to my success has been the tooling. On the dev side the ability to step through code in the debugger from client side to server side across a web service call is very helpful. We've hired designers with experience in the Adobe toolset and seen them become immediately productive in Blend (animating UIs, transitioning screens, hiding/showing elements, etc). Couple that with the fact that both Visual Studio and Blend can share the same source control system and you've got a great ecosystem for rapidly pulling together good looking web apps.
One other pro for Silverlight is the language independence. If you choose C# you also get LINQ, lambda expression and (soon) parallel foreach loops.

Why would you choose the Java programming language over others? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Why would you choose java over others? Why did you choose java to program your application?
Please include what you are using java for (desktop application/ web application/ mobile).
Excellent tooling: IDE, CI, etc.
Vast array of 3rd party libraries.
Huge amount of documentation available.
Large pool of developers available.
Platform ubiquitous.
Excellent performance.
Excellent specification.
Sturdy garbage collection.
Managed memory.
Native threads.
Choice - implemented by multiple vendors.
I have used Java to build various middle-ware products: Inventory mgmt; CMS; chemical registration; etc.
One of the nice things about Java is that everyone knows it. Of course, now that I've said that, I'll get 80 comments from people claiming to have never learned the language. Be that as it may...
Like it or not, Java is the closest thing to a lingua franca (the idiom means "common language") we have in the industry today. Just about every has either used Java at some point, or (more commonly) is actively using it now. That sort of ubiquity can be extremely attractive to some companies, particularly those reliant on consultants. If you start a project in Java, you're pretty much guaranteed to be able to find talent to maintain the code base for years down the road.
On a different tack, Java is an excellent language for developing cross-platform desktop applications...it's just that nobody knows it. Most of Java's dominance is on the server side coupled with a little bit of love from the J2ME crowd. However, if you objectively consider Swing in Java 6uN, it's hard to find a better tool for the job. Don't get me wrong, I see that it has its flaws, but many of those have been fixed in recent releases. Most of the issue now is mindshare: everybody knows that Java is slow and ugly (neither of which is strictly true anymore). The other problem is that Swing is very much a cross-platform UI toolkit. This means that it is inherently much harder to create professional UIs in Swing than in Cocoa or even WinForms.
Finally, a really great reason to pick Java (as opposed to .NET or Objective-C) is the ecosystem. Other answers have mentioned libraries, which really deserve a significant spotlight; but I'm thinking specifically of the rising language diversity. If you write an application in Java today, you can seamlessly transition to Scala at any time. You also have the option to do scripting in Groovy or JRuby, not to mention taking advantage of the powerful concurrency abstractions in Clojure. Because of its portability and high-level nature, the JVM is increasingly the preferred target for language compilers and interpreters (even more than the CLR). Java is really at the center of that nexus, not really benefiting directly from the vast cloud of languages which swarm around it, but certainly deriving value from all of the interoperability, present and future.
My reasons for prefering Java over other programming languages at this time are:
price - it's free
performance - really fast these days thanks to the HotSpot JIT compiler
effectiveness - lots of power with rigorous features like type-safe, sand-boxed, etc.
OOP capability
very good, well-thought out exception handliing; C++ exceptions are the opposite!
portability - it runs on almost everything
tool availability - awesome IDEs like Eclipse & NetBeans are free, as are web servers like Tomcat and application servers (JBoss, Glassfish, Geronimo, etc.)
flexibility - does graphics, desktop GUIs, web user interfaces - all kinds of things in all kinds of runtime environments
aptness - many enterprise apps today have to support HTML, SQL, and XML - Java has good support for all of them built in and you can get third-party libraries for free that make this even easier/better
well-supported - Sun keeps adding improvements and fixing thing going one or two versions back
forward compatibility - unlike something like VB which undergoes wrenching change in its syntax every couple versions or so, Java's syntax and semantics seem about 99.9% upward compatible from version to version
I have been writing programs in Java for over a decade and I am pretty satisfied with it. I have used other languages for almost two decades before that. So I am not biased by describing the one thing I know - it is one of many languages I know intimately.
When upgrades to the JDK/JRE come out, I look the documentation over to see what is changed. Sun is good about telling/explaining this. I have never had an extremely rough time porting from one JDK to the next.
When I have switched from one OS to another as my main OS at home or at work, it has not caused a problem for the Java applications I write - or the tools I use, generally. The one exception is Borland JBuilder, which some Borland marketing or technical genius decided to frequently stop supporting. Eclipse and Netbeans run terrifically on the Mac and probably always will. I have used Java on:
MS-Windows 95, 98, NT4, 2000, XP
Sun Solaris/SunOS Unix
IBM AIX
Mac OS X
Linux
Motorola cell phones (MIDP, CLDC)
Palm Pilot PDA
Java VMs (virtual machines) are everywhere! They are in:
web browsers
cell phones
PDAs
desktop computers
web servers
application servers
I have written programs on all of these. All you have to do is get an IDE with the right plugins, get the API documentation for the target environment you want, and start programming.
The GUI programs I write actually do look & work correctly on different platforms! I cannot tell you how long other vendors promised to do and how often/long they have failed. Just look around, some still exist.
Sun promised this in Java 1.0 and they sort of delivered it with AWT. However, the abstract windowing toolkit used native GUI components and the differences between these components (which followed no unifying standard at all) were too great to get same/nice look/behavior on all platforms.
Sun delivered very well upon this portable GUI promise when the Swing GUI API was delivered a decade ago, back in December 1998.
1) Very good and free documentation
2) Very good developer commercial and free tools
3) good certification and training resources
4) good runtime and free tools
5) good profiling and monitoring tools
6) very good support options from various companies
7) very good open source community with huge amount of libraries
Things not yet mentioned:
Cross-platform Desktop Application, even with sophisticated GUI
bunch of tools
static typing (see GWT)
error messages at compile time
very clear error messages
Java provides a very rich API right out of the box and hands-down produces the most portable applications since there is a Java VM for almost every platform.
BTW: I haven't used Java since I left college since I work for a Microsoft shop, but I can't think of a single thing I can do in C# that I can't do in Java, whether it be enterprise applications, web applications, or desktop applications.
Portability is the key to java. I know that a program that i am coding will run on any system, there is no need to create different releases for different OS's.
Java also offers built in security, making the coding of the safe programs easier.
Java is fast, with clean code java is benchmarking in the same range as C++.
C# is the language that gets compared to java the most often. C# isn't as portable as java, and has very few features that java doesn't. This makes java much more attractive unless the program will ONLY be run on a single OS, in that case i might code it in C++.
I switched from years of C++ to Java because I was working on higher level stuff and needed the benefits of memory management, reflection, and sandboxed execution that I get with Java.
I have tried COM in the late nineties and could not touch it.
.NET looks promising and in many ways is now much better than Java. Unfortunately, being window-centric is a complete dealbreaker for me.
Another benefit is the awesome static analysis tools available e.g. FindBugs. These perform a lot of checking on your code above and beyond those performed by the compiler, and can help identify bugs and/or code smells before testing begins.
Lots of great reasons have already been mentioned. I'd like to add the political part. I trust Suns language a lot more than Microsoft alternatives. It's not because I hate Microsoft, it's just that Sun is going a direction with Java that I really like, and Microsoft is going a direction with .net etc. that I really don't like.
This is very subjective, I know. But to me it seems like Sun really want to create a great language, and try to make money somehow. While Microsoft seems more interested in making money by vendor lock-in and systems that looks great and feels great, but may not be as good as it looks in the long run.
So the way Microsoft is handling it right now, I don't even care about how good or bad it is, technically. I don't care, I'm not going to use it.
Java has everything I want from this kind of programming language, including all the boring political stuff most people just skip. I don't know about any other current language that has all that.
The main reason I use Java for most of my desktop app projects is for cross-platform compatibility. It's quite easy to make your app run on OS X, Windows, and Linux and look native on all platforms.
I use Java for our BPM platform and used Java in the past for enterprise web apps.
It depends on what you want to do. Considering language features, libraries available and IDE experience, I personally would choose C# over Java. C# 3.0 has many useful features that Java lacks, such as LINQ, Lambda expressions, etc. Some people prefer the huge library choice that is available for Java, but I think there are just too many ways of doing things. Java IDEs like Eclipse and NetBeans are getting better, but I think Visual Studio is still much easier to work with.
Of course,if you are not using Windows, you don't have much of a choice but to choose Java. Ruby and Python can be good options for things like utility apps and GUIs, including Web apps, but for enterprise apps that don't use Windows, Java is pretty much the only option.
Please don't follow blindly all java-entousiasts. Java has its own flaws. Java is great for rapid development, enterprise oriented stuff, and "high productivity" project (with the tons of projects, community,...).
And if one guy show me a benchmark highlighting how java code can be as optimal as C stuff doesn't mean the complete java solution is fast and lightweight.
Java will never find its way on some performance critical applications, like games, codecs, web browser. No major game software is developed in java, and not because the developper are not capable of writing one piece of Java code that has the same speed as C or C++, this is because the very limitations of the language involves that performance and memory consuption will never reach a good C/C++ code. Takes VisualStudio and Eclipse. Java is great for one stuff (productivity stuff, enterprise middleware), but if you want to write codecs, games, performance critical libraries, you'd better try knowing C.
But, one the other hand, you'll write the java code faster and safer, with C and C++ you're taking more risk (pointers!) and this takes usually more time.
And don't forget the joke "Write once, Debug everywhere", this is actually true. You have to deal with different JVM implementation nightmare with Java.
Other programming language have their interest, bash/python scripts for local scripts (repetitive action, fast and quick UI,...). Php or ruby for webapplication are very well deployed and documented on the web.
Using it for desktop applications.
Excellent IDEs available, wonderful API, "C-style" syntax makes it easy to pickup. Once the JVM starts, the performance is great.
Why would I choose Java - is it the most popular language out there right now? If not, it's gotta be damn close, so if I'm building a product I might choose this because it would be the easiest to hire developers for.
Why did I choose Java - because it's what I know best.
Why would I choose Java? If I happened to have a team of replaceable code monkeys developers that knew Java better than anything else, that is probably what I'd go with.

Categories