Skip to content
Edward Lee edited this page Nov 5, 2018 · 30 revisions

Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that compiled Java code (bytecode) can run on all platforms that support Java without the need for recompilation. (特点:并发、基于类、面向对象;目标:一次编写,随处运行;跨平台实现:字节码技术)

『参考资料』

  1. Java (programming language) - Wikipedia (相关资料入口)
  2. Java SE at a Glance (Overview) (Java SE概述:新功能) Java SE Downloads (下载JDK、Demos and Samples、Documentation)
  3. Java SE Documentation (下载JDK文档:87,包括Java SE技术文档、自述文件(README Files)、发行说明(Release Notes))
  4. Java SE Community at a Glance (社区概述)
  5. Java SE Technologies (Java SE技术(平台概述))
  6. Java Language and Virtual Machine Specifications (Java语言和虚拟机规范)
  7. OpenJDK - Wikipedia (相关资料入口)
  8. OpenJDK

『必读文章』 - 实践出真知!

  1. Java Developers (Java Resources for Developers)
  • Software Downloads - 下载 (Top Downloads, New Downloads)
  • Essential Links - 关键链接 (Java APIs, Technical Articles, New to Java, "The Java Source" Blog, Java Developer Newsletter, Java Magazine, Demos and Videos, java.net, Java User Groups, Java Community Process, Adopt A JSR)
  • Developer Spotlight - 开发人员聚焦
  • Blogs - 博客
  • Technologies - 技术 (Java SE - Overview (Java SE at a Glance - Java SE 一览))
  1. Java SE - Overview (Java SE at a Glance - Java SE 一览)
  • What's New - 新特性 (Java SE 8 is Now Available - 提供增强的开发人员生产力、通过减少的样板代码来显著地提高应用的性能、改进的集合和注解、简单的并行编程模型、更有效地使用现代多核处理器, Security of the Java Platform (Secure Coding Guidelines for Java SE), Java Mission Control, Archive of Technical Articles - 技术文章存档)
  • Updates
  • Training & Certification
  • Community - 社区 (Java 8 Event Kit, Adopt a JSR Program, Java.net - The Source for Java Technology Collaboration)
  1. Home:Java Platform, Standard Edition (Java SE) 8 Release 8 - (Java SE 8 Documentation), Java SE 7 Documentation
  • About Java SE 8 - What's New (Features and Enhancements) 新功能和增强功能介绍, Compatibility Guide 兼容性指南, Known Issues 已知问题列表
  • Download and Install - Download and Installation Instructions 下载和安装说明
  • Write Your First Application - Get Started with Java Java入门
  • Learn the Language - Java Tutorials Learning Paths Java教程学习路径
  • Monitor and Troubleshoot - Java Mission Control Java任务控制台, Java Flight Recorder Java飞行记录仪, Troubleshooting Guide 故障排除指南, HotSpot Virtual Machine Garbage Collection Tuning Guide HotSpot虚拟机垃圾收集调优指南
  • Deploy - Deployment Guide 部署指南
  • Reference - Java SE API Documentation - JDK API文档, Developer Guides 开发人员指南, Java Language and Virtual Machine Specifications Java语言和虚拟机规范, Java SE Tools Reference for UNIX JDK工具列表参考
  • Release Notes - Java SE Release Notes JDK发布说明
  • 外部链接 - Java SE on OTN, Java SE Downloads, Java Training, Java Forums, Java Source blog, Java Tutorials blog
  1. Java SE - Downloads
  • Installation Instructions - 安装说明 (Java SE Installation Guide for OpenJDK 8), JDK 7 and JRE 7 Installation Guide)
  • JDK Installation for Linux, Mac, Windows
  • JDK ReadMe - JDK自述(快速入门指南) (8, 7)
  • JDK File Structure
  1. The Java™ Tutorials - Java教程(Java语言导学)
  2. New to Java - Overview (New to Java Programming Center) - 新手学Java
  3. Java API Specifications
  4. Java问题排查的Case - HelloJava - bluedavy,毕玄(阿里同学遇到的问题)

『读书笔记(Books)』

『问题排查工具箱(Toolkit)』 - 工欲善其事,必先利其器!

Java程序员常用工具集 - 庄周梦蝶

监视JVM

  • jps(查看Java进程信息(PID))
jps -l
jps -mlv | grep {app_name}
  • jstat
  • jmc (Java任务控件是一种分析、监视和诊断工具套件)

监视Java应用程序

  • jconsole (启动一个图形化控制台,允许您监控和管理Java应用程序)
  • jvisualvm (可视化地监视、诊断和分析Java应用程序)

故障排除

top - 系统负载(load average)\任务进程(Tasks)\CPU指标(%Cpu)\内存(Mem)/交换分区(Swap)
$ top -d 3 -u appweb -o %CPU
$ top -d 3 -u appweb -o RES
$ top -d 3 -u appweb -o TIME+
$ jps -lmv
$ top -d 3 -o %CPU -p 397

top - 23:41:48 up 395 days,  6:26,  1 user,  load average: 0.46, 0.42, 0.41
Tasks: 1659 total,   1 running, 1656 sleeping,   0 stopped,   2 zombie
%Cpu(s):  1.0 us,  1.5 sy,  0.0 ni, 97.5 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:  65928188 total, 34067928 used, 31860260 free,   456540 buffers
KiB Swap:  7999484 total,    41492 used,  7957992 free.  1747168 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
31600 appweb    20   0 30.420g 1.441g  13828 S   0.0  2.3  65:38.01 java
31067 appweb    20   0 1392520  88340  54480 S   6.0  0.1  52:33.10 chrome
内存堆
线程栈

『Java线上问题排查Cases』