Use Scala as if it were Java

I read a lot on Scala recently, and I really want to figure it out. I am doing my Java web development from Eclipse with Tomcat as my preferred server, and I would like to keep it that way. I tried the Scala Eclipse plugin, but I'm sure it is not there yet. I had to remove it because it just doesn't work. In addition, it does not seem to give anything for creating web projects (I could be wrong there).

Since Scala is a compiled language like Java, I was wondering if you could just replace Java with Scala, as in where I used to create Java classes, now I could create Scala classes instead? Maybe even mix Java and Scala?

Is there anyone who was able to create a decent Scala workflow in Eclipse for web development without the scary "official" Scala Eclipse plugin?

PS: I tried the Play platform (I think she recently added Scala support), but it just isn't for me. I like compiled classes and using JSP for my views.

+3
source share
3 answers

Since Scala is a compiled language like Java, I was wondering if it is possible to just replace Java with Scala, as in where I usually create Java classes that I would now be able to create Scala classes instead of this?

Yes, absolutely. This is one of Scala's great advantages over some other JVM languages.

Maybe even mix Java and Scala?

Yes, absolutely. This is one of Scala's great advantages over some other JVM languages.

, Java Scala ( ), Scala Java, Scala 2.8). , @BeanProperty - Scala.

+4

, Scala IDE Eclipse , , , . , http://groups.google.com/group/scala-ide-user , .

+5

, Eclipse, .

Scala Eclipse. Eclipse Galileo 3.5.2 , Scala. IntelliJ (IDEA 9.0.2), . , .

, , -. , , Java, Scala. Scala Java BitCode, . . Scala Java.

Scala () Java , . (.. ), .

+2
source

Source: https://habr.com/ru/post/1752231/


All Articles