Solved

String after spaces are excluded in cygwin

Posted on 2013-06-06
2
561 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Skype uninstall 8 83
Microsoft Dynamics Roles question 4 55
Free employee timeclock 7 51
Software Licensing 6 52
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

746 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

12 Experts available now in Live!

Get 1:1 Help Now