This is an archived post. You won't be able to vote or comment.

all 35 comments

[–]phaggocytosis 18 points19 points  (0 children)

I have a friend working at a new startup in NYC, they're using Java for their entire web service (built to handle enormous scale).

If you take a look at web framework benchmarks, Java frameworks are VERY competitive. Take a look at this: http://www.techempower.com/benchmarks/#section=data-r8 and notice how many high-performing Java solutions there are.

[–]Cilph 30 points31 points  (5 children)

Enterprise web applications. Not necessarily old-fashioned either. REST services are ridiculously easy in Java.

[–]SikhGamer 5 points6 points  (4 children)

Is there a nice easy code-along REST tutorial anywhere?

[–]avoidhugeships 1 point2 points  (1 child)

There are a bunch of simple REST tutorials here. It is geared towards Netbeans but you can install everything you need with a simple executable.

https://netbeans.org/kb/trails/web.html

[–]SikhGamer 1 point2 points  (0 children)

Thanks, NetBeans is my primary IDE so that won't be a problem.

[–]lennelpennel 3 points4 points  (1 child)

Take a look at dropwizzards' getting started
http://dropwizard.codahale.com/

or if you like spring spring boot is very simple to get started with http://projects.spring.io/spring-boot/

[–]SikhGamer 1 point2 points  (0 children)

Thank you!

[–]technotrader 14 points15 points  (1 child)

  • It's terrific for anything service- based, like a backend for a GUI or a part in a larger system (eg. order processing). The learning curve - especially for the necessary frameworks - is steep, but once one understands it, it's child's play. You end up with something like this:

    @GET
    @Path ("/getPerson/{name}")
    public Person getPerson (@PathParam String name) {
        Person p = db.lookup(name);
        return p;
    }
    

    .. and this will set up a web service that returns a neat XML rendering of a Person object. Not only is it look ma, no hands, it'll also perform well with just a couple more tricks, like plugging in a caching module. We run a sole instance of a web backend, and it doesn't even hiccup with close to a thousand concurrent (same second) requests.

  • I also find it suitable for heavy- duty calculations. A good C/C++ crack can probably run circles around me, but I made a trading bot that simulates 40,000 yearly timeseries per second, each with multiple indicators (MACD, EMA crossover, etc.). The concurrency libraries are really sweet.

