current location:Home > Technical Articles > Java > JavaBase

  • java is not recognized as an internal or external command solution
    java is not recognized as an internal or external command solution
    When the javac command prompt "not an internal or external command" is entered in cmd, it may be because the java environment variable is configured incorrectly. The solution is to use the set java_home, set classpath, and set path commands in cmd to configure the correct environment variables.
    JavaBase 10093 2019-12-16 11:09:33
  • Several ways to deal with garbled characters in java
    Several ways to deal with garbled characters in java
    Java's method of dealing with garbled characters: 1. When receiving parameters, decode according to ISO-8859-1 to obtain a binary stream, and then encode it with UTF-8. 2. Modify the server (tomcat) configuration and add UTF-8. 3. Set the request encoding when requesting in post mode.
    JavaBase 3151 2019-12-16 10:44:47
  • Solution to garbled code displayed in java
    Solution to garbled code displayed in java
    Solution to Java displaying garbled codes: The browser calls jsp, html and other pages to display garbled Chinese characters. Solution: Save the file in UTF-8 format, and then set it to use UTF-8 for parsing in the browser.
    JavaBase 2991 2019-12-16 10:08:14
  • How to determine whether a string contains a certain character in java
    How to determine whether a string contains a certain character in java
    How to determine whether a string contains a certain character in Java: 1. Use the contains method to determine whether the string contains a certain character. If the string contains a character, it returns true, otherwise it returns false. 2. Use the indexOf method to determine. This method returns the position of the specified character in the string.
    JavaBase 7421 2019-12-14 16:17:25
  • Introduction to the method of determining whether the specified file exists in java
    Introduction to the method of determining whether the specified file exists in java
    How to determine whether a file exists in java: first use the exists() method to determine whether the file or directory represented by the specified path name exists, and then use the isDirectory() method to determine whether the test object is a folder.
    JavaBase 3485 2019-12-14 16:08:54
  • How to add an error page in java
    How to add an error page in java
    How to add an error page in java: first enable the error prompt in web.xml and connect to the error prompt page error.jsp. Then customize the error message page content.
    JavaBase 1763 2019-12-14 15:37:43
  • Solution to Java reading Chinese garbled characters
    Solution to Java reading Chinese garbled characters
    Solution to Java reading Chinese garbled characters: Use the InputStreamReader class to specify the encoding method of the data stream when reading Chinese in Java. The InputStreamReader class is a bridge that associates bytes to characters. It is responsible for processing the conversion of read bytes into characters during the I/O process.
    JavaBase 2483 2019-12-14 15:27:46
  • Solution to Chinese garbled data written by java to mysql
    Solution to Chinese garbled data written by java to mysql
    The reason why mysql data is garbled is that the character sets of Java and the database are inconsistent. Usually, you only need to set the character set specified when creating the database table to be consistent with the character set specified by the URL when setting the database connection in Java to solve the problem.
    JavaBase 2341 2019-12-14 15:05:04
  • Solution to Chinese garbled code in java writing xml
    Solution to Chinese garbled code in java writing xml
    Solution to garbled Chinese characters written in XML in Java: Change the header encoding of the XML file to utf-8, and change the StreamResult encoding method to utf-8. The StreamResult class acts as the holder of the conversion result, which can be XML, plain text, HTML, or some other formatted markup.
    JavaBase 2776 2019-12-14 14:55:49
  • How to express not equal in java
    How to express not equal in java
    Inequality in Java can be expressed by "!=" between numbers, and strings can be compared using the "!equals" method. The equals() method is used to compare a string with a specified object. If the given object is equal to the string, it returns true; if it is not equal, it returns false.
    JavaBase 27460 2019-12-14 14:39:38
  • Reasons and solutions for java compilation errors that cannot find symbols
    Reasons and solutions for java compilation errors that cannot find symbols
    The reason why the java compilation error cannot find the symbol: the Java naming conflicts with the class name in the JDK, causing the compilation error. Solution: Change the name of the java file to solve the problem.
    JavaBase 6175 2019-12-14 14:27:20
  • Solution to garbled file name in java export file
    Solution to garbled file name in java export file
    Solution to garbled file names in Java export files: Add a code to the getBytes() method of the export statement String((edTemplate.getTemplateName()+"Import Template").getBytes(),"ISO-8859-1") Can.
    JavaBase 3866 2019-12-14 14:06:51
  • Java uses lambda expression to sort a certain attribute of List object collection
    Java uses lambda expression to sort a certain attribute of List object collection
    This article is introduced by the java introductory learning column: how to use lambda expressions to sort a certain attribute of a List object collection. I hope it can help you. There are usually two methods for sorting, namely: 1. Sorting according to a certain field in positive order; 2. Sorting according to a certain field in reverse order.
    JavaBase 7767 2019-12-14 12:00:03
  • How to determine whether a string is garbled in java
    How to determine whether a string is garbled in java
    Java method to determine whether the code is garbled: You can use the "java.nio.charset.Charset.forName("GBK").newEncoder().canEncode("test")" statement to determine whether the code is garbled.
    JavaBase 4136 2019-12-14 11:07:04
  • Java method to determine whether it is of type int
    Java method to determine whether it is of type int
    In Java, you can use the instanceof keyword to test whether the data to be judged is an instance of the int type to determine whether it is an int type. If it is an int type the instanceof operator returns true.
    JavaBase 7806 2019-12-14 10:20:39

