Reputation: 6122
So I had to re-install my system. I installed Cygwin in C:\cygwin\bin
And I used the batch file that worked on my previous installation: "start_cygwin.bat"
@echo off
C:
chdir C:\cygwin\bin
bash -c "cd /cygdrive/e/apache-solr-3.5.0/example/;java -Dsolr.solr.home="./example-DIH/solr/" -jar start.jar"
But after running this command:
bash -c "cd /cygdrive/e/apache-solr-3.5.0/example/;java -Dsolr.solr.home="./example-DIH/solr/" -jar start.jar"
I get the error:
bash: java: command not found
I thought it had something to do with java, but I installed the java jdk 6.27 (which worked fine before) and when I type "java" in my command prompt I see a list of possible java commands.
Upvotes: 2
Views: 10604
Reputation: 399
If it doesn't work using the path to java/bin then you can try to
- create symbolic link: ln -s /cygdrive/c/Program\ Files/Java/jre1.8.0_102/bin/java.exe /usr/bin/java
- create an alias: alias java="/cygdrive/c/Program\ Files/Java/jre1.8.0_102/bin/java.exe"
- add the java path to the paths: export JAVA_HOME="/cygdrive/c/Program\ Files/Java/jre1.8.0_102"
export PATH="$PATH:$JAVA_HOME/bin"
Upvotes: 0
Reputation: 34367
Its not able to locate your java.exe
file.
To resolve the issue, you have two options:
Add Java installed folder in your PATH
Use full path of java.exe
in the above command i.e. in place of java
, use /home/../jdk.../bin/java
.
One of the tow options, should help resolving your issue.
Upvotes: 4