- 浏览: 80792 次
文章分类
最新评论
-
bailangfei3344:
自我介绍 -
regionwar:
你好,转化为人为:1、不该加锁的不要加锁:局部变量,单线程占用 ...
关于java锁机制的优化 -
danni505:
希望能交流:
msn:danni-505#hotmail.co ...
关于java锁机制的优化 -
ouspec:
收藏的东西不错。
TOP500 -
willpower:
The idea behind is e-sync IO do ...
Rethink the sync
Easy. Here is an implementation from Hadoop.
java 代码
- /**
- * A micro-application that prints the main class name out of a jar file.
- * @author Owen O'Malley
- */
- public class PrintJarMainClass {
- /**
- * @param args
- */
- public static void main(String[] args) {
- try {
- JarFile jar_file = new JarFile(args[0]);
- if (jar_file != null) {
- Manifest manifest = jar_file.getManifest();
- if (manifest != null) {
- String value = manifest.getMainAttributes().getValue("Main-Class");
- if (value != null) {
- System.out.println(value.replaceAll("/", "."));
- return;
- }
- }
- }
- } catch (Throwable e) {
- // ignore it
- }
- System.out.println("UNKNOWN");
- System.exit(1);
- }
- }
发表评论
-
字符编码笔记:ASCII,Unicode和UTF-8 (引用)
2009-01-07 10:39 874字符编码笔记:ASCII,Unicode和UTF-8 阮一峰 ... -
How to set up a simple LRU cache using LinkedHash
2008-11-03 18:05 1230How to set up a simple LRU cach ... -
Scalability?
2008-10-07 14:07 760严格上讲,scalability还没有正式定义, 甚至有人觉得 ... -
Cray Reminiscences
2007-08-29 15:54 744Kirk Pepperdine's attendence of ... -
lock-free
2007-06-18 22:06 9491. http://www.ibm.com/developer ... -
解决java.lang.OutOfMemoryError: PermGen space(转帖)
2007-06-05 18:07 3105解决方案就是:在启动服务器时加上指定PermGen区域的内存大 ... -
Performance...
2007-06-05 15:11 913« I used to work for... | Mai ... -
数据仓库
2007-04-18 10:38 1050... -
Expressions Transform
2007-04-13 11:13 1324Expressions, Conversion and Eva ... -
Java cleanup code
2007-04-03 12:20 1251Java shutdown hook guarantee th ... -
Java performance tunning
2007-04-03 11:37 881http://www.javaperformancetunin ... -
Running IE from command line
2007-04-03 10:58 1057Here's a simple way you can ru ... -
Unicode and UTF8
2007-04-03 10:27 870What is Unicode? Unicode provid ... -
Daemon Thread Notes
2007-04-03 09:16 26101. 只要程式中的non-Daemon thread都結束了. ... -
The best chinese BAT tutorial(from www.boofee.net/bigfee/)
2007-03-27 11:58 1269如何创建批处理文件? 不要听了批处理文件就感到很神气 ... -
Basics - Binary search
2007-03-26 15:53 910java 代码 public class Bin ... -
MergeSort
2007-03-23 17:26 760MergeSort is a sample solutio ... -
Graph data structure
2007-03-23 12:04 8281. adjacent matrix good for bor ... -
Functional Programming For The Rest of Us
2007-03-23 10:39 900I like connect beautiful artic ... -
Functional Programming For The Rest of Us
2007-03-23 10:24 780I like connect beautiful artic ...
相关推荐
How to count the number of lines in a text file
If the letter came to you, how would you respond? Be pleasant; try to turn negative statements into positive ones. 4. Say it Plainly Phrases like “in compliance with your request” and “enclosed ...
You’ll also explore how to use Single File Components and the Vue.js Command Line Interface (CLI) to build components in a single file and add in build tools as you see fit. Getting started with a ...
You’ll also explore how to use Single File Components and the Vue.js Command Line Interface (CLI) to build components in a single file and add in build tools as you see fit. Getting started with a ...
How to write and publish a scientific paper ContentsChapter 1 What Is Scientific Writing? Chapter 2 Origins of Scientific Writing Chapter 3 What Is a Scientific Paper? Chapter 4 How to Prepare the ...
How to Write a World Class Paper
This demonstrates how to retrieve the file size from a specified file.
How to record the trace file in QUALNET The Tracing Scheme Exploration
how to update the CSS of the master page: This guid tells you how to update the CSS file so that to change the style of the menu which shows in the master page.
How to Make Sense of Any Mess: Information Architecture for Everybody Abby Covert Everything is getting more complex. It is easy to be overwhelmed by the amount of information we encounter each ...
To complete this assessment, you need to complete the implementation of class Dictionary and complete the spell checking program contained in main.cpp. Following is an ordered list of steps that ...
参赛资料指导PROBLEM A: The Leaves of a Tree "How much do the leaves on a tree weigh?" How might one estimate the actual weight of the leaves (or for that matter any other parts of the tree)? How might...
The first part of the API is the focus of this course --basically, how to send and receive messages independent of the provider/protocol. * The second part speaks the protocol-specific languages, ...
working with software, and purposeful writing of each of the different kinds of chapters, and finishes with a focus on revision, dissemination and deadlines. How to Write a Better Thesis presents a ...
This demonstrates how to change the height of a combobox’s drop-down height using API.
Think Perl 6: How to Think Like a Computer Scientist by Laurent Rosenfeld English | 8 May 2017 | ASIN: B0716P9W11 | 466 Pages | AZW3 | 1.02 MB Want to learn how to program and think like a computer ...
George Polya revealed how the mathematical method of demonstrating a proof or finding an unknown can be of help in attacking any problem that can be "reasoned" out - from building a bridge to winning...
5. How can the processes in a schedule be assigned to the robots in a specific environment? 6. Which options and actions can be triggered on the Packages page? 7. Which options can be used to end ...
The topic How to use SFTP (with client validation - password authentication) discusses the simplest form of client authentication, via password. In public key authentication, SSH clients and ...