ide icon indicating copy to clipboard operation
ide copied to clipboard

'start' command not found when executing 'devon eclipse' from a cygwin shell.

Open dhelmke opened this issue 5 years ago • 6 comments

Expected behavior

As a user, I want to start eclipse with devon eclipse from a cygwin shell.

Actual behavior

When i did it, an error message comes up:

$ ./devon eclipse

launching Eclipse in workspace main at /cygdrive/c/users/dhelmke/project/devonide3.22/workspaces/main

/cygdrive/c/users/dhelmke/project/devonide3.22/scripts/command/eclipse: line 280: start: command not found

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. Execute devon eclipse in a cygwin shell.

Related/Dependent Issues

Comments/Hints:

Affected version:

  • OS: Windows

dhelmke avatar Sep 27 '19 09:09 dhelmke

Windows cmd has "start" as a built in of cmd. For msyson Windows (the git installation) there is a/usr/bin/start, which simulates the cmd command. Cygwin has cygstartinstead, with a slightly different syntax. So in order to make it working under cygwin, it will need a differentiation inside the "doIsWindows" case, betweenmsysandcygwin`.

markusschuh avatar Sep 30 '19 15:09 markusschuh

See issue #180.

hohwille avatar Dec 17 '19 13:12 hohwille

Also the execution of the java command does not work as the classpath is based on cygdrive:

$ devon eclipse
Running command: java -cp '/cygdrive/c/projects/devonfw-training/scripts/lib/devon-ide-configurator-3.0.0-beta24.jar:/cygdrive/c/projects/devonfw-training/scripts/lib/javax.json-1.1.4.jar:/cygdrive/c/projects/devonfw-training/scripts/lib/javax.json-api-1.1.4.jar' com.devonfw.tools.ide.configurator.Configurator -t /cygdrive/c/projects/devonfw-training/settings/eclipse/workspace -w /cygdrive/c/projects/devonfw-training/workspaces/main -v /cygdrive/c/projects/devonfw-training/settings/eclipse/workspace/replacement-patterns.properties -u
Error: Could not find or load main class com.devonfw.tools.ide.configurator.Configurator
Caused by: java.lang.ClassNotFoundException: com.devonfw.tools.ide.configurator.Configurator

I should have never ever started supporting cygwin. It is the source of so much trouble. I would need some more help/contributors/supporters to get all available possibilities maintained, esp. since it is a huge pain for me to test in windows at all since I have MacOS.

hohwille avatar Dec 17 '19 13:12 hohwille

It is working, if I manually change to:

java -cp 'C:/projects/devonfw-training/scripts/lib/devon-ide-configurator-3.0.0-beta24.jar;C:/projects/devonfw-training/scripts/lib/javax.json-1.1.4.jar;C:/projects/devonfw-training/scripts/lib/javax.json-api-1.1.4.jar' com.devonfw.tools.ide.configurator.Configurator -t /cygdrive/c/projects/devonfw-training/settings/eclipse/workspace -w /cygdrive/c/projects/devonfw-training/workspaces/main -v /cygdrive/c/projects/devonfw-training/settings/eclipse/workspace/replacement-patterns.properties -u

So as I assumed, the classpath has to be converted to windows style and does not work from cygwin paths.

hohwille avatar Dec 17 '19 13:12 hohwille

In git bash it executes this command what works without issues:

 java -cp '/c/projects/devonfw-training/scripts/lib/devon-ide-configurator-3.0.0-beta24.jar:/c/projects/devonfw-training/scripts/lib/javax.json-1.1.4.jar:/c/projects/devonfw-training/scripts/lib/javax.json-api-1.1.4.jar' com.devonfw.tools.ide.configurator.Configurator -t /c/projects/devonfw-training/settings/eclipse/workspace -w /c/projects/devonfw-training/workspaces/main -v /c/projects/devonfw-training/settings/eclipse/workspace/replacement-patterns.properties -u

So actually supporting Cygwin is really hard. People complaining about this need to actively contribute PRs. I am involved in too many other important places of devonfw...

hohwille avatar Dec 17 '19 13:12 hohwille

Since git-bash / MinGW is so well established, should we officially end support for cygwin and close issues like this one?

hohwille avatar Sep 12 '22 15:09 hohwille