This is the mail archive of the
mailing list for the Cygwin project.
Re: Autostart Cygwin on Windows boot and run a cygwin command
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
> chdir C:\cygwin\bin
> bash -c "cd
> -Dsolr.solr.home=\"./example-DIH/solr/\" -jar start.jar"
> But that still gives me the exact same error:
> bash: line 0: cd:
> /cygdrive/e/solr/apache-solr-4.0-2010-10-12_08-05-48/example/: No such file
> or dir
> Unable to access jarfile start.jar
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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple