. * * This software are provided by the COPYRIGHT holders and CONTRIBUTORS ' as * is ' and any EXPRESS OR implied warranties, I Ncluding, LIMITED to, * The implied warranties of merchantability and FITNESS for A partIcular * PURPOSE is disclaimed. In NO EVENT shall the COPYRIGHT OWNER OR * CONTRIBUTORS is liable for any DIRECT, INDIRECT, incidental, special, * EXEMPLA RY, or consequential damages (including, but not LIMITED to, * procurement of substitute GOODS OR SERVICES; LOSS of Use, DATA, OR
-noverify-javaagent:e:\work\jrebel. jar-drebel.dirs=e:\project\asset\asset-web\target\classesFor the company's Eclipse EE and Tomcat development projects, the previously used MyEclipse can be deployed automatically.After writing a Java class need to restart the project to test, a few days tired of not, Baidu said with Jrebel can be implemented hot deployment, JVM plug-ins. Try to be successful.Found on the Internet Jrebel said to be cracked, genuine c
When the Java class Library does not provide the appropriate synchronization tools, you need to build a custom synchronization tool.
Structures that can block state-dependent operations
Copy Code code as follows:
Acquir lock on object state;//request acquire lock
While (precondition does not hold) {//No prerequisites are met
Release lock;//unlock First
Wait until precondition might hol
Elegant Java Tool Library LombokRecently in the company's project to see the application of the Lombok, through the @data annotations annotated Pojo, omit a lot of getter/setter code, the original long pojo in thin body directly become clean, refreshing, programmers no longer need to pay attention to the length of the method, You just need to focus on the field.Lombok IntroductionLombok is a very useful lib
com. fasterxml. jackson. dataformat. xml. xmlMapper; @ SuppressWarnings ("deprecation") public class JsonTest {private JsonGenerator jsonGen = null;/** convert the Java Object to Json */@ Test public void testGenJson () {ObjectMapper objMapper = new ObjectMapper (); Book book = new Book ("Think in Java", 100); try {jsonGen = objMapper. getJsonFactory (). createJsonGenerator (System. out, JsonEncoding. UTF8
Batch file tool (Java+shell command implementation)There are a bunch of corpora that need to be processed before they can be used, and should be directly handled directly with shell scripts. But not familiar with shell scripts, only a few simple commands. Therefore, it is implemented using the Java+shell command.Perhaps it's best to use shell scripting directly.
classThe Math class provides a number of methods for mathematical operations The math class is the final class and therefore cannot inherit from the math class the methods in the math class are static methods, so it is not necessary to create an object of the math class You can use the method of the class directly(i) Constants in the Math classpublic static final Double PIpublic static final Double PI(ii) Common methods in the Math classSeven, date class(i)Date classjava.util.Date. The da
Using HttpURLConnection in Java to upload files, we actually just know the standard format of the HTTP protocol upload file. Then you can use any language to simulate the browser to upload files. Here are a few articles from the HTTP protocol beginning to introduce the Java upload files.
Java uploading files using HttpURLConnection
Uploading
Reverseorder (comparatorReturns a comparer that forcibly reverses the order of the specified comparer.**/Import java.util.Collections;Import Java.util.Comparator;Import Java.util.Iterator;Import Java.util.TreeSet;public class CollectionsDemo2 {public static void Main (String args[]){Orderdemo ();}public static void Orderdemo (){Call the Reverseorder method with parameters, first sort the collection by its parameter comparer, and then force the collection elements back to order.TreesetTs.add ("A
versions are best matched. 3. Installation: Imagemagick-5.7.7-q8-x32-dll.exe1. Always next (other default)2, complete the installation, the ImageMagick directory under the convert.exe before adding im_, into the Im_convert.exe. Because there are convert.exe files in the WIN7, Windows (XP) system, renaming can avoid conflicts.3. Similarly, run-regedit.exe, in the registry, look for Convert.exe, locate the [ImageMagick]/convert.exe string and rename it to Im_convert.exe.4. Use:Test: Start the com
Backup a useful tool class. typeutilIts typetostring (string scope, object OBJ) method adopts the reflect mechanism of Java to print the content of any object.This is very useful for debugging programs.Usage:If you have an object (such as testclassobject) and want to print its content, you can use the following method:System. Out. println (typeutil. typetostring ("yourclassobjectname", testclassobject ));Th
Java screen tool class, which can capture the current screen. The saved image format supports JPG and PNG formats and provides the main function test. This type of function is widely used, for example, in the CS system. Similar to the operating system function, images can be saved in local folders. In BS, the path is displayed in the browser, and you can enter the path. In our project, this class is mainly
Original: http://tb.blog.csdn.net/TrackBack.aspx? Postid = 800901
This article mainly introduces character encoding and Its decoding functions, as well as the function to determine whether it is a character encoded by UTF-8.
Import java. Io. unsupportedencodingexception;Import java.net. urlencoder;Import java.net. urldecoder;
/***
Title: character encoding Tool*Description:*Copyright: flashman.com.c
JavaProgramDecompilation Tool
: Http://java.decompiler.free.fr /? Q = jdgui
JD-GUI
JD-GUI is a standalone graphical utility that displays Java source codes of ". Class" files. You can browse the reconstructed source code with the JD-GUI for instant access to methods and fields.
JD-GUI is free for non-commercial cial use. this means that the JD-GUI shall not be encoded or embedded into specified cial s
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.