A friend, who was recently exposed to Web development, was wondering why Java hosting was not as popular as it was for other Web technologies. It was a lot easier to find hosting, right from cheap shared space to dedicated machines, for other languages like PHP and Python. Why not for Java?
Frerk Meyer gives us one of the reasons.
$ java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
Java complains about insufficient memory even on a dedicated virtual server with 256MB memory. You have to start Java with the right command line arguments make it work in such environments.
The other reasons I believe are:
- Java is so popular and considered suitable for big applications, that most of the Java community and its tools seem to be geared only for that, and make it unsuitable for small and medium-sized applications. This has resulted in lower demand from the common user, which in turn has resulted in lower supply of cheap hosting.
- Secondly, I am not sure if the various Java application servers and containers are easy to setup for shared hosting.
Java has to get out of this lock, and perhaps Sun has to take an initiative in this. Lack of easy hosting for Java is not because of Java, the language, but because of Java, the industry.


September 21st, 2008 at 5:31 pm
Java hosting is not as popular as PHP, Perl hosting because
+ JVM is not safe for shared hosting. Shared hosting loves share-nothing architecture
+ Java applications requires much more resources than PHP or Perl counterpart. Barcelona project is vaporware
+ Java deployment is much harder because it requires some sort of administrative permissions most of the time
+ Not many people uses Java for hobby projects or small and medium websites because Java technology is complicated, requires more time to develop and often comes with a development team
+ Java applications are big in size: lot of jars, making uploading a problem.
September 22nd, 2008 at 1:27 am
I’ve found reliable hosting for about $20. And that was hosting with everything setup(eapps.com). You can get a couple bucks less if you do the setup work yourself and use a more basic DIY VPS host. If you’re waiting for Java hosting to sometime become $5 a month, I think you’ll be waiting a long time. Unless you are co-hosting sites for yourself or friends, shared java hosting is generally a bad idea.
Some Java technology can be complicated but Grails, a convention over configuration framework in the same vein as RoR, has a similar learning curve and development time to Rails. I think the real hesitation towards Java is probably the misstep years ago with applets. Subconsciously people think Java is slow. It has made tremendous gains in the time since.
September 22nd, 2008 at 2:58 am
@James: It’s not the perception that Java is slow, it’s that it’s thought of as being resource-intensive, and that it’s Java–not the preferred language of most web developers, particularly the entrepreneurial sort.
October 21st, 2008 at 1:00 pm
http://Javaprovider.net have really small prices for shared Tomcat