[Geoserver-devel] Can't start geoserver-2.9-SNAPSHOT on Windows

Hi,

There are probably two issues which prevent the launch command to work:

“%RUN_JAVA%” “%RUN_JAVA%” “%JAVA_OPTS%” -DGEOSERVER_DATA_DIR=“%GEOSERVER_DATA_DIR%” -Djava.awt.headless=true -DSTOP.PORT=8079 -DSTOP.KEY=geoserver -jar start.jar-DGEOSERVER_DATA_DIR=“%GEOSERVER_DATA_DIR%” -Djava.awt.headless=true -DSTOP.PORT=8079 -DSTOP.KEY=geoserver -jar start.jar

The first one is that environment variable JAVA_OPTS is empty at this stage. Removing “%JAVA_OPTS%” makes Geoserver to start but there can be another issue with RUN_JAVA environment.

If there is a valid JAVA_HOME set on the computer before running startup.bat everything is probably going well. However, for me JAVA_HOME is empty before I start to run the startup.bat and when the batch goes so far as trying to start java it is set to this peculiar value:

RUN_JAVA=C:\ProgramData\Oracle\Java\javapath\java.exe

So two places to look at:

  1. Empty JAVA_OPTS is bad

  2. This block in the batch file may set a surprising value for the RUN_JAVA

:trySystemJava

for /f %%i in (‘where java’) do set RUN_JAVA=%%i

rem — we might be on amd64 having only x86 jre installed —

if “%RUN_JAVA%”==“” if DEFINED ProgramFiles(x86) if NOT “%PROCESSOR_ARCHITECTURE%”==“x86” (

rem — restart the batch in x86 mode—

echo Warning: No java interpreter found in path.

echo Retry using Wow64 filesystem [32bit environment] redirection.

%SystemRoot%\SysWOW64\cmd.exe /c %0 %*

exit /b %ERRORLEVEL%

)

if “RUN_JAVA%”==“” goto noJava

goto checkGeoServerHome

-Jukka Rahkonen-

Lähettäjä: Ian Turton [mailto:ijturton@…403…]
Lähetetty: 30. maaliskuuta 2016 16:23
Vastaanottaja: Ben Caradoc-Davies
Kopio: Rahkonen Jukka (MML); geoserver-devel@lists.sourceforge.net
Aihe: Re: [Geoserver-devel] Can’t start geoserver-2.9-SNAPSHOT on Windows

···

I can confirm this behaviour with today’s master. It will start when you run it from the command line but fails when you double click start.bat or run from the command line

The console says:

Welcome to GeoServer!

The GEOSERVER_HOME environment variable is not defined.

Temporarily setting GEOSERVER_HOME to the following directory:

C:\Users\astun\Desktop\geoserver-2.9-SNAPSHOT

The GEOSERVER_DATA_DIR environment variable is not defined correctly.

Temporarily setting GEOSERVER_DATA_DIR to the following directory:

C:\Users\astun\Desktop\geoserver-2.9-SNAPSHOT\data_dir

Please wait while loading GeoServer…

Error: Could not find or load main class

Press any key to continue . . .

for Java

java version “1.8.0_77”

Java™ SE Runtime Environment (build 1.8.0_77-b03)

Java HotSpot™ 64-Bit Server VM (build 25.77-b03, mixed mode)

Ian

On 30 March 2016 at 13:36, Ben Caradoc-Davies <ben@…4191…> wrote:

And please send us the full console output.

Kind regards,
Ben.

On 31/03/16 01:07, Rahkonen Jukka (MML) wrote:

Hi,

Have anybody tried to start master snapshots on Windows? The bin-zip that I downloaded today yields
Error: Could not find or load main class

My jre version is jre1.8.0_72 (32-bit)

-Jukka Rahkonen-


Ben Caradoc-Davies <ben@…4191…>
Director
Transient Software Limited <http://transient.nz/>
New Zealand


Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Ian Turton