易截截图软件、单文件、免安装、纯绿色、仅160KB

java log add function

#dd_traces.pl (C) Marko Kivij?rvi 2006
# Dummy checks
die "Specify an input file!\n" if $ARGV[0] eq "";
die "File not found!\n" unless -e $ARGV[0];
die "Incorrect file extension for a C/C++ file!\n"
    if ( $ARGV[0] !~ /(.*)\.(java)$/ );
# Constants
my $IMPORT_LOG_PACKAG = "\nimport android.util.Log;";
my $TAG;
if( $ARGV[0] !~ /BaseAdapter\.java/ && $ARGV[0] !~ /View\.java/) {
    $TAG="SWIFTTAG";
}
else {
    $TAG="SWIFTBASETAG";
}
# Parse output filename from the input filename
my $file = $ARGV[0];
my $origFile = $1."-orig.".$2;
#system( "cp $file $origFile" );
# Reset the input record separator (newline) so the entire file is read at once
undef $/;
# Read the input file
$_ = <>;                                 # All there
# Adds a tracer macro after each function definition
s/
    package #package
    \s+
    [^{;\/(\s]*\.[^{;\/(\s]*        # package name
    ;
/
    AddLogImport(tiny_mce_markeramp;)    # Print the match and add the macro
/gxe;                         # g = repeat, x = split regex to multiple lines, e = evaluate substitution
s/
    (public|private|protected)?   #api property type
    (\s+)?
    (abstract)?
    (\s+)?
    class                                     # Possible function return type
    \s+                                       # One or more empty spaces
    (\b\w+?)         &n


相关文档:

Centos中配置Java环境

     如果安装JDK时提示已经安装了JDK(或者安装的版本不是你想要的),删除的方法如下:
    # yum -y remove java-1.4.2-gcj-compat
1.安装JDK
首先需要从网上下载JDK安装文件,如果文件的类型是rpm.bin,可以使用下面的命令安装:
# sh jdk-6u2-linux-i586-rpm.bin
如果文 ......

java 插件加载

package tao.hai.bing;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
public class LoadJar {
 public static void main(String[] args)
 {
  Syst ......

pki java相关代码参考

keytool -genkey -dname "CN=demo, OU=softDept, O=company,
L=puddong,S=shanghai, C=cn" -alias demo -keyalg RSA -keysize 1024
-keystore demoKeystore -validity 3650 -storepass storePwd -keypass
demoPwd
生成保存公钥和私钥的密钥仓库,保存在demoKeystore文件中。这里storepass  ......

java读文件

import java.io.*;
public class FileReaderSample {
  public static void main(String args[]) throws IOException
  {
    // 建立可容纳1024个字符的数组
    char data[]=new char[1024];
    // 建立对象fr
    FileReader fr= ......

解决java编程乱码问题

处理乱码问题
1、规范数据库和页面所有编码统一为一种例如utf-8
2、hibernate连接数据库设置连接编码
<session-factory>
   <property name="connection.url">
   jdbc:mysql://127.0.0.1:3306/leaveword?useUnicode=true&amp;characterEncoding=utf-8
  & ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号