Eclipse相关问题总结

这篇博客是用来记录自己在使用Eclipse的过程中遇到的一些问题,以及解决方法,做一个总结,算是笔记吧。

1.问题描述:

对Eclipse中使用4个空格来替换一个Tab键的设置方法.

解决方法:

第一步:

点击 window->preference,依次选择 General->Editors->Text Editors,选中右侧的 insert space for tabs。保存

第二步:

1. Window --> Java --> Code Style --> Formatter --> 选择右侧的Edit --> 

2. 输入自定义的Profile name

3. 在下方的Tab policy的右侧的下拉列表中选择Spaces only

4. 输入Indentation size和Tab size的大小均为4

5. 点击OK

6. 重启Eclipse


2.问题描述:

JNI开发时,Unresolved inclusion

我在.c和.h文件中使用#include <jni.h>时,出现了Unresolved inclusion: <jni.h>的报错信息。
解决方案:
原因是在eclipse编辑环境中没有找到对应的include中的文件。解决方法是将包含该文件的include目录作为新的linked folder加入工程中。具体方法如下:
1. 右击工程->New->Folder
2. 对话框中点击Advanced
3. 选择Link to alternate location (Linked Folder),选择需要的include目录

4. Finish后刷新工程,问题解决。


3.问题描述:

设置默认编码方式

解决方案:

 


原文地址:https://www.cnblogs.com/fengju/p/6336108.html