If you need to compile a Java program with the Command Prompt, but it pops up the following error message: ‘javac’ is not recognized as an internal or external command, operable program or batch file. Read more…

seen from T1
seen from China
seen from United States
seen from China

seen from Germany
seen from United Kingdom
seen from Singapore
seen from China
seen from China
seen from Germany

seen from United States

seen from Malaysia
seen from China
seen from South Korea
seen from United States
seen from China
seen from Poland

seen from Spain

seen from United States

seen from Ireland
If you need to compile a Java program with the Command Prompt, but it pops up the following error message: ‘javac’ is not recognized as an internal or external command, operable program or batch file. Read more…
REPL で使える :javap コマンドのオプションはコマンドラインの javap(1) のオプションとは一味違う
Scala 2.11 から REPL で :javap コマンドが使えるようになりました(参考: https://github.com/scala/scala/pull/1880 REPL で使う :javap コマンドでも、シェルコマンドラインから使う javap(1) と同じオプションが使える、かと思いきや若干の違いがあるようです。ヘルプで確認してみましょう。
scala> :javap -help usage :javap [opts] [path or class or -]... -help Prints this help message -raw Don't unmangle REPL names -app Show the DelayedInit body of Apps -fun Show anonfuns for class or Class#method -verbose/-v Stack size, number of locals, method args -private/-p Private classes and members -package Package-private classes and members -protected Protected classes and members -public Public classes and members -l Line and local variable tables -c Disassembled code -s Internal type signatures -sysinfo System info of class -constants Static final constants
シェルコマンドラインの javap のヘルプはというと、
~ % javap -help Usage: javap <options> <classes> where possible options include: -help --help -? Print this usage message -version Version information -v -verbose Print additional information -l Print line number and local variable tables -public Show only public classes and members -protected Show protected/public classes and members -package Show package/protected/public classes and members (default) -p -private Show all classes and members -c Disassemble the code -s Print internal type signatures -sysinfo Show system info (path, size, date, MD5 hash) of class being processed -constants Show final constants -classpath <path> Specify where to find user class files -cp <path> Specify where to find user class files -bootclasspath <path> Override location of bootstrap class files
比べてみると、
コマンドラインの javap(1) で :javap で使えないもの
クラスパスまわりのオプション
javap(1) にはなくて :javap にはあるもの
raw, app, fun オプション
となっています。
早速 :javap を試してみましょう。
scala> class Foo(var bar: Int) defined class Foo scala> :javap -p Foo Compiled from "<console>" public class Foo { private int bar; public int bar(); public void bar_$eq(int); public Foo(int); }
これは便利そうです。