It's pretty simple. Just use the -sourcepath switch to specify where to find the source files.
For example: javac -sourcepath C:\Projects\MyProject\src -d C:\Projects\MyProject\bin com\example\HelloWorld.java
Actually, now that I investigated a bit more, you can't do this. -sourcepath only works for classes referenced by the source you're trying to compile. You still need to name the main class explicitly:
javac -sourcepath C:\Projects\MyProject\src -d C:\Projects\MyProject\bin C:\Projects\MyProject\src\com\example\HelloWorld.java
It's easier to just create a batch file in your project folder and do the following:
javac -cp src -d bin com\example\HelloWorld.java
Joined: May 31, 2011
And better rename the folder java to say "source" to avoid confusion