0

I have installed cygwin on window to start crawling. It work well. Now i want to run cygwin and run a crawl program at starting of cygwin using java program code.

If you provide some code for it ,it will be great help for me.

2

2 Answers 2

1

I looked at adatapost's link. It seems like a world of trouble awaits you down this path.

I mean, I like Cygwin a lot, but I wouldn't use it like this.

A few centimetres to the right of the 'Your Answer' box I'm typing in is a link to a Related question 'How can I run cygwin from Java?'

Who's putting the cart before the horse? I don't know.

Does Cygwin have to be involved at all ?

Sign up to request clarification or add additional context in comments.

Comments

0

If you are trying to run a binary that requires the cygwin1.dll (which includes most commands you can execute from the cygwin bash shell) then you can run it by specifying the cygwin\bin directory in the path environment variable like this:

Process p = Runtime.getRuntime().exec("C:/path/to/cygwin/binary.exe", new String[] { "PATH=C:\\cygwin\\bin" });

This assumes you installed cygwin in C:\cygwin

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.