Tool Recommendations

jQuery enterprise message form contact code

jQuery enterprise message form contact code is a simple and practical enterprise message form and contact us introduction page code.
form button
2024-02-29

HTML5 MP3 music box playback effects

HTML5 MP3 music box playback special effect is an mp3 music player based on HTML5 css3 to create cute music box emoticons and click the switch button.

HTML5 cool particle animation navigation menu special effects

HTML5 cool particle animation navigation menu special effect is a special effect that changes color when the navigation menu is hovered by the mouse.
Menu navigation
2024-02-29

jQuery visual form drag and drop editing code

jQuery visual form drag and drop editing code is a visual form based on jQuery and bootstrap framework.
form button
2024-02-29

Organic fruit and vegetable supplier web template Bootstrap5

An organic fruit and vegetable supplier web template-Bootstrap5
Bootstrap template
2023-02-03

Bootstrap3 multifunctional data information background management responsive web page template-Novus

Bootstrap3 multifunctional data information background management responsive web page template-Novus
backend template
2023-02-02

Real estate resource service platform web page template Bootstrap5

Real estate resource service platform web page template Bootstrap5
Bootstrap template
2023-02-02

Simple resume information web template Bootstrap4

Simple resume information web template Bootstrap4
Bootstrap template
2023-02-02

Cute summer elements vector material (EPS PNG)

This is a cute summer element vector material, including the sun, sun hat, coconut tree, bikini, airplane, watermelon, ice cream, ice cream, cold drink, swimming ring, flip-flops, pineapple, conch, shell, starfish, crab, Lemons, sunscreen, sunglasses, etc., the materials are provided in EPS and PNG formats, including JPG previews.
PNG material
2024-05-09

Four red 2023 graduation badges vector material (AI EPS PNG)

This is a red 2023 graduation badge vector material, four in total, available in AI, EPS and PNG formats, including JPG preview.
PNG material
2024-02-29

Singing bird and cart filled with flowers design spring banner vector material (AI EPS)

This is a spring banner vector material designed with singing birds and a cart full of flowers. It is available in AI and EPS formats, including JPG preview.
banner picture
2024-02-29

Golden graduation cap vector material (EPS PNG)

This is a golden graduation cap vector material, available in EPS and PNG formats, including JPG preview.
PNG material
2024-02-27

Home Decor Cleaning and Repair Service Company Website Template

Home Decoration Cleaning and Maintenance Service Company Website Template is a website template download suitable for promotional websites that provide home decoration, cleaning, maintenance and other service organizations. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-05-09

Fresh color personal resume guide page template

Fresh color matching personal job application resume guide page template is a personal job search resume work display guide page web template download suitable for fresh color matching style. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-29

Designer Creative Job Resume Web Template

Designer Creative Job Resume Web Template is a downloadable web template for personal job resume display suitable for various designer positions. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28

Modern engineering construction company website template

The modern engineering and construction company website template is a downloadable website template suitable for promotion of the engineering and construction service industry. Tip: This template calls the Google font library, and the page may open slowly.
Front-end template
2024-02-28