Skip to content

Command line tool that transpiles scala code into java code.

License

Notifications You must be signed in to change notification settings

shyiko/scala-to-java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Scala To Java

Simple tool written in Scala that reveals the mystery of scala compiler. Reads scala code from the StdIn and writes it's decompiled Java version to StdOut.

Usage

  • Make sure you have Java 1.8 and Maven installed
  • Checkout the project
  • In project directory invoke mvn clean package. In target directory scala-to-java.jar will be created
  • Run application with java -jar target/scala-to-java.jar
  • Type any scala code, for example println("hello, world") and finish with END character (Ctrl-D)

Download

Just in case you don't want to bother yourself with building the project, I already have built it for you.

Source highlighting and more

To improve usage experience, you may want to use external source code highlighter (like pygmentize) and pv as the indicator of transpiling process.

My setup:

alias scala-to-java='java -jar ~/.scala-to-java.jar | pv -W | pygmentize -f 256 -l java -O style=monokai'

Credits

Thanks to Stanley Shyiko, who actually implemented all the magic.

About

Command line tool that transpiles scala code into java code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%