Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

String after spaces are excluded in cygwin

Posted on 2013-06-06
2
Medium Priority
?
585 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 945 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

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

688 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