IDEA Community Edition is so delicious!

IDEA (IntelliJ IDEA) is the first choice of many Java developers.

Commercial version is expensive

The commercial version of IDEA (IntelliJ IDEA Ultimate) is very powerful and can meet all the needs of Java development, but its high price...

image-20230926165220789

At this time, I can only sigh, it’s not that I don’t want to use the genuine version, but that I can’t afford the genuine version!

Disadvantages of cracked version

In addition to buying the genuine version, you can only choose the cracked version.

There are a lot of cracking tutorials on the Internet, and each version will be followed up. As long as you work hard, you can always crack it.

I believe this is the choice of most developers. I have done this for a long time, but it has the following disadvantages:

  • Bugs occur frequently.

    Since it is a cracked version, there will always be some inexplicable bugs.

  • The version cannot be upgraded.

    If the upgraded version needs to be cracked again, it will be more troublesome, and the possibility of success is unknown.

  • It cannot be used stably.

    Since it is a cracked version, it may be blocked by the official at any time, so it cannot be used and we can only find other cracking methods.

Therefore, although the cracked version can be used for free, the price is not low. Especially in work scenarios, the instability of tools will affect work efficiency and even the mood at work.

The community version smells really good

After experiencing all the disadvantages of the cracked version, I decided to try the community version.

Before, I was used to the commercial version and had never paid attention to the community version. After trying it this time, I can only sigh, it smells so good !

advantage

The Community Edition has two obvious advantages:

  • free.

    Compared to the high price of the commercial version, the free nature of the community version is undoubtedly the biggest advantage.

  • Genuine.

    Since the community version is free, you can use the genuine version directly, eliminating the trouble of cracking and avoiding all the shortcomings of cracking.

shortcoming

Of course, the community version also has disadvantages:

  • Fewer features.

    The community version only provides the most basic Java development-related functions. Web development , database management , and special features in the commercial version are not available.

    Personally, I don't think this is a problem, because Web development and database management can be achieved with professional and free tools, and those special functions are not necessary in Java development.

  • Performance is weak.

    The maintenance of the community version is not as frequent as the commercial version, so the performance and response speed are definitely not comparable to the commercial version.

    After a period of use, this reduction in performance and response speed is completely acceptable, and weaker performance also means that it takes up less memory. For IDEA, a "memory giant", it can even be classified as an advantage.

use

After understanding the advantages and disadvantages of the Community Edition, it’s time to introduce the use of the Community Edition.

First of all, let me state that there is no difference between the usage logic of the community version and the commercial version .

Therefore, for developers who are familiar with the commercial version, there is no learning cost for the community version.

Function

Here we only introduce the functions that cannot be used directly in the community version compared to the commercial version.

The community version has the same functions as the commercial version, so I won’t go into details.

Lombok

Different from the commercial version, the community version does not have the Lombok plug-in installed by default, so you cannot use Lombok functions directly. You need to install the plug-in first:

image-20230926174050291

After installing the plug-in, the functions of Lombok are the same as those of the commercial version, so I will not introduce them in detail here.

Docker

Different from the commercial version, the community version does not have the Docker plug-in installed by default, so you cannot use Docker functions directly. You need to install the plug-in first:

image-20230926174321267

If you need to use Docker functions such as Dockerfile in your project, you can install this plug-in to implement it.

Tomcat

For non-Spring Boot projects, the running of the project needs to rely on the server. The commonly used server Tomcat Community Edition does not have its own functions. You need to install the plug-in first:

image-20230927094745680

Then perform the following steps to configure Tomcat:

  1. Configure services.

    image-20230927095215171

  2. Add Tomcat.

    image-20230927095417045

  3. Configure Tomcat.

    image-20230927112917738

In this way, you can use Tomcat to start the service.

Make a war bag

IDEA Community Edition cannot build war packages through artifacts like the commercial edition.

