Re: grinder.jvm.classpath and globbing

Philip Aston <[email protected]> Wed, 23 Sep 2015 21:28:15 +0100
Newsgroups gmane.comp.java.grinder.user
Message-ID <[email protected]>
Here's the code that uses ProcessBuilder:

http://sourceforge.net/p/grinder/code/ci/master/tree/grinder-core/src/main/java/net/grinder/engine/agent/ProcessWorker.java


If PB doesn't already handle it. I will not be adding globbing to the
grinder. Its too platform specific, and something you can do in a
wrapper script.

- Phil


On 23/09/15 19:24, Darren Ball wrote:
> Hi Philip,
> If you are using something like ProcessBuilder, there are standard
> methods for building the correct classpath... Plenty of examples out
> there.
>
> A quick search shows something simple:
> http://stackoverflow.com/questions/16403539/cant-run-program-with-processbuilder-runs-fine-from-command-line
>
> If this is not suitable a call should be implemented to perform
> expansion. 
>
> Where in the code are you doing this?
>
> -Darren
>
> On Mon, Sep 21, 2015 at 6:37 PM, Philip Aston <[email protected]
> <mailto:[email protected]>> wrote:
>
>     Well what do you know. I'm a longtime Java user but was ignorant
>     of this
>     feature -
>     http://stackoverflow.com/questions/1237093/how-to-use-a-wildcard-in-the-classpath-to-add-multiple-jars
>
>     However, I suspect it only works when you launch Java from the shell,
>     not when you launch it from another Java process (which is what
>     happens
>     when the worker process is stared by the agent).
>
>     The worker process will inherit the classpath from the agent by
>     default
>     though - you might try leaving out the grinder.jvm.classpath property
>     entirely.
>
>     - Phil
>
>
>     On 21/09/15 17:52, Darren Ball wrote:
>     > Anyone have any idea regarding this issue?
>     >
>     >
>     > On Fri, Sep 18, 2015 at 12:53 PM, Darren Ball
>     <[email protected] <mailto:[email protected]>
>     > <mailto:[email protected] <mailto:[email protected]>>> wrote:
>     >
>     >     I am trying to do the following:
>     >
>     >     grinder.jvm.classpath= /home/grinder/uber/*
>     >
>     >
>     >     I get the following in my grinder.properties for my test (on the
>     >     console machine):
>     >
>     >     Worker process command line: java
>     >     '-javaagent:/opt/grinder/lib/grinder-dcr-agent-3.11.jar'
>     >     -classpath '/home/grinder/uber/*:/opt/grinder/lib/grinder.jar'
>     >     net.grinder.engine.process.WorkerProcessEntryPoint
>     >
>     >     And this is not picking up the globbed path classpath.
>     >
>     >
>     >     I add this to the agent startup like the following, and it
>     works fine:
>     >
>     >     java -classpath
>     >     "/home/grinder/uber/*":/opt/grinder/lib/grinder.jar
>     >      net.grinder.Grinder
>     >
>     >     I believe I had this previously working.  It seems the
>     >     grinder.properties values are being quote in single quotes...
>     >
>     >     -
>     >
>
>
>



------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
Get real-time metrics from all of your servers, apps and tools
in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140