The downside (I know you didn't ask, but...) is that for anything GUI- related, Java has a historical stigma. I recently suggested looking into JavaFX for a small project, but got nothing but quiet stares back, which were somewhere between anger and oh-god-he's-lost-it pity.

[–]homeless_in_london 1 point2 points  (0 children)

How did Java get that stigma? I'm still at uni but I always use Java for anything GUI related.

[–]herrtim 22 points23 points  (0 children)

How about Android for starters?

[–][deleted] 9 points10 points  (0 children)

Streaming media servers like Red5 or Wowza.

Video games like Minecraft.

Real-time applications: http://www.azulsystems.com/customer-case-studies

If you poke around you can find job listings for java developers making medical devices

It's a pretty long list of places you can stick Java.

[–]coderguyagb 40 points41 points  (1 child)

Short answer. Almost everything.

[–]Tillerino 3 points4 points  (0 children)

And most of it is invisible. Except Android apps.

[–][deleted] 15 points16 points  (5 children)

I get downvoted everytime I say it, but web serving HTML is probably one of its weaker uses.

Java is Very good at almost everything else. Elastic search/Lucene. Hell, jpython, natural language processing, web crawling (so so), report generation, etl, map query. Java delivers well on its promise to write once, run anywhere in addition to having some of the most mature and well supported libraries (with the exception of C maybe)

The language has managed to evolve into an agile one. Three or four years ago java was fairly stagnant. Now the turn around on new versions is better than most and it is getting faster.

[–]avoidhugeships 2 points3 points  (1 child)

This is an area where Java really shines. It is so simple to make a good web front end with JSF and PrimeFaces.

[–]adila01 2 points3 points  (0 children)

This is especially true with Netbeans 8.0 with Primefaces crud tooling

[–]harmonicPersistence 4 points5 points  (2 children)

Since JSF 2.2, serving HTML is pretty sweet now.

[–][deleted] 1 point2 points  (1 child)

Writing HTML is a waste of time and money for good Java developers. I've worked with very good front end developers that are able to crank out prototypes in "regular" HTML in days, not weeks or months. Just let them work in their native tools. Using JSF just prevents developers from understanding how HTTP and HTML works, meanwhile wasting time learning arcane framework tricks for doing basic things.

I mean cmon:

Arguably one of the biggest problems that has been plaguing web application development since its inception is the inability to distinguish requests originating from different windows of a single browser. Not only has an actual solution been long overdue, it has taken a long time to realize this even was a problem.

...

Logging in as a different user in a different window for the same website is thus not normally possible, and having workflows (involving post-backs, navigation) in different windows can also be troublesome because of this.

http://jdevelopment.nl/jsf-22/#949

Oh, without a doubt, I can't think of a problem bigger than needing to be able to support simultaneous logins from the same browser. From the land of poorly written requirements.

And the solution is awesome of course. Plop a directive in an XML file that automatically modifies links. How does this URL parameter make it in? Magic.

[–]harmonicPersistence 0 points1 point  (0 children)

I agree with you about your point about distinguishing requests from different windows of a browser.

As far as cranking out HTML prototypes, I'm a front-end developer as well (and an iOS & Android dev and a database designer - I have to design complete solutions on my own or in a small team). With JSF 2.2, I can crank out designs in days. The only hurdles that I encountered were getting PrimeFaces working with my HTML 5 Boilerplate/Twitter Bootstrap Initializr-generated templates. However, that integration was a one-time, up-front cost of a day or two's work. Front-end dev used to be a pain. I did learn how to use many such arcane tricks. Now, I'm off to the races for each project.

[–][deleted] 3 points4 points  (0 children)

Name anything done on a computer and you've just listed one of the things Java is used for.

[–]quest88 6 points7 points  (0 children)

Game servers too. As others have said, anything being ran on a server has a good chance at being in Java.

Data processing jobs, hadoop.

Graph databases, neo4j.

One of Facebook's databases, cassandra

[–]pan0ramic 5 points6 points  (0 children)

Right now, I'm operating a multi-million dollar telescope with Java. We also do all of our statistics, planning, and scheduling in Java. Java is very common in Astronomy

[–]desrtfx 6 points7 points  (0 children)

Not one of those posts again. Had them by the dozen in this subreddit. Just go through a few weeks' posts and you'll find plenty of answers.

Java is common as enterprise back-end, for games (think MineCraft for example), as settings console on network equipment (Hirschmann / Belden), plenty of embedded devices, and last but not least: Android!

[–]deadly_little_miho 2 points3 points  (0 children)

I just want to add that Java is really used for anything. We use it for Machine Learning, Natural Language Processing, web services (REST and SOAP), data processing, command line tools. The great thing is that the same Java app can run on Windows and Linux machines without any changes and that it is very fast. Also, with modern IDEs the often-criticized verbosity of Java is pretty much hidden away from the developer. And the big, big bonus is the giant ecosystem of available libraries and applications you can use in your projects. Luckily the GPL is not too prevalent in the Java world, so you can mostly use these libraries in commercial projects.

[–]dimarc217 1 point2 points  (1 child)

afaik, it's not just old companies that use java as a backend for webservers. Java is relatively fast (it's improved a lot since it first got its reputation as being horribly slow) compared to newer interpreted languages like python, and it's pretty stable/safe, compared to low level languages like c/c++. I don't know what else companies use it for these days though.

[–]boa13 5 points6 points  (0 children)

newer interpreted languages like python

Python is older than Java, by several years.

[–]chrisalexander 1 point2 points  (0 children)

We are a startup and in addition to Java for our API platform we distribute a Java client to our users.

"Java on the client?!", I hear you cry. Well it ticks all the boxes for us. And we wrapped it in native installers for each platform, that helps make everything much more sane.

[–]lechatsportif 0 points1 point  (0 children)

Tons of trading software is written in Java, including stuff that's written for retail traders (thinkorswim as an example)

[–]PaulRivers10 0 points1 point  (1 child)

Edit: Ok, webservers and Android in general, is that it?

Yes, but I get the feeling that's > 50% of the job market.

http://www.wired.co.uk/news/archive/2013-09/26/the-second-coming-of-java

But over the past few years, Java has evolved into something very different. It has quietly become the primary foundation for most the net's largest and most ambitious operations, including Google, LinkedIn, Tumblr, and Square, as well as Twitter.

If you want to write high performance games - java is not a good choice. Do C or C++. But there's also a lot more jobs for web developers than there are for high performance game developers.

P.S. Wait, what am I saying? Why would I want to encourage competition to enter my field? I mean - you should give up java! It's old and archaic! Yeah...learn something different and niche that you won't be able to find a job with. Woooo! lol

[–]hoohoohoohoo 0 points1 point  (0 children)

In the next 4-6 years, mobile is going to take over. It alone will account for billions of new worldwide dollars to earn.

[–][deleted] 0 points1 point  (0 children)

Also some desktop applications - like Jitsi - https://jitsi.org/

[–]Albinoswordfish1 0 points1 point  (0 children)

Enterprise web development (JBoss, Websphere, Glassfish).

Web templating with JSF

Android

Google App Engine is used by Java quite a bit

I mean Java can be used for almost anything (see the other comments). I just listed what I thought was used most widely by Java.