Why java over other languages?

Java has been my only programming language (besides a little html and JavaScript) but for those of you who have tried many languages, why do you find yourself sticking to java? Or why is it that you don’t like java over another language??

How quickly I can get things done.

It’s the language I know the best. It’s more comfortable for me.

The language isn’t a minefield like C++, the IDE tooling is terrific, and there’s thousands of libraries right at my fingertips for just about anything I can imagine. The language itself is just meh, but there are other languages like Scala and Clojure I can reach for that target the Java platform, so they still take advantage of all the other good bits.

I use Java because it is the first language that I really learned. I used Basic, C, C++ and Python before Java and Haskell after it. Besides the obvious differences between all these (functional, imperative, OOP, …) it was the perspective that led me to start using Java more frequently and in the end just for almost everything. Java is frequently used in academic environment. At least the most job ads require java knowledge. So I was very happy to go on learning it.
Since I love game programming I was even more happy that communities like this exist.

Third party code works out of the box. No need to compile a program to parse a file to compile a program to transform source code to compile a dependency to use for generating a binary file to be used in a dependency of a dependency of the third party code I am trying to make use of. (As in C, C++) Third party code tends to be well documented, well structured, and use a common set of interfaces and idioms. Performance is good and high level code does exactly what you tell it to (so that it is never slower to use an efficient algorithm than it is to use an extremely high level function, built in array operation, regular expressions, or other tricks). (As in JavaScript, ActionScript, PHP)

Out of all the languages I’ve tried, it is the most practical. C# and ActionScript 3 have some of those qualities, but Java usually does the job better.

I use it because it’s easy to do anything you want and because it’s a lot better for making games than using batch…

It’s mainly the IDE for me. Eclipse etc is miles ahead of a lot of things. It does more than PHP and is what I got used to.

Because, I heard my friends say they use Java and I wanted to be better than them. In reality though, Java is easier to learn/use than c++ and saves time by WORA.

Because C++ is like:


Well… Java has everything… from networking to encryption to GUIs, you can write an application in no-time. :smiley: Which in equivalent time developing in C++ takes a bit more time. Development time and app-speed go hand-in-hand :open_mouth:

I like Ruby and C more than Java, but I still prefer to write games in Java. Ruby is very nice to write, Java is very verbose compared to Ruby, but Ruby gets inconsistent pretty fast and the RVM (Ruby VM) is inferior to Java VM, I use Ruby only for web and Linux scripts. C is close to the metal, it’s very easy, without much magic behind, but also very verbose and there is no VM at all, so I’ve to care about memory, collections, etc. which is nice, but not suitable for fast prototyping. I use it only for fun or Linux hacking.
Java is much easier to port to other platforms, and there are many ways to publish the game (Applet, Web Start, JAR, etc.). Also Java offers a really decent VM, that is very fast and is suitable for games. Also Java runs on my favorite operating system. I’m developing exclusively on Linux atm.

But I think the most important advantage of Java is, that I can focus on making the game and deliver it to the public much faster than with other languages.

I hate PHP abysmally, and always trying to avoid C++ intuitively, don’t know why…

Yeah, in C++, you have to know more of what you’re doing. And it just looks sort of bland. :confused: Java looks way better.

It seems there were some threads similar to this.

I love the syntax, and Eclipse, and gazillion awesome libs out there.

Dynamic class loading. Also it’s easier than c++. It gives great socket apis, unlike c++ ( winsock… uuuuggggghhhh). And it’s less of a hassle to write cross platform code ( it still has some quirks, but not any major ones).

I prefer Java over C/C++ because it’s easier to add modding support with Java, Java has strict conventions, Java IDEs are much better than C/C++ ones, even Eclipse CDT, Java has a load of libraries, and almost all libraries are easy to use and cross-platform.

A final note is that with Java, you do not need to recompile with a new compiler for each platform.

I have learned more than ten programming language and I prefer using Java, it is at least partially a matter of taste, something really subjective. When I use C++, I feel bad, the language is against me, I waste a lot of time on templates, operator overloading, … I like Eclipse and Netbeans. Java has a very complete ecosystem. It is possible to target several operating systems without having them on your machines. Java is interesting as a VM for other languages too, you can use scripting languages. Learning some other languages can be interesting even for programming in Java, for the concepts (understanding a bit pointers is helpful even though Java has some garbage collection). I learned Basic, RPL, Pascal and C before learning Java. “Write once, run everywhere” is a nice slogan, we still have to make some effort to get some support of our favourite language on more and more operating systems and in better conditions. For example, it would be fine to get JavaSE For Embedded / OpenJDK working on all consoles and smartphones.

There is one thing that drives me very sad: there have been lots of FUD campaigns about Java because some organizations would like to push their own RIA solutions and Java is a problem for them. The huge promotion campaign for HTML5 is done by disparaging plug-ins whatever they are, based on open source technologies or not. Yes, there are real security flaws in the JVM but implementing similar features directly in several browsers won’t be inherently less unsafe. Some corporations would like to go on building walled gardens, in order to force consumers and developers to pay to use their market places, they have to do their best to harm Internet as a huge existing market place by disparaging cross-platform technologies (to drive them less attractive) and to favour their platform-dependent ones.

I find Java fairly easy to debug. Also I tend to make less mistakes in Java than in C++

More things that I like: There are good free IDEs for Java. Java has a lot of very useful libraries. Java has inbuilt graphics and network capabilities. Java is portable. Java is fairly fast. Java has inbuilt support for threading. Java syntax is fairly clean, and easy to learn. I like the absence of overloadable operators.

I use it because I’m not the sharpest tool in the shed and Java is easy.

Cas :slight_smile:

I think it’s absolute middle ground between power and ease of use.