Solved

String after spaces are excluded in cygwin

Posted on 2013-06-06
2
564 Views
Last Modified: 2013-11-15
Hi,

I am facing problem with the spaces in path in cygwin.
Java is installed in program files, when i try to provide the path it excludes the string after spaces.

ABC@ABC-PC /cygdrive/c/apache-nutch-1.6/bin
$ export JAVA_HOME='C:\Program Files\Java\jdk1.7.0_21'

ABC@ABC-PC /cygdrive/c/apache-nutch-1.6/bin
$ ./nutch crawl urls -dir crawl -depth 3 -topN 5
cygpath: can't convert empty path
./nutch: line 264: exec: C:\Program: not found
0
Comment
Question by:Rocking
  • 2
2 Comments
 
LVL 32

Expert Comment

by:phoffric
ID: 39230583
See if this suggestion is appropriate for your needs:

In Cygwin bash file:

export JAVA_HOME='/cygdrive/c/Program Files/Java/jdk1.7.0_21'

Then, in scripts, surround $JAVA_HOME with double quotes as in:

$  ls "$JAVA_HOME"
bin        include      register.html        src.zip
COPYRIGHT  jre          register_ja.html     THIRDPARTYLICENSEREADME.txt
db         lib          register_zh_CN.html
demo       LICENSE      release
docs       README.html  sample
0
 
LVL 32

Accepted Solution

by:
phoffric earned 315 total points
ID: 39230603
If you cannot use double quotes for each case of $JAVA_HOME, then you can uninstall the jdk and reinstall it in the C: drive directly.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now