, languages, and regions" open, we select "Language" and enter the settings.
On the language page, change language preferences, make sure that the Chinese (PRC) item is on top, and if not, move it by moving up. Then click "Advanced Settings" on the left to enter.
At this point, you have to focus on whether the settings page we entered is correct. The correct address is: Control Panel \ Clock, language and region \ Language \ Advanced settings.
Pull this page down to the bottom and we
Steamedbread * @author XCX * @time July 21, 2017 9:59:16 */ public Class Steamedbread { private int I; public steamedbread (int i) { this . I = I; @Override public String toString () { return "+i+" steamed bun "; }}/*** Synchronization Thread test class *@authorXCX * @time July 21, 2017 morning 10:44:10*/ Public classTest { Public Static voidMain (string[] args) {//Create a Basket objectBasket Basket =NewBasket (); //creating producer and consumer threadsProducer
The IDE I'm using is idea, and the places where eclipse may be set up are different1. Encoding of source filesWhen writing. java files in various Ides, there is an encoding that the IDE stores files on the machine in this encoding format, such as my settings, to set the S.java file to GBK format2. At compile time, Javac will read the file in the specified encoding format and then compile it into Unicode format.For example, I joined encoding GBK this s
3 Kinds of sortingTreeSet java.lang.Comparable interface in the class List
Collections.sort (list): You need to implement the comparable interface and override the Tocompare () method.
Collections.sort (list,new Comparator () {@Override public int compare (object o01, Object o02) ...}); Object classes do not implement interfaces.
2 Methods of reverse outputCollections Tool Reverse Output element:
Collections.sort (list, Collections.reverseorder ()); Descending arrange
A piece of code is intended to delete a collection item that contains a string of "a" in the collection:public class Testforeach {public static void main (string[] args) {//arraylistCause Analysis:When you do not use iterator to traverse a collection element:public class Testforeach {public static void main (string[] args) {arraylistOutput Result:[Acvd, BVD, d]The reasons why ACVD was not removed are:In memory, when the element "ABVD" of the i=0 is removed, i++ and the i=0 position in the lists
the thread to terminate or the time-out or I/O processing is complete, the thread is re-transferred to10: Sync function Lock problem Public classDemon {//1. Static method Synchronization function Public Static synchronized voidmethod1 () {}//2. Non-static method synchronization Public synchronized voidmethod2 () {}//3. This method can be equivalent to the static method synchronous function, that is, the static method synchronization function omitted the lock to Demon.classStatic blocks of cod
Two JVM communication between the two JVMs.RMI Full name is Remote Method Invocation -Remote Method invocation .Define the server side (Spring demo):Beanclass= "Org.springframework.remoting.rmi.RmiServiceExporter">Does not necessarily has to is the same name as the bean to be exported - Propertyname= "ServiceName"value= "Custom"/> Propertyname= "Service"ref= " custom "/> Propertyname= "Serviceinterface"value= " custom "/>defaults to 1099 - Propertyname= "Registryport"value= "1199"/>Bean>Define t
("-", "" "); }} response.getwriter (). print (s); }Law IIidea: URL encoding, and then put the encoded string into a cookie, then URL decoding can be. Public voiddoget (httpservletrequest request, httpservletresponse response) throws Servletexception, IOException { Response.setcontenttype ("Text/html;charset=utf-8"); System. out. println (NewDate (). toString ()); Cookie Cookie=NewCookies ("Lasttime",Urlencoder.encode (new Date (). toString (), "UTF-8" )); Cookie.setmaxage ( -* -); Re
Request Resource PathString action=uri.substring (Uri.lastindexof ("/"), Uri.lastindexof (".")); Parse the request resource path to get the last/and last one in the path. The content betweenRes.setcontenttype ("Text/html;charset=utf-8"); Set the server-side encoding method to Utf-8, prevent the occurrence of Chinese garbledPrintWriter Out=res.getwriter ();Depending on the results of the analysis, different treatments are carried out//To learn to use the following method for equal judgment, the
Error problem: Although the Find repository directory is a jar package, but the jar package is problematic (perhaps the download is incomplete), so change the mirror address to the domestic.Solution:1) Remove all jar packages under the error path (C:\Documents and settings\administrator\.m2\repository\org ... )。2) Change the image address, preferably into a domestic (Ali), and then re-Maven--->update projectResolves issues that occur after importing a
No master list or error:invalid or corrupt jarfile Xx.jar in Xx.jar
This problem is encountered because your jar package does not have a portal set for the main class.
That is, Main-class:packagename.classname is not defined in the MANIFEST.MF file of the Meta-inf folder(here Main-class: with Packagename.classname A space and a newline character at the end of the line)
We can open your export jar with WinRAR (do not unzip), find the Manifest.mf file in the Meta-inf folder,
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.