News for hackers. Stuff that matters.

Should Java have an interpretor

Lots of people complaint that java compiling process takes such a long time and make development cycle longer than PHP.

Just thinking that Java should have an interpretor for its development to shorter people's development cycle. Maybe that will make it more appearing.

( 4 comments | 5 points | on HN )
Re:Should Java have an interpretor by lukesandberg on Sunday April 01, 2012 @10:27PM (#3785983)
The JVM supports a feature called hot swapping (i think thats what it is called), where classes can be reloaded at run time. Most IDEs take advantage of this in debug mode. So a lot of the time i just launch my server in debug mode and edit freely. Occasionally i will have to restart the server, but it works surprisingly well. In fact you don't necessarily need an IDE to do this. A lot of servlet containers support this as well, where you can just copy updated jars to the servlet libs (obviously some simple scripts help a lot with this). After enough 'hot' deploys the JVM will eventually run out of perm-gen space, but even with that limitation you still get 10-20 edit-refresh cycles out of it.

Setting up your tools right can help a lot. Also, optimizing your build scripts. Ideally these will all work together to make it less painful :)

Re:Should Java have an interpretor by fcq731 on Monday April 02, 2012 @05:23AM (#3787130)
I recently switch from Java to PHP development. And I totally agree with you about setting up tools right can save tons of time. But the reality is it is still painful.

My point here is not whether we need more tools for the hot swapping, but just have an interpretor for development processes. It will just make the development much easier.

Re:Should Java have an interpretor by read_wharf on Sunday April 01, 2012 @11:25PM (#3786141)
Re:Should Java have an interpretor by swah on Monday April 02, 2012 @12:02AM (#3786252)
Check how the Play framework handles this.