Tag:java

  • Java implementation of mall order timeout cancellation function

    Time:2021-7-28

    Most B2C mall projects have time limited activities. When users place an order, there will be a payment timeout. When the order times out, the status of the order will automatically become cancelled. There are many ways to realize this function. The implementation method in this paper is suitable for most small malls. Implementation principle: […]

  • Java eclipse startup parameters

    Time:2021-7-27

    After referring to some materials, I have summarized some commonly used command arguments at startup. If there are any errors, I hope you can point out them.-arch [processor architecture] Description: Specifies the type of processor to useExample: Eclipse – arch x86 or eclipse – arch SPARC-application [id] Description: specify the application to run. The ID […]

  • Usage and feature analysis of Java synchronized keyword

    Time:2021-7-25

    This article mainly introduces the usage and feature analysis of Java synchronized keywords. It is introduced in great detail through the example code, which has a certain reference value for everyone’s study or work. Friends in need can refer to it The synchronized keyword is a way to implement locks. It is an unfair lock […]

  • Shell script monitors the code of java process

    Time:2021-7-24

    Script content: Java_ check.sh #! /bin/bash # if [ -z `pidof java` ]; then echo -e `date +%Y-%m-%d` `date +%R`. “33[31m33[1m(JAVA)Process does not exist! 33[0m” >> /data/logs/java_check.log /usr/local/tomcat/bin/startup.sh >/dev/null 2>&1 sleep 30 netstat -tnlp >> /data/logs/java_check.log echo -e “r” >> /data/logs/java_check.log fi Plan the task and execute it every 15 minutes Copy codeThe code is […]

  • Analysis of data modification process based on final in Java

    Time:2021-7-23

    This article mainly introduces the Java based on the final modification of data process analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to Final is an important keyword in Java. It can modify data, methods and classes. This […]

  • Creating and deleting cookies in Java

    Time:2021-7-22

    //Write cookie operationCookie cooki; cooki=new Cookie(“bbs_ 0001”,String.valueOf(num));// User IDcooki.setMaxAge(60*60*24*365);// Cookie timecooki.setPath(“/”); // According to the needs of the individual, it can be created in the path of different functionsresponse.addCookie(cooki); //Empty cookie operationCookie[] cookies=request.getCookies(); try { for(int i=0;i<cookies.length;i++) { Cookie cookie = new Cookie(“bbs_0001”,null); cookie.setMaxAge(0); //cookie.setPath(“/”);// Fill in according to the path where you created the […]

  • Analysis of dynamic binding principle in Java polymorphism

    Time:2021-7-21

    This article mainly introduces the dynamic binding principle of Java polymorphism analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to Polymorphism is a very important feature of object-oriented programming, which makes the program more readable and extensible. It […]

  • Principle analysis of deserialization attack caused by Java JDBC

    Time:2021-7-19

    This article mainly introduces the principle of Java JDBC caused by the deserialization attack analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to background Last week, the topic “new explosion technology in Java deserialization attack” of blackhat Europe […]

  • Analysis of thread communication principle of Java wait wake mechanism

    Time:2021-7-18

    This article mainly introduces the Java wait wake mechanism thread communication principle analysis, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to Inter thread communication Concept: multiple threads are processing the same resource, but the processing actions (thread tasks) […]

  • Java generated picture captcha function

    Time:2021-7-16

    Recently, when using SSM framework to build a management system to do login verification, the following code is used to generate image verification code, and the final effect is shown in the figure below. Java class public class RandomValidateCode { public static final String RANDOMCODEKEY = “randomcode_ key”;// Key in session private Random random = […]

  • Principle and common methods of Java StringBuilder class

    Time:2021-7-15

    This article mainly introduces the principle and common methods of Java StringBuilder class. The example code is introduced in great detail, which has a certain reference learning value for everyone’s study or work. If you need a friend, you can refer to it The origin of StringBuilder class Because the object content of string class […]

  • Building java web development environment and Application

    Time:2021-7-14

    One uses Tomcat server and DBCP data source to build web development environment1. JDK installation, the default path is OK2. Tomcat5.5 server1) Configure the server port of Tomcat:Open D: apache-tomcat-5.0.18, conf.server.xml to see the following code:<!– Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 –> <Connector port=”8080″ maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″ enableLookups=”false” redirectPort=”8443″ acceptCount=”100″ debug=”0″ […]