-
JAVA获取CLASSPATH路径--转
所属栏目:[Java] 日期:2020-12-14 热度:110
ClassLoader 提供了两个方法用于从装载的类路径中取得资源: ????????public?URL? getResource (String?name);? ????????public?InputStream? getResourceAsStream (String?name);? ???????这里name是资源的类路径,它是相对与“/”根路径下的位置。getResou[详细]
-
How to Tune Java Garbage Collection--reference
所属栏目:[Java] 日期:2020-12-14 热度:135
div class="microzoneShortDescription" div id="div-gpt-ad-1350569504085-6" div id="div-gpt-ad-1350569504085-6_ad_container" div class="microzone_article_ad"reference:http://architects.dzone.com/articles/how-tune-java-garbage div class="micr[详细]
-
java 并发官方教程
所属栏目:[Java] 日期:2020-12-14 热度:86
http://docs.oracle.com/javase/tutorial/essential/concurrency/index.html Concurrency Computer users take it for granted that their systems can do more than one thing at a time. They assume that they can continue to work in a word processor,[详细]
-
Java ZIP File Example---refernce
所属栏目:[Java] 日期:2020-12-14 热度:64
In this tutorial we are going to see how to ZIP a file in Java. ZIP is an archive file format that enables data compression and it is mostly used on files and folders. A ZIP file may contain one or more compressed files or folders. Many co[详细]
-
Understanding transient variables in Java and how they are p
所属栏目:[Java] 日期:2020-12-14 热度:172
What is the significance of the transient keyword in?? If you know the answer,good! you are a person who uses this a lot or a person who has read this very recently. If this seems like a word from a half remembered dream,well don’t worry[详细]
-
JVMInternals--reference
所属栏目:[Java] 日期:2020-12-14 热度:183
div class="box" This article explains the internal architecture of the Java Virtual Machine (JVM). The following diagram show the key internal components of a typical JVM that conforms to. The components shown on this diagram are each expl[详细]
-
java code to byte code--partone--reference
所属栏目:[Java] 日期:2020-12-14 热度:115
div class="box" Understanding how Java code is compiled into byte code and executed on a Java Virtual Machine (JVM) is critical because it helps you understand what is happening as your program executes. This understanding not only ensures[详细]
-
对request.getSession(false)的理解(附程序员常疏忽的一个漏洞
所属栏目:[Java] 日期:2020-12-14 热度:161
出处: 【前面的话】 在网上经常看到有人对request.getSession(false)提出疑问,我第一次也很迷惑,看了一下J2EE1.3 API,看一下官网是怎么解释的。? 【官方解释】 ? getSession? public? HttpSession ? getSession (boolean?create) Returns the current? H[详细]
-
How to Check if an Array Contains a Value in Java Efficientl
所属栏目:[Java] 日期:2020-12-14 热度:107
How to check if an array (unsorted) contains a certain value? This is a very useful and frequently used operation in Java. It is also a top voted question on Stack Overflow. As shown in top voted answers,checking if an array contains a cer[详细]
-
Java String Class Example--reference
所属栏目:[Java] 日期:2020-12-14 热度:188
reference:http://examples.javacodegeeks.com/core-java/lang/string/java-string-class-example/ 1. Introduction In this example we are going to discuss about the basic characteristics of?.? String ?is probably one of the most used types in J[详细]
-
Lambdas in Java 8--reference
所属栏目:[Java] 日期:2020-12-14 热度:130
Part 1 reference:http://jaxenter.com/lambdas-in-java-8-part-1-49700.html Get to know lambda expressions in Java 8. Few things excite a community of software developers more than a new release of their chosen programming language or platfor[详细]
-
The Java serialization algorithm revealed---reference
所属栏目:[Java] 日期:2020-12-14 热度:148
Serialization ?is the process of saving an object's state to a sequence of bytes;? deserialization ?is the process of rebuilding those bytes into a live object. The Java Serialization API provides a standard mechanism for developers to han[详细]
-
The declared package does not match the expected package
所属栏目:[Java] 日期:2020-12-14 热度:123
eclipse使用import导入源代码到项目中或者通过svn检出等方式导入源码到项目中,控制台容易出现大量错误。 但同时直接使用ant脚本进行编译则能编译成功。 这个时候请不用担心,打开错误可以看到在很多类的开头部分:package出现错误,提示为: The declared p[详细]
-
Caching Best Practices--reference
所属栏目:[Java] 日期:2020-12-14 热度:117
reference:http://java.dzone.com/articles/caching-best-practices There is an irresistible attraction to writing custom caching solutions,since it seems to be the easiest path to “improving” the overall application performance. Well,cachi[详细]
-
JVM Run-Time Data Areas--reference
所属栏目:[Java] 日期:2020-12-14 热度:134
http://www.programcreek.com/2013/04/jvm-run-time-data-areas/ This is my note of reading JVM specification. I draw a diagram which helps me understand. 1. Data Areas for Each Individual Thread (not shared) Data Areas for each individual thr[详细]
-
Understanding Java 8 Streams API---reference
所属栏目:[Java] 日期:2020-12-14 热度:100
Since past few versions,Java has started giving importance to concurrency. Java 8 goes one more step ahead and has developed a Streams API which lets us think about parallelism. Nowadays,because of the tremendous amount of development on t[详细]
-
手动修改user-agent
所属栏目:[Java] 日期:2020-12-14 热度:114
1. 在浏览器地址栏输入 about:config.弹出对话框: ? 2.点击“我保证会小心”,弹出下面的对话框,在搜索栏中输入 general.useragent.override ,查看是否有user-agent。 3. 如果没有 general.useragent.override ,则右键,新建字符串 。否则右键修改该字符[详细]
-
java文件在没有安装jdk的windows下运行。
所属栏目:[Java] 日期:2020-12-14 热度:55
1.首先该工程最好是gui的,使用swing或者awt的都行。 2.使用eclipse打包jar文件。 ? ? 项目名字上面点右键,选择 Export ,在选择 javaJAR file。 ? ? 选择 src 文件夹, .classpath 和 .project 不选 ? ? 去掉 Export class files withcompile errors (编[详细]
-
Java 动态代理机制分析及扩展--转
所属栏目:[Java] 日期:2020-12-14 热度:68
h2 id="major2" style="margin: 5px 0px; padding: 0px; border: 0px; outline: 0px; font-size: 1.6em !important; vertical-align: baseline; font-family: HelveticaNeue-Light,'Helvetica Neue Light','Helvetica Neue',Helvetica,Arial; color: #000000[详细]
-
java.net.SocketException四大异常解决方案---转
所属栏目:[Java] 日期:2020-12-14 热度:79
java.net.SocketException如何才能更好的使用呢?这个就需要我们先要了解有关这个语言的相关问题。希望大家有所帮助。那么我们就来看看有关.net.SocketException的相关知识。 第1个异常是 java.net.BindException:Address already in use: JVM_Bind。 该异常[详细]
-
也谈BIO | NIO | AIO (Java版--转)
所属栏目:[Java] 日期:2020-12-14 热度:191
关于BIO | NIO | AIO的讨论一直存在,有时候也很容易让人混淆,就我的理解,给出一个解释: BIO | NIO | AIO,本身的描述都是在Java语言的基础上的。而描述IO,我们需要从两个层面: 编程语言 实现原理 底层基础 从编程语言层面 BIO | NIO | AIO 以Java的角[详细]
-
Understanding JVM Internals---不得不转载呀
所属栏目:[Java] 日期:2020-12-14 热度:190
?这篇也不错,推荐读一下 Every developer who uses Java knows that Java bytecode runs in a JRE (Java Runtime Environment). The most important element of the JRE is? Java Virtual Machine ?(JVM),which analyzes and executes Java byte code. Java[详细]
-
jmap查看内存使用情况与生成heapdump--转
所属栏目:[Java] 日期:2020-12-14 热度:176
如果想分析自己的JAVA Application时,可以使用jmap程序来生成heapdump文件。 例: jmap -heap 1234 (1234为进程号) jmap是JDK自带的一个工具,非常小巧方便,其支持参数如下: ?-heap??????? 打印heap空间的概要,这里可以粗略的检验heap空间的使用情况。[详细]
-
JVM执行篇:使用HSDIS插件分析JVM代码执行细节--转
所属栏目:[Java] 日期:2020-12-14 热度:156
在《Java虚拟机规范》之中,详细描述了虚拟机指令集中每条指令的执行过程、执行前后对操作数栈、对局部变量表的影响等细节。这些细节描述与Sun的早期虚拟机(Sun Classic VM)高度吻合,但随着技术的发展,高性能虚拟机真正的细节实现方式已经渐渐与虚拟机规[详细]
-
请别再拿“String s = new String("xyz");创建了多少个S
所属栏目:[Java] 日期:2020-12-14 热度:121
这帖是用来回复 圈子里的一个问题, 的。? 本来因为见得太多已经吐槽无力,但这次实在忍不住了就又爆发了一把。写得太长干脆单独开了一帖。? 顺带广告:对JVM感兴趣的同学们同志们请多多支持 圈子? ? 以下是回复内容。文中的“楼主”是针对原问题帖而言。? =[详细]