Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to integrate Jetty with, IntelliJ IDEA, you,need two scripts.

...

Code Block
titleStartJetty.bat


@echo off

...


setlocal

...


if not "%JAVA_HOME%" == "" goto JettyAction

...



:SearchFromRegistry

...


echo JAVA_HOME environment variable is not set.

...


echo Searching registry...

...


for /f "usebackq tokens=3" %%i in (`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit" /s

...

 ^2^> null \^\|find "JavaHome"`) do set JAVA_HOME=%%~i

...


if not "%JAVA_HOME%" == "" goto JettyAction

...



:NoJava

...


echo Could not find JDK in your system. Please install JDK

...


endlocal

...


exit/b 1

...



:JettyAction

...


if not "%CD%\" == "%~dp0" echo Please say 'Y' if prompted for "Terminate batch job (Y/N)?"

...


rem %~dp0 is current dir in Winodws NT

...


set curpath=%~dp0

...


pushd %curpath%

...


set runcmd=%JAVA_HOME%\bin\java \-showversion \-DSTOP.PORT=8079 \-DSTOP.KEY=secret %VM_DEBUG_VAR% \-jar start.jar %\*

...


echo "Using " %runcmd%

...


%runcmd%

...


popd

...


endlocal

...



Code Block
titleStopJetty.bat


@echo off

...


setlocal

...


if not "%JAVA_HOME%" == "" goto JettyAction

...



:SearchFromRegistry

...


echo JAVA_HOME environment variable is not set.

...


echo Searching registry...

...


for /f "usebackq tokens=3" %%i in (`reg query "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit" /s

...

 ^2^> null \^\|find "JavaHome"`) do set JAVA_HOME=%%~i

...


if not "%JAVA_HOME%" == "" goto JettyAction

...



:NoJava

...


echo Could not find JDK in your system. Please install JDK

...


endlocal

...


exit/b 1

...



:JettyAction

...


if not "%CD%\" == "%~dp0" echo Please say 'Y' if prompted for "Terminate batch job (Y/N)?"

...


rem %~dp0 is current dir in Winodws NT

...


set curpath=%~dp0

...


pushd %curpath%

...


set runcmd=%JAVA_HOME%\bin\java \-showversion \-DSTOP.PORT=8079 \-DSTOP.KEY=secret \-jar start.jar \--stop

...


echo "Using " %runcmd%

...


%runcmd%

...


popd

...


endlocal

These scripts are not named specifically as IntelliJ scripts because they are also general purpose batch files to start and stop and Jetty.

...

Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery