Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Nov 2001 17:23:03 -0600
From:      Dave Glowacki <dglo@ssec.wisc.edu>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/32383: 'ant' doesn't work if JAVA_HOME not set
Message-ID:  <200111292323.fATNN3k20011@hyde.ssec.wisc.edu>

next in thread | raw e-mail | index | archive | help

>Number:         32383
>Category:       ports
>Synopsis:       'javavm' doesn't work if more than 1 argument is specified
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 29 15:30:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Dave Glowacki
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD eusebius.glowacki.org 4.4-STABLE FreeBSD 4.4-STABLE #0: Mon Nov 19 15:14:03 CST 2001 dglo@eusebius.glowacki.org:/usr/src/sys/compile/EUSEBIUS i386


	
>Description:
	'javavm' only passes the first argument to the java
	executable.
>How-To-Repeat:
	Run 'javavm -classpath foo:bar baz', and it will print

		-classpath requires class path specification
		Usage: java [-options] class [args...]

	because only '-classpath' is passed to the executable.

>Fix:

Apply the following patch:
--- javavmwrapper/src/javavmwrapper.sh.orig	Mon Nov 26 11:21:16 2001
+++ javavmwrapper/src/javavmwrapper.sh	Thu Nov 29 13:57:17 2001
@@ -25,10 +25,12 @@
 
 tryrunVM () {
     if [ -x "${1}" ]; then
-        exec "${1}" ${2}
+        vm=${1}
+        shift
+        exec "${vm}" "${@}"
     fi
 
-    /bin/echo "${IAM}: warning: couldn't start specified JavaVM - \"${1}\"" >&2
+    /bin/echo "${IAM}: warning: couldn't start specified JavaVM - \"${vm}\"" >&2
 }
 
 registerVM () {
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111292323.fATNN3k20011>