- 浏览: 84855 次
文章分类
最新评论
-
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 924字符编码笔记:ASCII,Unicode和UTF-8 阮一峰 ... -
How to set up a simple LRU cache using LinkedHash
2008-11-03 18:05 1278How to set up a simple LRU cach ... -
Scalability?
2008-10-07 14:07 825严格上讲,scalability还没有正式定义, 甚至有人觉得 ... -
Cray Reminiscences
2007-08-29 15:54 790Kirk Pepperdine's attendence of ... -
lock-free
2007-06-18 22:06 9881. http://www.ibm.com/developer ... -
解决java.lang.OutOfMemoryError: PermGen space(转帖)
2007-06-05 18:07 3159解决方案就是:在启动服务器时加上指定PermGen区域的内存大 ... -
Performance...
2007-06-05 15:11 977« I used to work for... | Mai ... -
数据仓库
2007-04-18 10:38 1116... -
Expressions Transform
2007-04-13 11:13 1385Expressions, Conversion and Eva ... -
Java cleanup code
2007-04-03 12:20 1291Java shutdown hook guarantee th ... -
Java performance tunning
2007-04-03 11:37 936http://www.javaperformancetunin ... -
Running IE from command line
2007-04-03 10:58 1109Here's a simple way you can ru ... -
Unicode and UTF8
2007-04-03 10:27 907What is Unicode? Unicode provid ... -
Daemon Thread Notes
2007-04-03 09:16 26491. 只要程式中的non-Daemon thread都結束了. ... -
The best chinese BAT tutorial(from www.boofee.net/bigfee/)
2007-03-27 11:58 1328如何创建批处理文件? 不要听了批处理文件就感到很神气 ... -
Basics - Binary search
2007-03-26 15:53 963java 代码 public class Bin ... -
MergeSort
2007-03-23 17:26 835MergeSort is a sample solutio ... -
Graph data structure
2007-03-23 12:04 8721. adjacent matrix good for bor ... -
Functional Programming For The Rest of Us
2007-03-23 10:39 1282I like connect beautiful artic ... -
Functional Programming For The Rest of Us
2007-03-23 10:24 1062I like connect beautiful artic ...
相关推荐
How to run a JAR file
在遇到“Don't know how to process version 5”的错误时,这通常意味着Abe.jar不支持当前APK的版本格式,这可能是由于APK格式的更新或Abe.jar自身的版本过旧。 首先,让我们深入了解一下Java和Android的关系。Java...
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 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 ...
C++ How to Program presents leading-edge computing technologies in a friendly manner appropriate for introductory college course sequences, based on the curriculum recommendations of two key ...
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, ...
To designers, engineers and product... Yet, in spite of the obvious value, it may not be clear how to convince the management and accounting departments that the benefits justify the capital expenditure.
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...
How to read a book efficiently. Part one The dimensions of reading Part two The third level of reading Part three Approaches to different kinds of reading Part four The ultimate goals of reading
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 ...
You’ll learn how to choose the right programming style for each project, manage unanticipated problems, and work more successfully with every facet of JavaScript programming from data structures to ...