score:1
Accepted answer
i have intellij idea 11.1.2 build #ic 117.418 with scala plugin version 0.5.913.
i had issue getting the plugin to recognize *.scala file. the forum told me to check the file types setting, and i had to manually add *.scala to scala files.
here are the steps you can follow:
- download scala-2.9.2.tgz and expand it as
~/applications/scala-2.9.2/
. - download scala-docs-2.9.2.txz and expand it as
~/applications/scala-2.9.2/scala-devel-docs/api/
. - from intellij, file > new project...
- select create project from scratch.
- type in project name.
- keep the create module as is. java module is fine.
- hit next.
- keep create source directory checked.
- hit next.
- check scala:
- keep use scala distribution checked.
- browse to
~/applications/scala-2.9.2/
that you created above. - rename create compiler library to
scala-compiler-2.9.2
. - rename create standard library to
scala-library-2.9.2
. - keep them both project-level.
- hit finish.
- right click
src
, and select new... > scala class.- type
hello
for name. - select object for kind.
- hit ok.
- type
- this should create
object hello
. type this in:
object hello extends app { println("hello, world!") }
right-click on hello icon from the project tree and select run 'hello.main()'. this should print out the following:
/system/library/java/javavirtualmachines/1.6.0.jdk/contents/home/bin/java -didea.launcher.port=7532 .... hello, world! process finished with exit code 0
Source: stackoverflow.com
Related Query
- on your macbook, show your IDEA scala plugin version which can working?
- Is it possible in Intellij IDEA Scala plugin to know which implicit conversion was applied?
- What scala version Intellij Idea scala plugin uses?
- How can I force which Scala version SBT should use?
- IntelliJ IDEA 2020.3 Scala plugin isn't working with new projects
- sbt version and scala version. project configuration for intellij idea with sbt-idea plugin
- Debugger source line synchronization not working in IntelliJ IDEA Scala plugin
- Which version of Scala Eclipse plugin should I use?
- Can I access my Scala app's name and version (as set in SBT) from code?
- How to use Scala in IntelliJ IDEA (or: why is it so difficult to get a working IDE for Scala)?
- Why to use empty parentheses in Scala if we can just use no parentheses to define a function which does not need any arguments?
- Show inferred type in Intellij Scala plugin
- How can I tell what Scala version a .class file was compiled with?
- How does sbt choose which Scala version to use?
- Can I use a scala class which implements a java interface from Java?
- How to get Scala imports working in IntelliJ IDEA with the Play framework?
- How can I change version of Scala that is used by Play, SBT and its plugins?
- Is this the latest version of the maven scala plugin ?
- Eclipse: How can I install an older plugin version from an update site?
- How to setup sbt/scala/play multi-module project which will work fine with Intellij scala plugin
- Scala Eclipse plugin doesn't show mouse hover documentation
- IntelliJ IDEA w/ Scala Plugin not finding scala.concurrent
- Which version of scala should I release my library to?
- What scala statements or code can produce a byte-code which can not be translated to java?
- Play Idea failing - no sbt-idea plugin for this version of sbt 0.11.3
- Working IntelliJ Scala Plugin Tutorial?
- In which case can Scala 2.10.0 compiler be faster or slower than 2.9.2?
- How can I find the version of Scala installed in Eclipse IDE?
- scala: how to create a generic type which is subtype of all the number classes in scala so that it can include compare method
- Upgrading Scala version in a Maven project in IDEA
More Query from same tag
- Type conversion from Any object: pattern matching vs Try()
- Scala 3 implicit conversions: compare value and literal
- Anorm Populate Child List
- GraphX - How to get all connected vertices from vertexId (not just the firsts adjacents)?
- SPARK Mlllib - <console>:37: error: value filter is not a member of Long
- Pass an actor as parameter
- Play 2.0 pass route value to action
- Confused about Scala Singleton object
- Pattern matching on List[T] and Set[T] in Scala vs. Haskell: effects of type erasure
- Does using native Scala methods on Spark RDD's lose out on Spark magic?
- Why sbt does override scala version in subproject?
- org.apache.spark.SparkException: Task not serializable. How to run a method in map{}
- Do we have Akka/Scala equivalents for the OTP behaviors?
- Elasticsearch Script File in Local Mode
- The argument types of an anonymous function must be fully known. (SLS 8.5)
- Misunderstanding of scala 'match' compile rules
- Pattern Matching chooses the wrong case if used with ClassTag
- request-reply with akka-camel and ActiveMQ
- Scala method syntax problem
- convert java to scala code - change of method signatures
- How do I limit write operations to 1k records/sec?
- Currying Math Operators in Scala
- Scala: "Static values" in traits?
- Appending occurrences and aggregation to the duplicates records
- Scala - Abstract types and Implicit Parameter Resolution
- Accessing JSON elements in a Scala Map
- Async authentication in scalatra
- Create Closure from Generic in Scala
- Parameterize a class with a known Type
- Scala and Play2: ClassCastException: java.lang.Object cannot be cast to play.api.libs.json.JsValue