Solved

String after spaces are excluded in cygwin

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Clipboard Manager for Windows 7 5 67
Any free software for printscreens 7 91
cloning computer 13 85
Abstract Express Replacement Software 12 28
In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
The viewer will learn common shortcuts with easy ways to remember them. The viewer will then learn where to find all of the keyboard shortcuts, how to create/change them, and how to speed up their workflow.
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…

803 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