If you need to package a war package, you can use Ant for packaging. The specific steps are as follows:

  1. Create build.xml.

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!-- WARNING: Eclipse auto-generated file.
                  Any modifications will be overwritten.
                  To include a user specific buildfile here, simply create one in the same
                  directory with the processing instruction <?eclipse.ant.import?>
                  as the first entry and export the buildfile again. -->
    <project basedir="." default="packWar" name="TARGET">
        <property environment="env"/>
        <property name="debuglevel" value="source,lines,vars"/>
        <property name="target" value="1.8"/>
        <property name="source" value="1.8"/>
    	
    	<!--自定义部分-->
    	
        <property name="build" value="${basedir}/build"/>
        <property name="build.class" value="${basedir}/build/classes"/>
        <property name="src" value="${basedir}/src"/>
        <property name="web" value="${basedir}/WebContent"/>
        <property name="project_jar_path" value="${web}/WEB-INF/lib"/>
    	<property name="jre_jar_path" value="D:\Environment\jdk\jdk1.8.0_202\jre\lib"/>  
    	<property name="jre_jar_ext_path" value="D:\Environment\jdk\jdk1.8.0_202\jre\lib\ext"/>  
    	<property name="tomcat_jar_path" value="D:\Environment\apache-tomcat-8.5.79\lib"/>  
        <path id="project_jar">
    		<fileset dir="${project_jar_path}">
                <include name="*.jar"/>
            </fileset>
        </path>
        <path id="jre_jar">
    		<fileset dir="${jre_jar_path}">
                <include name="*.jar"/>
            </fileset>
    	</path>
    	<path id="jre_ext_jar">
    		<fileset dir="${jre_jar_ext_path}">
                <include name="*.jar"/>
            </fileset>
    	</path>
        <path id="tomcat_jar">
    		<fileset dir="${tomcat_jar_path}">
                <include name="*.jar"/>
            </fileset>
        </path>
        <path id="TARGET.classpath">
            <pathelement location="build/classes"/>
            <path refid="project_jar"/>
            <path refid="jre_jar"/>
            <path refid="jre_ext_jar"/>
    		<path refid="tomcat_jar"/>
        </path>
    	<target name="clean">
    		<echo message="--------------------开始清理旧的编译文件---------------------------"/>
            <delete dir="build/classes"/>
    		<delete file="${basedir}/build/${ant.project.name}.war"/>
        </target>
        <target name="init">
    		<echo message="---------------------开始拷贝资源文件-----------------------------"/>
            <mkdir dir="build/classes"/>
            <copy includeemptydirs="false" todir="build/classes">
                <fileset dir="src">
                    <exclude name="**/*.java"/>
                </fileset>
            </copy>
            <copy includeemptydirs="false" todir="build/classes">
                <fileset dir="resources">
                    <exclude name="**/*.java"/>
                </fileset>
            </copy>
    		<copy includeemptydirs="false" todir="${project_jar_path}">
                <fileset dir="${tomcat_jar_path}">
                    <include name="*.jar"/>
                </fileset>
            </copy>
        </target>
        <target name="build">
    		<echo message="-----------------------开始编译JAVA文件-----------------------------"/>
            <echo message="${ant.project.name}: ${ant.file}"/>
            <javac debug="true" debuglevel="${debuglevel}" destdir="build/classes" includeantruntime="false" source="${source}" target="${target}">
                <src path="src"/>
                <src path="resources"/>
                <classpath refid="TARGET.classpath"/>
            </javac>
        </target>
    	<target name="packWar">
            <echo message="-----------------------开始构建war包-----------------------------"/>
            <war destfile="${basedir}/build/${ant.project.name}.war" webxml="${web}/WEB-INF/web.xml">
                <fileset dir="${web}"/>
                <classes dir="${build.class}"/>
            </war>
        </target>
    </project>
    
    
  2. After creation build.xml, the Ant control window will appear.

    image-20230928174348640

  3. Select packWar, right-click and select Properties .

    image-20230928174422943

  4. Select Execute and Ant 命令行enter the if command in :

    clean init build packWar
    

    Click OK to save the configuration.

  5. When you need to package the war package, double-click packWarto package.

    According to build.xmlthe configuration:

    • The generated war package will be placed buildin the directory.
    • The compiled files will be placed build/classessin the directory.

    If adjustments are needed, build.xmlthe configuration in can be modified.

In this way, the IDEA Community Edition can already meet the needs of daily Java development work. Using genuine IDEA for free, I can only say one thing, it smells great !

Guess you like

Origin blog.csdn.net/qq_37770674/article/details/133387758