Running the scala interactive shell from the command line

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite
1












I just installed scala on Ubuntu



scala -version
Scala code runner version 2.11.6 -- Copyright 2002-2013, LAMP/EPFL


but when I try to run the scala command for an interactive shell session I have the following error:



Exception in thread "main" java.lang.NoClassDefFoundError: javax/script/Compilable
at scala.tools.nsc.interpreter.ILoop.createInterpreter(ILoop.scala:126)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:908)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:906)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:906)
at scala.reflect.internal.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:97)
at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:906)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:74)
at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:87)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:98)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:103)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)









share|improve this question

























    up vote
    0
    down vote

    favorite
    1












    I just installed scala on Ubuntu



    scala -version
    Scala code runner version 2.11.6 -- Copyright 2002-2013, LAMP/EPFL


    but when I try to run the scala command for an interactive shell session I have the following error:



    Exception in thread "main" java.lang.NoClassDefFoundError: javax/script/Compilable
    at scala.tools.nsc.interpreter.ILoop.createInterpreter(ILoop.scala:126)
    at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:908)
    at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:906)
    at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:906)
    at scala.reflect.internal.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:97)
    at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:906)
    at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:74)
    at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:87)
    at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:98)
    at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:103)
    at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)









    share|improve this question























      up vote
      0
      down vote

      favorite
      1









      up vote
      0
      down vote

      favorite
      1






      1





      I just installed scala on Ubuntu



      scala -version
      Scala code runner version 2.11.6 -- Copyright 2002-2013, LAMP/EPFL


      but when I try to run the scala command for an interactive shell session I have the following error:



      Exception in thread "main" java.lang.NoClassDefFoundError: javax/script/Compilable
      at scala.tools.nsc.interpreter.ILoop.createInterpreter(ILoop.scala:126)
      at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:908)
      at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:906)
      at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:906)
      at scala.reflect.internal.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:97)
      at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:906)
      at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:74)
      at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:87)
      at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:98)
      at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:103)
      at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)









      share|improve this question













      I just installed scala on Ubuntu



      scala -version
      Scala code runner version 2.11.6 -- Copyright 2002-2013, LAMP/EPFL


      but when I try to run the scala command for an interactive shell session I have the following error:



      Exception in thread "main" java.lang.NoClassDefFoundError: javax/script/Compilable
      at scala.tools.nsc.interpreter.ILoop.createInterpreter(ILoop.scala:126)
      at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:908)
      at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:906)
      at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:906)
      at scala.reflect.internal.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:97)
      at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:906)
      at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:74)
      at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:87)
      at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:98)
      at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:103)
      at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)






      command-line scala






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 17 at 15:28









      A. N. Other

      1297




      1297




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          The version of Scala that you installed does not work with the version of Java that you installed.



          Scala works well with Java 8. You probably have installed Java 9. The solution is to uninstall Java and install Java 8.



          There are more issues with trying to use Java 9 or newer with Scala. Oracle has started changing the packaging and licensing for Java which means that some classes (imports) that Scala requires do not exist in Java SE 9+. Some have been moved to Java EE and some are deprecated. Stay with Java 8 with Scala.






          share|improve this answer




















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1007087%2frunning-the-scala-interactive-shell-from-the-command-line%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote



            accepted










            The version of Scala that you installed does not work with the version of Java that you installed.



            Scala works well with Java 8. You probably have installed Java 9. The solution is to uninstall Java and install Java 8.



            There are more issues with trying to use Java 9 or newer with Scala. Oracle has started changing the packaging and licensing for Java which means that some classes (imports) that Scala requires do not exist in Java SE 9+. Some have been moved to Java EE and some are deprecated. Stay with Java 8 with Scala.






            share|improve this answer
























              up vote
              1
              down vote



              accepted










              The version of Scala that you installed does not work with the version of Java that you installed.



              Scala works well with Java 8. You probably have installed Java 9. The solution is to uninstall Java and install Java 8.



              There are more issues with trying to use Java 9 or newer with Scala. Oracle has started changing the packaging and licensing for Java which means that some classes (imports) that Scala requires do not exist in Java SE 9+. Some have been moved to Java EE and some are deprecated. Stay with Java 8 with Scala.






              share|improve this answer






















                up vote
                1
                down vote



                accepted







                up vote
                1
                down vote



                accepted






                The version of Scala that you installed does not work with the version of Java that you installed.



                Scala works well with Java 8. You probably have installed Java 9. The solution is to uninstall Java and install Java 8.



                There are more issues with trying to use Java 9 or newer with Scala. Oracle has started changing the packaging and licensing for Java which means that some classes (imports) that Scala requires do not exist in Java SE 9+. Some have been moved to Java EE and some are deprecated. Stay with Java 8 with Scala.






                share|improve this answer












                The version of Scala that you installed does not work with the version of Java that you installed.



                Scala works well with Java 8. You probably have installed Java 9. The solution is to uninstall Java and install Java 8.



                There are more issues with trying to use Java 9 or newer with Scala. Oracle has started changing the packaging and licensing for Java which means that some classes (imports) that Scala requires do not exist in Java SE 9+. Some have been moved to Java EE and some are deprecated. Stay with Java 8 with Scala.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 18 at 20:53









                John Hanley

                1406




                1406



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1007087%2frunning-the-scala-interactive-shell-from-the-command-line%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491