Start learning Java, write some code to illustrate the main functions of each class and how to use the function.
Basic idea, according to the Java source code package structure, set up their own package structure, for each class to write a demo
Three ways to configure Java environment variables in a Linux system:
1. Modify the/etc/profile file
If your computer is only recommended for development use, because all users ' shells have the right to use these environment variables, it may pose
The first way:
With my own project as a prototype here's a simple way to get the case
Define a Fetch class
Package com.boli.tianchuang.sys.util;
Import java.io.*;
Import java.util.Properties;
/** * Desc:properties File Acquisition Tool class *
1. Import Jar:log4j-1.2.15.jar in the program
2. Create a new file Log4j.properties place in the root directory and add lines of code:Log4j.rootlogger=info,console,dayrollingfile
#consoleLog4j.appender.console=org.apache.log4j.consoleappenderLog4j.
Copying Java files through the Filechanel method is much more efficient than the usual memory read/write mode
The public static void Headcreate (file f1, file F2) {//f1 is the source file F2 as the destination file, the function of this method is to
Import Java.io.BufferedReader;
Import java.io.IOException;
Import Java.io.InputStreamReader;
public class Myeclipsegen {
private static final String LL = "Decompiling This copyrighted software is a violation of both your license agreement and The
Warning: Error sending end packet
Java.net.SocketException:Software caused connection Abort:socket write error
At Java.net.SocketOutputStream.socketWrite0 (Native method)
At Java.net.SocketOutputStream.socketWrite (socketoutputstream.java:92)
At
Java language Notes when writing line breaks \ r \ n in a file
2012-03-15 00:39:50| Category: Java | report | font size subscribe to 1, when you write a string to a file, some of the newline characters are filtered out without any effect.Solution:
This article address: http://blog.csdn.net/kongxx/article/details/7259465
Java socket Combat one single-threaded communication
The previous article talked about how to write a simplest Java socket communication, but the example in the previous
Package binary;
public class Person {
Private String LastName;Private String FirstName;private int age;Public person (String ln,string fn,int age) {THIS.LASTNAME=LN;THIS.FIRSTNAME=FN;This.age=age;}public void Displayperson () {System.out.println
How the Stack works: Advanced successively out, similar to the United States mail processing principle, received the message in descending order of time (from the previous date to the nearest date to the current way of accumulation, in the
public static void Initproxy (string host, int port, final String username,Final String password) {Authenticator.setdefault (New Authenticator () {Protected Passwordauthentication getpasswordauthentication () {Return to New Passwordauthentication
Arranges the matrix by the number of columns and rows specified, as follows:
import java.util.arraylist; import java.util.list; /** * arranging matrices of the specified size * @author linyiteng1220 * */public class test
programs run through configuration files, what users configure, what they run, important parts
implementation steps: A Prepare the configuration file collection class properties to doB using IO streaming technology, associating collection classes,
An exception occurred while running the program:
An exception occurred:
HTTP Status-
Type Exception
Message
Description The server encountered an internal error () is prevented it from fulfilling this
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service