Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You forgot the

    class foo { ... }
And that it has to be in a name called foo.java. And that you have to compile it and run it with

    java foo 
instead of simply

    ./foo
And that startup time of JVM is orders of magnitude worse than pretty much anything else.


"And that startup time of JVM is orders of magnitude worse than pretty much anything else."

Sure, let's throw out of the window all the optimizations the VM can do at runtime because it takes a whole second to start the VM.

And you need to actually compile the source file before executing it!

Those server applications should all be written in bash because it's instantaneous!

Kidding aside, one prof at my university once told me that she wished students should still have to compile and wait for a program to start. When there is such a delay, it pays to read your code and try to understand it before running it (as opposed to run-and-see-what-happens).


> And that startup time of JVM is orders of magnitude worse than pretty much anything else.

This one never ceases to annoy me.

The JVM is optimized for LONG RUNNING PROCESSES. It's targeted specifically toward running on servers, because that's the default use case. There's about a million options switches, gc controls, etc if you want to run it in another way.

If you want fast startup time, try compiling with gcj or something.

In any event, I run a javac->java loop many times an hour when developing, and the startup time is un-noticable.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: