[
https://issues.apache.org/jira/browse/DAEMON-453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17682255#comment-17682255
]
Thomas De Waelheyns commented on DAEMON-453:
--------------------------------------------
[~ggregory] Unfortunately my knowledge of C is very, very limited. I looked
into it a bit further for just prunsrv and saw there is the following
differences between jvm and java mode.
In java mode, the classpath variable is of the type WCHAR. For jvm mode the
classpath is char. The existing methods can in their current format not be
re-used since they accept on an LPCSTR as the parameter.
I'm trying to make a copy of the solution for the jvm by making one compatible
with WCHAR (all credits to [[email protected]] for the original
implementation!). The current difficulty I'm having is adding support for
quotes around paths with whitespaces, as you can encapsulate the whole
classpath in quotes, or individual elements in the classpath.
If this will result in something usable, I doubt it. But at least I gave it a
shot :P
> Add support for wildcard classpath in java mode
> -----------------------------------------------
>
> Key: DAEMON-453
> URL: https://issues.apache.org/jira/browse/DAEMON-453
> Project: Commons Daemon
> Issue Type: Improvement
> Components: Procrun
> Affects Versions: 1.3.3
> Reporter: Thomas De Waelheyns
> Priority: Minor
>
> Classpaths with wildcards are currently supported only in jvm mode of the
> launcher according to this [mail
> list|https://lists.apache.org/thread/xz3v6p6xcw8hcp0rm1yt9gd7xg9oryvf]. The
> jvm mode support was implemented in DAEMON-166.
> Since the code to expand the wildcard to actual references to jar files was
> already written, wouldn't it make sense to expand this to also include java
> mode?
>
> Relevant commits:
> Windows:
> [https://github.com/apache/commons-daemon/commit/6c0758fc052188dead563e4ce776a5da6e34acb9]
> Unix:
> [https://github.com/apache/commons-daemon/commit/5997b1355ecc2fe0bcf3608e33195e5c2968931e]
>
> For windows, in javajni.c, line 915-920 looks like a good place to call the
> __apxEvalClasspath which expands any wildcard paths into a complete list.
> {noformat}
> if (szClassPath) {
> p = (LPWSTR)apxPoolAlloc(hPool, (lstrlenW(JAVA_CLASSPATH_W) +
> lstrlenW(szClassPath)) * sizeof(WCHAR));
> lstrcpyW(p, JAVA_CLASSPATH_W);
> lstrcatW(p, szClassPath);
> (*lppArray)[i++] = p;
> }{noformat}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)