Solved

String after spaces are excluded in cygwin

Posted on 2013-06-06
2
584 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Database Solutions Engineer FAQs

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller single-server environments.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

617 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