Javaメモ - NetBeansのプロジェクトをEclipseへ移す方法
in

参考になるJavaのコードやらオープンソースのプロジェクトを見つけて使いたいときがあるけど、プロジェクトがNetBeansだったりする。それをEclipseで使うにはこんな風にすればいい。

NetBeansのプロジェクトを編集

最初にNetBeansのプロジェクトをEclipseに合うように変更しておく。nbproject\project.propertiesをエディタで開いて次の2行を変更する。

変更前:
build.classes.dir=${build.dir}/classes
build.dir=build

変更後
build.classes.dir=${build.dir}
build.dir=bin

Zipファイルを作成

このステップの前にNetBeansのプロジェクトでCleanを実行しておくといいかも。手動の場合はdistとかbuildフォルダを削除。その後、プロジェクトフォルダ以下にあるnbprojectやらsrcやらビルドに必要なすべてのファイルとフォルダをZipファイルにする。

Eclipseプロジェクトを作成

空のJavaプロジェクトを作成して、「Create separate source and output folders」を選択しておく。空のプロジェクトが作成できたら上で作ったZipファイルをインポートする。

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <code> <cite> <ul> <ol> <li> <dl> <dt> <dd> <p>
  • Lines and paragraphs break automatically.
  • Link to Amazon products with: [amazon product_id inline|full|thumbnail]. Example: [amazon 1590597559 thumbnail]
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Images can be added to this post.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.