You guys sometimes act like you live in a bubble. Out here where we are
implementing this stuff - and it is not only cool stuff, but damn useful
stuff - we sometimes need a paragraph or two of WTF it is you are
talking
about. Sorry to be a bore. Really sorry.
jruby --ng-server starts up a server. You can manage it however you
like.
Nailgun is meant to be a solution for slow starting JRuby programs.
Nailgun keeps an instance of the JVM running in the background so that
when you start JRuby, it uses that instance instead of creating a new
instance and incurring the cost of having to wait for JVM startup.
With Nailgun running in the background, JRuby scripts can start up as
fast as MRI Ruby scripts.
Sorry if it wasn’t clear; it has been discussed previously on this list
so I guess I thought an explanation would be extraneous.
Nailgun is a Java-based server and C-based client used to make running
command-line Java utilities faster. The server listens for requests from
the client, which takes options similar to the “java” command along with
command arguments. Basically using the server and client together keeps
a JVM in the background “warm” so the cost of cold startup is
eliminated.
In JRuby, the Nailgun server can be started up via jruby --ng-server and
then the client can be used with jruby --ng.
java.lang.ClassNotFoundException: ./PowerFolder.jar
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.martiansoftware.nailgun.NGSession.run(Unknown Source)
I know this is not a jruby question but…
Can anybody tell me what I am doing wrong?
The “server” needs to be started with jars you’ll want it to reference.
The client does not pass them along in the default setup.
With JRuby it will work because we pass through the client’s current
directory and jars loaded from within JRuby get loaded dynamically.
Check the Nailgun project page or download to see how you’re supposed to
run it. You pass the class to run as the first argument to “ng”.
In JRuby, the Nailgun server can be started up via jruby --ng-server and
then the client can be used with jruby --ng.
In preparation I downloaded nailgun and started fooling around but due
to my
complete lack of java experience clearly I am not grokking how to use
it.
I installed it in ~/apps.
I did a make to create the binary and symlinked it /usr/local/bin.
I started the server with java -server -jar nailgun-0.7.1.jar
So I want to start powerfolders with nailgun instead of java…
java.lang.ClassNotFoundException: ./PowerFolder.jar
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.martiansoftware.nailgun.NGSession.run(Unknown Source)
The “server” needs to be started with jars you’ll want it to reference. The
client does not pass them along in the default setup.
With JRuby it will work because we pass through the client’s current
directory and jars loaded from within JRuby get loaded dynamically.
Check the Nailgun project page or download to see how you’re supposed to
run it. You pass the class to run as the first argument to “ng”.
Thanks.
It seems like it will be much more useful with jruby than for general
purpose use. Otherwise you have to make a catalog of all the jars you
think
you may need and start the server with that.
jruby --ng-server starts up a server. You can manage it however you
command arguments. Basically using the server and client together keeps
a JVM in the background “warm” so the cost of cold startup is
eliminated.
In JRuby, the Nailgun server can be started up via jruby --ng-server and
then the client can be used with jruby --ng.
Does that help clear things up?
Thanks v.much. Sounds excellent. Will have a play.
Nailgun is a Java-based server and C-based client used to make running
command-line Java utilities faster. The server listens for requests from
the client, which takes options similar to the “java” command along with
command arguments. Basically using the server and client together keeps
a JVM in the background “warm” so the cost of cold startup is
eliminated.
In JRuby, the Nailgun server can be started up via jruby --ng-server and
then the client can be used with jruby --ng.
Now that I’ve had a chance to play with this I am amazed. This is a
fantastic addition to the toolbox and I’m off to see where it takes me.
–
Best,
Marc
“Big change requires small steps.”
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.