X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.0 required=5.0	tests=AWL,BAYES_00,FORGED_HOTMAIL_RCVD2,FREEMAIL_FROM,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <31148119.post@talk.nabble.com>
Date: Mon, 14 Mar 2011 13:18:03 -0700 (PDT)
From: PeterSmith <petervdkerk@hotmail.com>
To: cygwin@cygwin.com
Subject: Re: Autostart Cygwin on Windows boot and run a cygwin command
In-Reply-To: <4D7E7289.7010602@bopp.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
References: <31144428.post@talk.nabble.com> <4D7E5A1D.5030702@bopp.net> <31147099.post@talk.nabble.com> <4D7E6112.1030405@bopp.net> <31147631.post@talk.nabble.com> <4D7E7289.7010602@bopp.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com




Jeremy Bopp-3 wrote:
> 
> On 3/14/2011 14:21, PeterSmith wrote:
>> Ok, so for now lets focus on the contents of the .bat file. I'll have a
>> look
>> at the startup of the bat later :)
> 
> Excellent idea, especially considering that it's not really a Cygwin
> problem at that point. ;-)
> 
>> I now have this:
>> @echo off
>> C:
>> chdir C:\cygwin\bin
>> bash -c "cd
>> /cygdrive/e/solr/apache-solr-4.0-2010-10-12_08-05-48/example/;java
>> -Dsolr.solr.home=\"./example-DIH/solr/\" -jar start.jar" 
>> 
>> 
>> But that still gives me the exact same error:
>> C:\>start_cygwin.bat
>> bash: line 0: cd:
>> /cygdrive/e/solr/apache-solr-4.0-2010-10-12_08-05-48/example/: No such
>> file
>> or dir
>> ectory
>> Unable to access jarfile start.jar
>> C:\cygwin\bin>
> 
> I think the "Unable to access..." error message is actually coming from
> java.exe.  That's likely because the cd before the java call failed
> first, so you're not in the directory you expect to be when java is
> started.  Make sure you don't have a typo in that path to which you're
> trying to cd.
> 
> You may also consider replacing the ; in the command with && so that the
> java command is never run if the cd fails.
> 
> -Jeremy
> 
> --
> 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
> 
> 
> 

It indeed was Java and also because there was a typo in my directory :)
Thanks!
-- 
View this message in context: http://old.nabble.com/Autostart-Cygwin-on-Windows-boot-and-run-a-cygwin-command-tp31144428p31148119.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
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

