顯示具有 scala 標籤的文章。 顯示所有文章
顯示具有 scala 標籤的文章。 顯示所有文章

2015年5月12日 星期二

關於 Java 反編譯

command  line :
  • javap -private {class name}

example :   javap -private Learn_2_1.class



使用Intellij IDEA 14 ,開發scala (未使用sbt),IDE會將scala轉成 .class檔,會放置out資料夾中,此時就可使用  javap -private {class name} 來查看scala 如何將 scala轉成 java程式碼。



另外在反編譯上有個好用的JAD(Java Decompiler)  一個小咖啡杯,只要將要反編譯的拖拉過去就可以看到結果啦。


JAD:
  • wiki  :   http://en.wikipedia.org/wiki/JAD_(JAva_Decompiler)
  • tools  :   http://jd.benow.ca/
  • tools  :   http://www.brouhaha.com/~eric/software/mocha/


2014年9月13日 星期六

Intellij scala

1. down load intellij 

2. install scala plugin

  • open intellj
  • select   ->   Configure  ->  Plugins
  • search scala
  • install plugin


3. install sbt plugin

  • Configure -> Plugins
  • search sbt
  • install plugin
5. create scala project
  • Create New Project
  • Scala -> SBT
  • Enter Project Name

Note :  if  your sbt  console  has  error  message
           
      Error  :  Cannot determine Java VM executable in selected JDK

      Resolve :
  • Configure -> Project defaults -> Project structure and add the jdk.
  • Configure -> Preferences -> IDE Settings -> Scala  andd the jdk.
  • File -> Project structure  add the jdk.

             JDK  Patch :
              /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home




reference document :