Windows下Scala环境安装

1.下载Scala-2.12.6.zip或者Scala-2.12.6.msi

2.解压或者直接运行msi

3.解压应该得自己配置环境变量

4.Scala。msi应该不用自己配环境变量

5.官网要求Scala必须安装Java jdk(Scala构建于jvm)

Windows下Scala环境安装_第1张图片

本身已经安装jdk

 

运行Scala -- version

抛出错误:

D:\Program Files\scala\bin>scala -version
Exception in thread "main" java.lang.VerifyError: Uninitialized object exists on
 backward branch 96
Exception Details:
  Location:
    scala/tools/nsc/CompilerCommand.sstring$1(Ljava/lang/String;Lscala/collectio
n/immutable/List;I)Lscala/Option; @153: goto
  Reason:
    Error exists in the bytecode
  Bytecode:
    0000000: 2bb6 02eb 9900 07b2 016b b0bb 0155 591c
    0000010: ba02 f100 00b2 00ca b600 ce3a 044e 1904
    0000020: b200 cab6 00d2 a600 7d2b b200 d7a6 000b
    0000030: b200 d73a 09a7 0077 bb00 d959 2bb6 00dc
    0000040: c000 2b3a 0a1c 190a b802 edb2 00d7 b700
    0000050: e93a 0519 053a 062b b600 ecc0 0050 3a07
    0000060: 1907 b200 d7a5 0037 bb00 d959 1907 b600
    0000070: dcc0 002b 3a0a 1c19 0ab8 02ed b200 d7b7
    0000080: 00e9 3a08 1906 1908 b600 f019 083a 0619
    0000090: 07b6 00ec c000 503a 07a7 ffc7 1905 3a09
    00000a0: a700 0c2b 2d19 04b8 00f6 3a09 1909 c000
    00000b0: 502a b602 f513 02f7 b602 02b7 015a b0
  Stackmap Table:
    same_frame(@11)
    full_frame(@56,{Object[#119],Object[#80],Integer,Object[#334],Object[#336]},
{Uninitialized[#11],Uninitialized[#11]})
    full_frame(@96,{Object[#119],Object[#80],Integer,Object[#334],Object[#336],O
bject[#217],Object[#217],Object[#80],Top,Top,Object[#43]},{Uninitialized[#11],Un
initialized[#11]})
    full_frame(@156,{Object[#119],Object[#80],Integer,Object[#334],Object[#336],
Object[#217],Object[#217],Object[#80],Top,Top,Object[#43]},{Uninitialized[#11],U
ninitialized[#11]})
    full_frame(@163,{Object[#119],Object[#80],Integer,Object[#334],Object[#336]}
,{Uninitialized[#11],Uninitialized[#11]})
    full_frame(@172,{Object[#119],Object[#80],Integer,Object[#334],Object[#336],
Top,Top,Top,Top,Object[#4]},{Uninitialized[#11],Uninitialized[#11]})

        at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:42)

        at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:101)
        at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

 

经网络查询是Java版本的问题,下载jdk1.8.0_151 或者jdk1.8.0-131

 

 

你可能感兴趣的:(Windows下Scala环境安装)