Today the first time in writing articles blojava
Blojava the first time today in writing articles have always tried to open personal blog. Personal space in the MSN has written several articles have found that MSN used to feel less convenient. CSDN later went to the site to a blog, compared CSDN hate is not stable, not on the regular links. Then in the opening of a 163 personal diaries, up a pageantry that too spent. Finally found blogjava website, I also do just java projects that have always tried to make it to collate the experience accumulated over the past two years, this time not to find excuses, we should persist in taking notes. Posted on 2005-11-21 12:03 TNT reading (54) Comments (0) edit their collections quoted Categories: Capriccio
On my blog some of the
First mention positioning, my goal is to preserve it as a technical-oriented blog, related to specific java based learning (at least in some more energy), the network Abstracts (to be found in the network a good collection article), the study notes (this is my own and forced the purpose is to allow some of their own to read classic books), there are some feelings, thoughts, will be made from time to time line is the best in memory on the principle of I also count some ideological debris bar.
On the Style pages, orange may be a technical document on a number of eye-catching too, but for the programmers, I hope that the heavy learning in the future, his spare time to maintain a positive and optimistic attitude towards life, happy to enjoy life. / / Orange is the representative of the Netherlands soccer color, orange vests Corps I have been beloved team.
Said a final update, if time and energy permit, as many a new article.
To have friends coming from afar joy?
Presidential campaign come to Xi'an, very happy. After all, since after graduation never seen face, like 04, met with a gathering, but also very hastily. Members seem to have busy too many things.
This year should be pleased with the honor of several students, we all face it is to me. But these days does not have much time to play with him, internships have reached a crucial stage. The most important thing is to find two pairs of shoes, and the presidential campaign game and learn from and learn from. But his midfield engine of our high school, now I do not know how kind.
To learn. . .
Day On My Pat: English version of "childhood"
Days On My Past: English version of "childhood" http://www.mqxx.com/wgl/music/music2/13.mp3
Luo first widely disseminated that "childhood" in the English version: Back to the Mengdong childhood, and the neighbor's children in a small game sold by;é’æ¶©return to the past, the candlelight vigil, sea This edge on the beach out their first kiss; return to the Gangchumaolu years, the hardships million at recent life, and my father cautioned that…… slowly until we have our own small house, have children, "What I miss home, how I miss the days of the past ", which has passed…… all the same melody, a different language, have a different flavor, very cordial.
Days On My Past
I recall when I was young. Oh I will play and always having fun
With the neighbours next to me and we'll play until the setting sun
Try to be the best among the others in a game call the "spider battle"
It doesn't matter who is the best now. Those were the days of my past
A few years later when I got to school and was late for lesson all the time
Always day dreaming in the class, till I don't even know the lesson's done
Then my teacher always tell me never ever be lazy again
What can I do now? What can I say now? Those were the days of my past
As the days go on and on I grew up and had my first love
Candel light and sandy beach finally give away my first kiss
Mother said I was too young to fall in love and then I will one day regret
So love was over, but I do miss her. Those were the days of my past
Just when I left my high school and got my first job as salesmen
Working hard all day and night. No one there to lend a helping hand
Dady told me not to worry and said that l should go on step by step
What can I say now? What can I do now? Those were the days of my past
Then once day I settled down with the only one I really love
Got a small family with two kids that is what I'm always hoping for
But I still remember having fun with all my friends when I was young
I miss my home town. I miss my old friends, those the days of my past
Oh I miss my home town I miss my old friends. When will I see them again?
Focus Term
Setting? N. (sun) downhill
Spider? N. spiders, spider,
Give away? V. Songdiao, distribution
Regret? V. regret, remorse, regret, condolences
Step by step? Adv. Gradually
Settle down? V. settlement, settle down
Songs: childhood word / song: Luo?
Arranged: Minoru Yamasaki?
Banyan tree on the edge of the pond? Zhile repeatedly chanting in the summer?
On the edge of the playground swings? Only stop in the above Butterfly
Teacher's chalk on the blackboard? Still desperately Jijichacha write constantly?
Waiting for the school? Waiting for the school? Wait for the games of childhood
Store inside what everyone is not half Mao pocket money?
Zhuge Szu-Lang and the devil? Who grabbed it in the end with sword
The next classes that girl? How not through my window?
Mouth snacks? The hands of the comics? Childhood heart first love
Always have to wait until just before going to bed? Know only had a little bit of homework?
Always have to wait until after the examination? Only know that the study did not read the book
An inch of an inch of the time? Teachers said that the cost of Nanmai-inch time?
Day after day? Year after year? Drowsily childhood
No one knows why? Under the sun to the mountain side?
No one can tell me? Hill lived there are no gods?
How many days? Always a person facing the sky Fabao?
On the so curious? On such fantasies? So lonely childhood
Dragonfly flying from the sun? A film green rice paddies?
Advances in crayon and watercolor? Paintings that no one seemed rainbow?
When can like high-grade classmates have grown up and mature face?
Looking forward to holiday? Looking forward to tomorrow? Childhood growing up hope
Day after day? Year after year? Childhood growing up hope
?
Posted on 2006-08-23 20:12 Cheng Reading (64) Comments (0) edit their collections quoted Category: English learning
Java version of the ecape unecape function and [to]
Java version of the escape and unescape function [to]
Class EscapeUnescape
(
Public static String escape (String src)
(
Int i;
Char j;
StringBuffer tmp = new StringBuffer ();
Tmp.ensureCapacity (src.length () * 6);
For (i = 0; i <src.length (); i + +)
(
J = src.charAt (i);
If (Character.isDigit (j) | | Character.isLowerCase (j) | | Character.isUpperCase (j))
Tmp.append (j);
Else
If (j <256)
(
Tmp.append ( "%");
If (j <16)
Tmp.append ( "0");
Tmp.append (Integer.toString (j, 16));
)
Else
(
Tmp.append ( "% u");
Tmp.append (Integer.toString (j, 16));
)
)
Return tmp.toString ();
)
Public static String unescape (String src)
(
StringBuffer tmp = new StringBuffer ();
Tmp.ensureCapacity (src.length ());
Int lastPos = 0, pos = 0;
Char ch;
While (lastPos <src.length ())
(
Pos = src.indexOf ("%", lastPos);
If (pos == lastPos)
(
If (src.charAt (pos + 1) == 'u')
(
Ch = (char) Integer.parseInt (src.substring (+2 pos, pos +6), 16);
Tmp.append (ch);
LastPos +6 = pos;
)
Else
(
Ch = (char) Integer.parseInt (src.substring (+1 pos, pos +3), 16);
Tmp.append (ch);
LastPos +3 = pos;
)
)
Else
(
If (pos == -1)
(
Tmp.append (src.substring (lastPos));
LastPos = src.length ();
)
Else
(
Tmp.append (src.substring (lastPos, pos));
LastPos = pos;
)
)
)
Return tmp.toString ();
)
Public static void main (String [] args)
(
String tmp ="<;'][{} \ "> ~!@#$%^&*()_+| \ \ =-,./?><;'][{} \" ";
System.out.println ( "testing escape:" + tmp);
Tmp = escape (tmp);
System.out.println (tmp);
System.out.println ( "testing unescape:" + tmp);
System.out.println (unescape (tmp));
)
)
Eclipe to wear the cloak of V
Eclipse to put on the cloak of VS
Posted on 2006-08-11 14:15 Bomber Reading (38) Comments (1) edit their collections quoted Category: Eclipse
See a reprint articles, and please think about and discuss!
See a reprint articles, and please think about and discuss! In the next five years, Java Platform, Enterprise Edition (Java EE) will no longer be the standard procedures for mainstream design model, Burton Group senior analyst Richard Monson-Haefel predicted that the SOA and lead to the development of the reasons for this result one.
Last week, the Burton Group has an earthshaking things, Monson-Haefel published an article, entitled "JEE5: Java EE预示outcome of the threatened". Java Platform, Enterprise Edition is like a prehistoric animal, as a whole because it could not rely solely on too large edible plants to survive and lead to extinction, Burton analyst said that in the spring with the release of JEE5, Java Platform, Enterprise Edition has become too complicated lead to the development of enterprise-level staff to use it, they are increasingly looking forward to the emergence of alternative version, for example, Ruby-on-Rails.
Monson-Haefel conclusions as cruel as death certificate: "JEE5 in the complexity of the failure is预示the Java Enterprise Edition platform from the end of the field of enterprise development platform on the rule of the defeated. Consider all enterprises in the development of new enterprises should be Multi-reference to some other platforms, and enterprises should also make early preparations to deal with as enterprise solutions the ultimate demise of Java EE. "
Java Enterprise Edition platform development will be the inevitable follow some previous standards, such as CORBA (Common request broker architecture), which was also very promising, but in the end or towards the decline, he said.
"Five years, the Java Platform, Enterprise Edition will become the 21st century CORBA," Monson-Haefel said. "People will look at it say, 'It has alsoç››æžä¸€æ—¶', but because too complex, now nobody wants to use it."
He emphasized that his efforts are only Java EE platform reveals the decline of the road is not the Java language.
"Java programming language is not in any danger of" the analyst said Burton. "I think the Java programming language in the past few years will be to continue to develop as the backbone of enterprise development."
Monson-Haefel is not the only one forecast Java EE platform and the SOA failure as the cause of the results of one of the reasons analysts.
"Java EE is now time is running out," ZapThink, a senior analyst Jason Bloomberg said that he also saw the consequences of this result is the chief culprit in Java EE each new version of the increase in complexity. "Obviously, as long as the release of the new version of the module, or increase, the only only increase complexity. End, it will be crushed by their own. Judging from the current view, the future is not developed than the existing Java EE more streamlined version. "
Even if the complexity of the first put aside did not say when the need to enter the service-oriented enterprises of this new era, SOA and Web services as an expert in the field Bloomberg on the Java platform has already seen its fatal flaw.
"From the fundamental point of view, Java EE is not for the world created by the SOA," said an analyst at ZapThink. "Now, you can rely on the J2EE-based run-time infrastructure, and many in Java for the realization of SOA products create fantastic realization of the SOA. In fact, a lot of Java - an object-oriented programming language, a virtual machine infrastructure, Java and the Java EE is a realization of specific n-tier structure of the framework, unfortunately, any side of Java, or any of the virtual machine is not suitable for the development of SOA platform. "
Java EE achieve in the object-oriented (OO) does not fully conform to the core of SOA - service-oriented, Bloomberg argued.
"From the point of view of the object-oriented services and services example is the same concept," he said. "Object example of this is independent of the existence of a set of concepts little value in the SOA."
Java EE in the virtual machine is not the best solution for SOA, Bloomberg said.
"Virtual machine goal is to enhance code portability, but the SOA, interoperability is more important," he said. "In the SOA, if you do not need mobile code, then why should overcome these difficulties to achieve code transplant? Fundamentally speaking, the Virtual Machine distributed computing approach is the object of the serial to achieve remote method invocation, But SOA is a fixed interface to achieve the exchange of information between the services. "
Monson-Haefel from the point of view of the uniform makes service-oriented platform (such as Java EE) needs to become more irrelevant.
"SOA is a public procedure reduces the degree of importance of design models," Burton analyst said. "What is really important because the service is no longer in communication model, but the communication itself, which is you are exchanging data, which is complete with your close relationship with the exchange of data, rather than the data behind the programming model."
Java EE main advantage is to provide a common programming model, but when the field for the development of SOA, this is not the most important. Monson-Haefel said.
"SOA and Web services to reduce the background to the importance of the operation," said an analyst at Burton. "This is how the two stressed the mutual cooperation, for instance, the XML Web services and HTTP how to cooperate with each other. Background to the operation have been unimportant."
Finally, the company ZapThink Bloomberg said: enterprise-class JavaBeans / Servlet / Java Server Pages framework inconsistent with the SOA.
"As you can see, the focus is Java EE for scalable n-tier provide a framework that is the big deal with the affairs of the site needs," Bloomberg said. "However, if you was to create an enterprise-class SOA framework, then you have to be completed in the Construction and Java EE platform under construction on the large diameter of the tribunal. You need to create the framework is activated and maintenance services for the abstraction layer Centre, which is crucial to the SOA. Therefore, Java EE is very suitable for the platform based on the day-to-day services, but not SOA. "
From: www.csdn.net
My own experience:
I was released from weblogic5.0 started learning to use java, is not a long time, but then I remember that the Internet is relatively rapid development time (probably in my place), almost every week the mandate of the construction site, php3 and asp is then used most, when I saw jsp when I have only one idea: good! Then we all know that. Net beta out, I did not use j2ee done relatively large applications, I can not comparison. Net and java is good or bad, but at that time. Net really scared me jump! Now. Net is not as good as expected. Have anything comparison, I have two system a bit confusing! We all talk about their own views! 10 million Biechao Oh!
Posted on 2006-07-15 16:51 sosopro Reading (99) Comments (0) edit their collections quoted Category: Java Learning Notes
Java class loading mechanism of the mystery (zz)
Java class loading mechanism of the mystery (zz) [article] Author: cqfz: 2005-02-15 Source:天æžnetwork blog Editor: Ark [Article REVIEW] jdk1.2 after loading through commissioned category to complete, which means that can not be found if the ClassLoader class……
First, jdk1.2 after loading category through commissioned to complete, which means that if ClassLoader class can not be found, it will request the ClassLoader father to the implementation of this mandate, and the root of all ClassLoaders system ClassLoader, it will be missing Province way into categories - namely, from the local file system. Today, we are on to explore in jvm how these mechanisms are in operation. Let us assume that there is a class bytecode files (eg Hello.class document), then the application, he is to be loaded in, and formed a class object? The purpose of our article is to explain the problem.
There is a bag in the java.lang ClassLoader category, ClassLoader the basic objective is to provide service at the request of categories. When the JVM need to use category, it ClassLoader according to the name of this request, and then trying to return to a ClassLoader that this category of Class object. Through coverage corresponds to the different stages of this process, you can create custom ClassLoader. One of those loadClass (String name, boolean resolve) method, the method of entry points for the ClassLoader in jdk1.2 after loadClass method will be called findClass default method, the details of which can refer to the API documentation, we have prepared ClassLoader is mainly To cover the above two methods. We have just returned to the issue, how to read into bytecode files, and it constitutes a class object? There ClassLoader in the way of Class defineClass (String name, byte [] b, int off, int len), the answer is here, according to the class bytecode files (such as Hello.class) read into a few bytes Group, byte [] b, and put it into a Class object, and these data can be derived from documents, network, the magic it:)
DefineClass management JVM the many complex, mysterious and dependent on achieving the aspects - the byte code analysis of its operation into the data structure, validity checking, and so on. Have to worry about, you do not need to prepare it personally. In fact, even if you do not want to cover it because it has been marked as final.
Other methods:
FindSystemClass: from the local file system into the paper. In the local file system in search of documents, if it exists, on the use of the original byte defineClass converted into Class object to the documents into categories.
FindClass: jdk1.2 default after realizing loadClass call this new method. FindClass use ClassLoader contains all your special code, without the need for replication of other code (for example, when the specialized methods failed, calling system ClassLoader).
GetSystemClassLoader: If covered or loadClass findClass, getSystemClassLoader so you can visit the actual ClassLoader system ClassLoader object (rather than fixed from findSystemClass call it).
GetParent: To request will be entrusted to the father of the ClassLoader, this new method allows access to its parent ClassLoader the ClassLoader. When using a special method, custom ClassLoader class can not be found, you can use this approach.
ResolveClass: We can not completely (without analysis) into categories, can be completely (with analysis) into categories. When preparing our own loadClass, you can call resolveClass that depends on the resolve of the loadClass value.
FindLoadedClass: act as a buffer, when the request loadClass into categories, it calls the method to see whether it has ClassLoader into this category, so as to avoid Reload has been caused by the presence of trouble. Should first call the method.
Second, workflow:
1) call findLoadedClass (String) to see whether there has been loaded class, and if not, then a special kind of magic way to obtain the original bytes.
2) the father of ClassLoader called loadClass method, if the father of ClassLoader is null, then by default way into categories, namely system ClassLoader.
3) call findClass (String) category to find and access;
4) If loadClass resolve the true value of the parameter, then call resolveClass analytical Class object.
5) If no category, the return ClassNotFoundException.
6) Otherwise, the category will be called back to the process.
Third, a realization of the ClassLoader examples:
/**?*//**
* CompilingClassLoader.java
* Copyright? 2005-2-12
* /
Import? Java.io. *;
Public? Class? CompilingClassLoader? Extends? ClassLoader / / read the contents of a document
Private? Byte []? GetBytes (String? Filename)? Throws? IOException File? File = new? File (filename);
Long? File.length len = ();
Byte []? Raw = new? Byte [(int) len];
FileInputStream? Fin = new? FileInputStream (file);
Int? R = fin.read (raw);
If (r! = Len)? Throw? New? IOException ( "Can't? Read? All," +"!="+ len + r);
Fin.close ();
Return? Raw;
)
Private? Boolean? Compile (String? JavaFile)? Throws? IOException System.out.println ( "CCL: Compiling?" JavaFile + + "/ / call system javac Order Process? P = Runtime.getRuntime (). Exec (" javac "javaFile +);
Try / / other threads are waiting for the completion of this thread p.waitFor ();
) Catch (InterruptedException? Ie) System.out.println (ie);
)
Int? Ret = p.exitValue ();
Return? Ret == 0;
)
Public? Class? LoadClass (String? Name, boolean? Resovle)? Throws? ClassNotFoundException Class? Clas = null;
Clas = findLoadedClass (name);
/ / Note here that the package String? FileStub = name.replace ('.','/');
String? JavaFilename = fileStub +. "Java";
String? ClassFilename = fileStub +. "Class";
File? JavaFile = new? File (javaFilename);
File? ClassFile = new? File (classFilename);
/ / If there is not compiled class files if (javaFile.exists ()&&(! classFile.exists () | | javaFile.lastModified ()> classFile.lastModified ())) try if (! Compile (javaFilename) | |! ClassFile . exists ()) throw? new? ClassNotFoundException ( "ClassNotFoundExcetpion:" + javaFilename);
)
) Catch (IOException? Ie) throw? New? ClassNotFoundException (ie.toString ());
)
)
Try byte []? Raw = getBytes (classFilename);
/ / Read through the data to construct a class structure, which is the core clas = defineClass (name, raw, 0, raw.length);
) Catch (IOException? Ie) / /
)
If (clas == null) = findSystemClass clas (name);
)
System.out.println ( "findSystemClass:" + clas);
If (resovle? &? Clas! = Null) resolveClass (clas);
)
If (clas == null) throw? New? ClassNotFoundException (name);
)
Return? Clas;
)
)
The test loader:
/**?*//**
* TestRun.java
* Copyright? 2005-2-11
* /
Import? Java.lang.reflect .*;
Public? Class? TestRun public? Static? Void? Main (String []? Args)? Throws? Exception String? ProgClass = args [0];
String? ProgArgs [] = new? String [args.length-1];
System.arraycopy (args, 1, progArgs, 0, progArgs.length);
CompilingClassLoader? Ccl = new? CompilingClassLoader ();
Class? Clas = ccl.loadClass (progClass);
/ / Return to a class of type
Class []? MainArgType = Method? Main = clas.getMethod ( "main", mainArgType);
Object? ArgsArray [] =
Main.invoke (null, argsArray);
)
)
The core content of the above has been prepared by the end of the compiler, we have two documents:
CompilingClassLoader.class, TestRun.class
Fourth, the preparation of an example, then run our ClassLoader
/**?*//**
* Hello.java
* /
Public? Class? Hello public? Static? Void? Main (String []? Args) if (args.length! = 1) System.err.println ( "Error, exit!");
System.exit (1);?
)
String? Name = args [0];
System.out.println ( "Hello," + name);
)
)?
Well, running java TestRun Hello Afei
Hello, Afei
Original: http://www.yesky.com/SoftChannel/72342371961929728/20050212/1911003.shtml posted on 2006-10-23 16:19 hopeshared reading (412) Comments (0) edit their collections quoted Category: Java
Move you, cdn slow death
Move you, csdn often slow to die on the page can not be displayed, depressed, and to run it, and to their own-Kazakhstan posted on 2005-08-16 15:38 Gosling clip Read (25) Comments (0) edit collections cited
Exact interception string (reproduced)
Exact interception string (reproduced)
Posted on 2006-06-13 10:46 snowolf reading (150) Comments (0) edit their collections quoted Category: study
keep looking »