I am new to Play framework. I installed java8 along with sbt and set the PATH variable accordingly. But when I run sbt command it asks me to download valid jdk as below:
Java HotSpot™ 64-Bit Server VM warning: ignoring option MaxPermSize=256m; sup
port was removed in 8.0
I can see that JAVA 8 got installed and added to PATH:
C:\Play_Sample_R&D_Projects\play-java-starter-example-2.5.x>java -version
java version “1.8.0_162”
Java™ SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot™ 64-Bit Server VM (build 25.162-b12, mixed mode)
I think that issue is caused by the fact that Java “10” < “8” when compared lexically. @vg.devalla seems to have Java 8 installed so it’s unlikely to be the same problem.
Is your JAVA_HOME environment variable set?
If you read the contents of sbt.bat you can see more of the logic that is used to determine the correct JRE to use. You could edit sbt.bat and echo out debugging information too.
@Greg and @richdougherty, thanks much for your support. Looks like the issue with sbt.bat file with below code where it’s parsing the value as 0 instead of 8 from 1.8.0_162:
:process
rem Parses x out of 1.x; for example 8 out of java version 1.8.0_xx
rem Otherwise, parses the major version; 9 out of java version 9-ea
set JAVA_VERSION=0
for /f “tokens=3” %%g in (’%JAVACMD% -Xms32M -Xmx32M -version 2^>^&1 ^| findstr /i “version”’) do (
set JAVA_VERSION=%%g
)
set JAVA_VERSION=%JAVA_VERSION:"=%
for /f "delims=.- tokens=1-2" %%v in ("%JAVA_VERSION%") do (
if /I “%%v” EQU “1” (
set JAVA_VERSION=%%w
) else (
set JAVA_VERSION=%%v
)
)
exit /B 0
It’s working fine with no warnings when I change it to below:
set JAVA_VERSION=8
Would you mind reporting the issue to the sbt devs so that it can be fixed for other users? Here’s the link for reporting the issue: https://github.com/sbt/sbt/issues/new
Hi, I’m also getting this in Windows 10 with sbt 1.3.13. Couldn’t find any issue on this (maybe I missed it) or should I file it? Or any other progress info that I should be aware of?