From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40470 invoked by alias); 5 Mar 2016 16:33:33 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 40456 invoked by uid 89); 5 Mar 2016 16:33:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=jdk, JDK, Echo, crystal X-HELO: resqmta-po-01v.sys.comcast.net Received: from resqmta-po-01v.sys.comcast.net (HELO resqmta-po-01v.sys.comcast.net) (96.114.154.160) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 05 Mar 2016 16:33:30 +0000 Received: from resomta-po-08v.sys.comcast.net ([96.114.154.232]) by resqmta-po-01v.sys.comcast.net with comcast id SGZT1s006516pyw01GZVNM; Sat, 05 Mar 2016 16:33:29 +0000 Received: from AndyWork ([73.223.74.29]) by resomta-po-08v.sys.comcast.net with comcast id SGZU1s00A0dvCo901GZUFK; Sat, 05 Mar 2016 16:33:29 +0000 From: "Andy Hall" To: Subject: =?iso-8859-1?Q?Simple_.cmd_file_works_under_Cygwin_but_not_Window's_cmd_i?= =?iso-8859-1?Q?nterpreter.?= Date: Sat, 05 Mar 2016 16:33:00 -0000 Message-ID: <002c01d176fc$ba3ed090$2ebc71b0$@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00046.txt.bz2 This is a puzzle that I have not been able to sort out despite trying all s= orts of variations.=A0 Basically,=A0 I maintain a bunch of Crystal Reports =A0based on Crystal reports XI R2. =A0Sorry, =A0I = have no choice there.=A0 =A0=A0I have this installed and running on a Widows 10 machine.=A0=A0 How I did that is another story.=A0= =A0 Recently I was asked what it would take to internationalize these reports.=A0 Fortunately, CR has a mechanism that all= ows you to define your own functions that can be used in reports which =A0allow you to access properties files containing= the localized entities just as you would for a normal Java app.=A0=A0 All well and good.=20 So I set about trying to get this to work.=A0=A0 The plugin to CR XI R2, is= not well integrated with the base system and a bit of not so nice manual configuration is necessary.=A0 You have to follow= this to the letter, but that is not sufficient.=A0 =A0Out of the box I could not get it to work.=A0=A0=A0 So to= debug what was going on I wrote a simple bash script to try to get it to work.=A0=A0 Lo and behold this simple script works: #!/bin/bash echo " " echo "CLASSPATH =3D $CLASSPATH" echo " " #JAVA_HOME=3DC":\Program Files (x86)\Java\jdk1.6.0_45" echo "JAVA_HOME =3D $JAVA_HOME" echo " " echo "PATH =3D $PATH" cd "/cygdrive/c/Program Files (x86)/Business Objects/Crystal Reports 11.5" java -version crw32.exe Notice that this seem to do nothing but display some key variables and the = run CR in its installation =A0directory, just as the normal shortcut does. =A0It launches CR which finds the plugin and l= oads it. Now I have a need to do the same outside of the Cygwin environment, so I wr= ote a simple equivalent .cmd file: @Echo off :: Display CLASSPATH set CLASSPATH :: Set and display JAVA_HOME ::set JAVA_HOME=3DC:\Program Files (x86)\Java\jdk1.6.0_45 set JAVA_HOME :: Add 32-bit JDK to PATH and display ::set PATH=3D%JAVA_HOME%\bin;%PATH% set PATH pushd C:\Program Files (x86)\Business Objects\Crystal Reports 11.5 java.exe -version crw32.exe popd If I run this from a bash command prompt it works as well.=A0 It also works= if I launch cmd from bash and then run the cmd file.=A0 That makes sense. But here is the puzzle,=A0=A0 If I simply click on the runCR.cmd file, say = from=A0 the file explorer, =A0CR launches but does not find the plugin.=A0 The same happens if I launch a Windows cmd window a= nd run the cmd file outside of Cygwin.=20 So the question is: =93What could possibly be the difference between the Cy= gwin environment and the Windows cmd environment that makes this work in one and not the other?=94=A0=A0 I have = examined the PATH used in the Cygwin environment and set the PATH in the Windows environment to be identical.=A0 No change.= =A0=A0 I thought it might have to do with whether or not a 32-bit or 64-bit JVM is configured in the path, but that does not see= m to make a difference.=A0=A0 It fails if the JVM in the path is 32-bit or 64-bit probably because CR really gets its JVM fro= m a registry setting. I am at a loss,=A0=A0 Does anybody have an idea?=A0=A0=20 BTW, I would have expected the reverse to be the case:=A0 works in Windows = but not Cygwin.=A0=20 Andy Hall -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple