Quantcast
Channel: Vimタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 5608

Javaでこんにちは世界( VimとQuickrunで手早く文法を学ぶっ)

$
0
0

Screen Shot 2018-10-03 at 2.29.39.png

Summary

javaファイルをVimQuickrun

ファイル構成

$ tree
.
└── MyProj               // project folder ( working folder )
    ├── main
    │   └── main.java    // entry file
    └── myclass
        └── hello.java   // your own classes


3 directories, 2 files

Quickrun

\'java':{\'exec':['javac -cp %s:p:h:h:h */*.java','java -cp %s:p:h:h:h:%s:p:h %s:t:r %a'],\'hook/output_encode/encoding':'&termencoding',\'hook/sweep/files':'%S:p:r.class',\},

Java's code

entry class

// main.javaimportMyProj.myclass.*;publicclassmain{publicstaticvoidmain(String[]argv){helloh=newhello("world!");h.Hello();}}

your own classes

// hello.javapackageMyProj.myclass;publicclasshello{privateStringstr_="hello ";publichello(Strings){this.str_=this.str_+s;}publicvoidHello(){System.out.println(this.str_);}}

Reference

自作したクラスをimportしたい
quickrun help


Viewing all articles
Browse latest Browse all 5608

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>