Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 78266 invoked from network); 19 Mar 2009 08:09:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Mar 2009 08:09:14 -0000 Received: (qmail 27876 invoked by uid 500); 19 Mar 2009 08:09:13 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 27838 invoked by uid 500); 19 Mar 2009 08:09:13 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 27827 invoked by uid 99); 19 Mar 2009 08:09:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 01:09:13 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of t.p.ellison@gmail.com designates 209.85.219.161 as permitted sender) Received: from [209.85.219.161] (HELO mail-ew0-f161.google.com) (209.85.219.161) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 08:09:03 +0000 Received: by ewy5 with SMTP id 5so301923ewy.36 for ; Thu, 19 Mar 2009 01:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=hZ5L5RbYDDMybp6IIbI7pZ2i/PCWDV/m4Sq+se0lyuM=; b=MrKMvmH8FVB3x3dzZ0hzLAe+yt76Vx/suOG8zjuJYD0OBC+EmDs/9iwH8KakfuSGQd qXHpeT319BwDvgZU0QVTj+oGgfIOd18284DD0nSiwqnrHszUfhrSexYiW7Xs8SSTDslN /8gDKFLYKHO2DpJs4gFEjNg/rYOF41UYpKOUE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=mzhhGw3WD3lBOq46/Ezc19SCl5KHbuXpwzzpLGCSp7mRN4K2nKejhOfdX7jyH/cA80 Rbub6XGTI6Np2vyX43/DNi8Se5t1cQp8c7GZ4c4VxQVEBaXAkR1A0L3MeOMlqDYkEj5e 3ijlfLFXuasdOnxAxmrsb5IqCHmAiWs5XF4Yw= Received: by 10.216.73.79 with SMTP id u57mr619473wed.40.1237450123307; Thu, 19 Mar 2009 01:08:43 -0700 (PDT) Received: from ?9.20.183.191? (blueice4n2.uk.ibm.com [195.212.29.92]) by mx.google.com with ESMTPS id 1sm1525277nfv.70.2009.03.19.01.08.42 (version=SSLv3 cipher=RC4-MD5); Thu, 19 Mar 2009 01:08:42 -0700 (PDT) Message-ID: <49C1FD89.90308@gmail.com> Date: Thu, 19 Mar 2009 08:08:41 +0000 From: Tim Ellison User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: dev@harmony.apache.org Subject: Re: about java -version issue for harmony java launcher References: In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Deven You wrote: > Harmony java launcher "java -version" command can not work with IBM J9 > VM26 . The error result is as below: > > ../jres/see/bin/java -version > Apache Harmony Launcher : (c) Copyright 1991, 2008 The Apache Software > Foundation or its licensors, as applicable. > JVMJ9VM007E Command-line option unrecognised: -version > HMYEXEL062E Internal VM error: Failed to create Java VM > FAILED to invoke JVM > This issue occurs on both linux and windows x86 platform. > > I find our laucher just invoke the mothod JNI_CreateJavaVM() of vm which > on j9 vm does not deal with -version option according to JNI Specification. > the specification says: > "All Java virtual machine implementations must recognize the following set > of standard options: ..." > it lists: > -D > -verbose > vfprintf > exit > abort > > It then goes on to stay: > "In addition, virtual machine implementations may support their own set of > implementation-dependent option strings. Implementation-dependent option > strings must begin with "-X" or an underscore." > Any other option is non-standard. > > but for DRLVM, seems its JNI_CreateJavaVM() does not comply with JNI > Specification and support -version option.the result is below: > > Apache Harmony Launcher : (c) Copyright 1991, 2008 The Apache Software > Foundation or its licensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r745401, (Feb 18 2009), Windows/ia32/msvc 1310, release build > http://harmony.apache.org. > but there is still no vm version info. > > I suggest our java launcher should not pass -version or other non-standarad > options to vm interface JNI_CreateJavaVM(), instead we should make a > general solution to deal with them, maybe call certain methods in jre tool > package. so that our java laucher can work well on different vms. Sounds reasonable to me. A basic implementation would create the VM then query the values in java.vm.version etc and print those, a more sophisticated (and longer running) implementation would run a Java class and pull out the VM version plus version information from our class library JARs too. (We would need to define the SVN build info as a property too so it can be picked up from Java) Regards, Tim