0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

小技メモ

0
Last updated at Posted at 2018-05-24

便利だと思ったものをメモ。

Windows

dos

forfiles

使い方は、ヘルプ参照
ファイル一覧等を作ったり、ファイルの属性(タイムスタンプ、サイズ等)を確認するのに便利

start path

pathに指定した階層で、エクスプローラが起動する。

環境変数追加

set PATH=C:\MyWork\java\8\bin;%PATH%

Javacでエンコーディングを指定したい

コンパイル環境によって、デフォルトのエンコーディングがあり、コンパイル時に指定しないとデフォルトのエンコーディングでコンパイルが実行される。
そのデフォルトのエンコーディングと、ソースファイルのエンコーディングが一致しないと
うまくいけば、コンパイル時にエラーになって気づけるが、そのままエラーがなくコンパイルできる場合がある。(実行時に発覚する)

自分の環境のデフォルトのエンコーディングを確認する

以下は、Windows10で実行している

import java.util.Properties;
import java.util.Enumeration;

class sampleEncoding{
  public static void main(String[] args){
    System.out.println(System.getProperty("file.encoding"));
  }
}
---結果
MS932

自分でエンコーディングを指定する

javac -encoding utf8 xxx.java

Eclipse

ファイル検索

ctrl + Shift + R

タブ切り替え

ctrl + E

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?