zoukankan      html  css  js  c++  java
  • IDEA与Eclipse

    IDEA

    1 快捷键

    快速查找某个类 double shift
    显示类结构图 ctrl+H
    代码上移或下移 ctrl+shift+up/down
    查找文件 ctrl+shift+N
    删除当前行 ctrl+x
    生成get、set方法 alt+Ins
    实现接口 ctrl+I
    快速引入类 alt+enter
    快速创建类 ctrl+alt+insert
    格式化代码 ctrl+alt+L
    替换 ctrl+R
    显示项目列表 alt+1
    显示某个类下的方法列表 alt+7
    快速定位到某行 ctrl+G

    2 出现的问题

    0x01 找不到资源文件

    右键选中资源文件——Mark Directory As SourceRoot

    0x02 Junit中LogFactory类没有找到

    报错
    java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
    

    选中项目——F4——Libraries——找到出现问题的包

    commons-logging:xxxxxdoes-not-exist
    

    3 一些操作

    文件重命名:选中文件——选中——Refactor——Rename

    Eclipse

    1 出现的问题

    0x01 Perhaps you are running on a JRE rather than a JDK?

    window -->Prefrences -->Java-->Installed JREs
    换成jdk

    2、配置tomcat报错

    The Apache Tomcat installation at this directory is version 8.5.0. A Tomcat 8.0 installation is expected.

    换一个版本

    3、ContextLoaderListener

    java.lang.ClassNotFoundException: ContextLoaderListener

    http://chenzhou123520.iteye.com/blog/1836987

    4、Maven项目转成web项目

    http://blog.csdn.net/chuyuqing/article/details/28879477

  • 相关阅读:
    1004 Counting Leaves
    1003 Emergency (25分)
    1002 A+B for Polynomials (25分)
    1001 A+B Format
    Weekly Contest 139
    491. Increasing Subsequences
    488. Zuma Game
    servlet总结
    firefox插件Firebug的使用教程
    KMP---POJ 3461 Oulipo
  • 原文地址:https://www.cnblogs.com/fonxian/p/6109451.html
Copyright © 2011-2022 走看看