设置idea
来源:互联网 发布:电子数据交换的意思 编辑:程序博客网 时间:2024/06/03 21:11
异常栈
javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused: connect](最后执行的)
该行会明确指出所抛出的异常。
at com.sun.jndi.ldap.Connection.<init>(Connection.java:226)
at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:136)
at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1608)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2698)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:316)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:71)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
at javax.naming.InitialContext.init(InitialContext.java:242)
at javax.naming.InitialContext.<init>(InitialContext.java:216) (最先执行的)
idea激活
idea的激活(激活地址要换着用,否则可能会出现不能激活的问题)
http://idea.iteblog.com/key.phphttp://idea.imsxm.com/
要想找到目标代码,就得有一个起点,一般地,登录页面就是“起点”。
debug详解
在debug透视图中,有一个Debugger,它显示了方法的后进先出的调用栈(栈顶指针在该透视图的上面,而不是下面)。
1.mute breakpoints: 让所有的断点都变成哑巴
2.step over : step over a line of code
3.step into : Step into a method called from this line of code.
4.step out : Step out of a method back to the calling code.
5.resume program: Resume debugging and stop at the next breakpoint.
IntelliJ IDEA will step into most code with two exceptions(2个除外): stepping skipping and 《classes compiled without the debug flag》
Code can be configured to be skipped in stepping
example, any com.sun.* classes is skipped by default.
This is defined in .
但是, Force Step Into option 可以step into "skipped code"。
注意:尽量不要使用反汇编代码debug
If we don't have the source to specific code, IntelliJ IDEA will still decompile the class and show our steps in the decompiled source.
This is very helpful, but note that the generated decompiled class may look different from the original,
and if the lines do not match, debugging in decompiled code may be confusing.
Always try to obtain the source code of the classes you want to step into.
idea中的重要快捷键
Ctrl+Alt+鼠标左键 查看方法的实现
在搜索栏中输入“case”,可以查看大小写转换开关键。
与编辑历史有关的:
alt + shift + 向左箭头 | 向右箭头
也可以直接使用鼠标的button4 | button5
如果发现Java文件的图标不正确(比如说,Java文件的图标要么是c,要么是i),就说明你的工程结构有问题
注意:在idea中,module应该翻译成“模块”
facets和artifact的区别:
facets表示这个module有什么特征,
artifact表示项目的成品。其中有打成War的,也有使用 explod的。
注意:使用tomcat部署项目时,artifact表示使用项目的成品进行部署,
external source表示使用外部非本项目的成品来部署项目。
工程结构
工程结构在idea中的作用非常重要,它包括:
1.工程SDK: 安装在电脑上的jdk路径
2.工程语言水平:一般使用6,因为服务器可能不支持高版本。
3.工程编译输出路径:【这个最重要】,工程跟路径/target/classes
修改完工程编译输出路径后,一定要重新部署一下tomcat,否则tomcat的输出路径也会是错的。
什么是重新部署?见下图(先点击红色的减号,再点击绿色的加好把工程加进来)
注意:在Fedora中运行idea时,不要使用root用户,而要使用你登录电脑时用的那个用户,否则会报错。
首次使用idea,要这样设置:
file→setting→搜索appearance设置主题为Darcula,字体为Microsoft YaHei UI 。搜索encoding,将各种编码都设置成utf-8。搜索font,将字体改为Consolas
注意:如果将appearance中的字体设置成consoles,可能会出现乱码问题。
非范畴注意:在url和linux中都是用"/"表示路径,只在window文件系统中用"\"表示文件路径
- idea设置
- Idea设置
- 设置idea
- Intellij IDEA 内存设置
- Intellij IDEA 9设置
- IntelliJ IDEA常用设置
- IntelliJ IDEA常用设置
- IntelliJ IDEA常用设置
- IntelliJ IDEA常用设置
- IntelliJ IDEA常用设置
- intellij idea 常用设置
- Intellij idea几个设置
- IntelliJ IDEA基本设置
- IntelliJ IDEA 字体设置
- IntelliJ IDEA常用设置
- idea 快捷键设置
- IntelliJ IDEA初始化设置
- idea 13的设置
- JavaWeb---Servlet的请求和响应
- Android 属性动画和添加图片
- 洛谷P1512 伊甸园日历游戏
- bzoj4027: [HEOI2015]兔子与樱花
- 作为一个运维工程师中的一员,现在开始我的博客之路.
- 设置idea
- 【读书总结】《三体》—— 生存是文明的第一需要
- drawerlayout+tablelayout+fragment+轮播
- 2017年Android最流行框架大全
- Object类的基本方法!!!
- 手机页面下拉刷新效果
- 一个程序的执行过程
- python3.6.3+opencv3.3.0学习笔记九--动态物体检测
- C/C++ typedef用法详解(干货)