ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

【Java基础】01 Java概述

2021-07-10 16:32:36  阅读:215  来源: 互联网

标签:project 01 Java Maven 概述 java 4.1 projects


目录


  • 介绍java和常用的工具包

1. java概述


1.1. 特性

1.1.1. try catch finally 机制

参考:

  1. java(3)-深入理解java异常处理机制

1.2. 概念

  1. UDF
    UDF(User Defined Function)即用户自定义函数。

2. JVM


2.1. JVM概述


2.2. OOM

  • 什么是OOM

    1. OOM,全称“Out Of Memory”,翻译成中文就是“内存用完了”,来源于java.lang.OutOfMemoryError
    2. 官方说明: Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
      意思就是说,当JVM因为没有足够的内存来为对象分配空间并且垃圾回收器也已经没有空间可回收时,就会抛出这个error(注:非exception,因为这个问题已经严重到不足以被应用处理)
  • 为什么会OOM

参考:

  1. 什么是OOM,为什么会OOM及一些解决方法

2.3.


3. Maven


3.1. 概述

3.1.1. Maven概念及特性

  1. Maven 概念

    1. Apache Maven is a software project management and comprehension tool. 
    2. Based on the concept of a project object model (POM), Maven can manage a project's build, 
        reporting and documentation from a central piece of information.
    
  2. 特性

    Feature Summary
    The following are the key features of Maven in a nutshell:
        Simple project setup that follows best practices - get a new project or module started in seconds
        Consistent usage across all projects - means no ramp up time for new developers coming onto a project
        Superior dependency management including automatic updating, dependency closures (also known as transitive dependencies)
        Able to easily work with multiple projects at the same time
        A large and growing repository of libraries and metadata to use out of the box, and arrangements in place with the largest Open Source projects for real-time availability of their latest releases
        Extensible, with the ability to easily write plugins in Java or scripting languages
        Instant access to new features with little or no extra configuration
        Ant tasks for dependency management and deployment outside of Maven
        Model based builds: Maven is able to build any number of projects into predefined output types such as a JAR, WAR, or distribution based on metadata about the project, without the need to do any scripting in most cases.
        Coherent site of project information: Using the same metadata as for the build process, Maven is able to generate a web site or PDF including any documentation you care to add, and adds to that standard reports about the state of development of the project. Examples of this information can be seen at the bottom of the left-hand navigation of this site under the "Project Information" and "Project Reports" submenus.
        Release management and distribution publication: Without much additional configuration, Maven will integrate with your source control system (such as Subversion or Git) and manage the release of a project based on a certain tag. It can also publish this to a distribution location for use by other projects. Maven is able to publish individual outputs such as a JAR, an archive including other dependencies and documentation, or as a source distribution.
        Dependency management: Maven encourages the use of a central repository of JARs and other dependencies. Maven comes with a mechanism that your project's clients can use to download any JARs required for building your project from a central JAR repository much like Perl's CPAN. This allows users of Maven to reuse JARs across projects and encourages communication between projects to ensure that backward compatibility issues are dealt with.
    

参考:

  1. Apache Maven
  2. Maven的作用

4. Antlr4

4.1. 概述

4.1.1. 概念

  1. 概念
    ANTLR 是用JAVA写的语言识别工具,它用来声明语言的语法,简称为“元语言”(meta-language)。

  2. 语法解析过程
    ANTLR 语法识别一般分为二个阶段:

    1. 词法分析阶段 (lexical analysis)
      对应的分析程序叫做 lexer ,负责将符号(token)分组成符号类(token class or token type)
    2. 解析阶段
      根据词法,构建出一棵分析树(parse tree)或叫语法树(syntax tree)

4.1.2. 补充

  1. 谁在使用 Antlr4
    Hive
    Spark
    Oracle
    Presto
    Elasticsearch

  2. 常见的语法分析器
    Antlr
    Javacc
    SqlParser (位于Alibaba的Druid库中)
    其中Antlr和Javacc都是现代的语法解析器,两者都很优秀,其中Antlr要更胜一筹。而SqlParser只能解析sql语句,功能比较单一。


标签:project,01,Java,Maven,概述,java,4.1,projects
来源: https://blog.csdn.net/baidu_34170531/article/details/118636738

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有