[ grinder-Bugs-2515621 ] grinder.jvm.classpath should be relaxed about separators
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.java.grinder.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #2515621, was opened at 2009-01-17 12:37
Message generated for change (Settings changed) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=118598&aid=2515621&group_id=18598
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core engine
Group: None
>Status: Closed
Resolution: Rejected
Priority: 3
Private: No
Submitted By: Philip Aston (philipa)
Assigned to: Philip Aston (philipa)
Summary: grinder.jvm.classpath should be relaxed about separators
Initial Comment:
Chris Clohosy wrote:
> In my grinder properties file I'm setting various jars in the
> grinder.jvm.classpath property. I was wondering if there was a
> generic way of filling in this property so the same property file
> could be used on both Unix and Windows. At the moment to get it to
> run on Windows I'm having to use '\\' directory separators; I
> noticed that when I tried to use '/' it literally carries this
> through to the DOS command line, which Windows does not understand.
>
> If there isn't a way, would it be possible to add functionality to
> convert '/' and ':' to the OS specific character like Ant does?
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2010-02-07 02:20
Message:
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 30 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Philip Aston (philipa)
Date: 2010-01-07 13:05
Message:
I've reconsidered this, and decided not to implement it.
Naively doing such things as colons to semi-colons would break other parts
of the path (e.g. windows "C:\" drive specifications), and however careful
I was I would very likely break things for esoteric filesystems such as
(netware.
Instead, I think the simplistic approach of passing the literal text
through is best. You can always override the property for specific agents
on the command line.
----------------------------------------------------------------------
Comment By: Philip Aston (philipa)
Date: 2009-01-17 12:39
Message:
Answer from Scott Pack:
> The problem is that the 'additonalClasspath' variable in
> 'net.grinder.engine.agent.WorkerProcessCommandLine.java' is never
> parsed based upon the OS the agent is running on. I wrote a method
> to fix that:
>
> protected void makePlatformClasspath() {
> String os = System.getProperty("os.name");
>
> String classpath =
properties.getProperty("grinder.jvm.classpath");
> if (os.equals("Linux") || os.equals("Unix") ||
os.equals("Macintosh")) {
> classpath = classpath.replace(';', ':');
> } else if (os.equals("Windows")) {
> classpath = classpath.replace(':', ';');
> }
> properties.setProperty("grinder.jvm.classpath", classpath);
> }
>
> and plugged that in to the class, and processed the
> additionalClasspath using this method.
This is better:
final String s = System.getProperty("path.separator");
final String classpath =
properties.getProperty("grinder.jvm.classpath");
classpath.replace(";", s);
classpath.replace(":", s)
properties.setProperty("grinder.jvm.classpath", classpath);
Not sure we need to change "/" to "\" - Java on windows should grok /
successfully.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=118598&aid=2515621&group_id=18598
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com