Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error running WEB Tomcat application from Intellij IDEA 11 (CreateProcess error=87, The parameter is incorrect)

I moved my project from Win XP to Win 7 Ultimate. It is easy/ standard Java WEB application (Wicket/no DB yet). I use Tomcat 6.0.35 (64 bit) or 6.0.32 (32 bit). The server and my application run properly by starting Tomcat from command line (startup.bat). Under Intellij Idea it runs good with Debug mode (Shift-F9). But when I am trying to run it with standard mode (Shift-F10) I get error: “Cannot run program "X:\Program Files\apache-tomcat-6.0.35\bin\catalina.bat" (in directory "X:\Program Files\apache-tomcat-6.0.35\bin"): CreateProcess error=87, The parameter is incorrect.” And I can’t see compile line. So, I don’t know which parametres incorrect and why?

I was trying to build it by maven and run with Jetty. It works fine also. So, for some reason I can’t run application by using standard fast mode (Shift-F10). Anybody had that problem?

PS: The application was built corrected every trying to run (and was placed in the out directory)

Thank you.

like image 807
Uladzimir Avatar asked Mar 06 '12 23:03

Uladzimir


1 Answers

It looks like I found out where was the problem.

A project has dialog “Edit Configuration” (dialog’s title - Run/Debug Configuration). The dialog has 5 tabs. Last right tab (‘Startup/Connection’) provides possibility to describe environment variables to pass it to Java machine. For ‘Debug’ mode by default is set ‘JAVA_OPTS’. But for ‘Run’ mode there is one empty line only (without any values). Just I put focus and removed that empty line - the problem is gone. It is easy to reproduce. I didn’t add any empty line myself. Possible this is little IDEA bug.

On the other hand I can’t reproduce the problem under Win XP. Possible the reason is – my Win XP has external environment variable ‘JAVA_OPTS’ with memory setting. So, empty line doesn’t add any problems.

like image 200
Uladzimir Avatar answered Sep 28 '22 10:09

Uladzimir