Skip to content

andrewschaaf/javaq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

You know how simple it is to run:

... | python  foo.py          arg, arg | ...
... | ruby    foo.rb          arg, arg | ...
... | node    foo.js          arg, arg | ...
... | coffee  foo.coffee      arg, arg | ...

You've wished you could do the same with .java files.

Now you can!

... | javaq   Foo.java        arg, arg | ...

Installing

  • Get NodeJS >= 0.8.0
  • npm install -g javaq

What if I'm lazy and don't want to specify which .java to run?

Then don't. If exactly one of the .java files in ls -lR . contains a main, javaq will run that one.

Is it as slow as javac ... && java ...?

Currently, yes.

Soon, .class files will be cached.

I want to eventually shave off every possible millisecond.

Which .java files get compiled?

Everything in ls -lR .. Later, this will be limited to those needed to run the main class.

Settings

These must be specified before the first argument that matches /\.java$/. Otherwise they will be passed on to the program you're running.

Pre-.java arguments matching ^-Xmx are passed to java.

--builds-dir=...

Optional. Defaults to ~/Library/Application Support/javaq/builds. javaq will use this folder as it sees fit.

--lib=...

Optional. A folder containing JARs. Defaults to ~/Library/jars if that exists. Those JARs will be on the -classpath when running javac and java.

About

Run .java files as easily as you run .{py,rb,coffee} files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published