- 博客(36)
- 收藏
- 关注
原创 Public Key Retrieval is not allowed客户端连接
Public Key Retrieval is not allowed
2023-11-22 17:19:46
602
原创 Docker快速安装kafkamanager
Docker快速安装kafkamanager拉取docker镜像docker pull wurstmeister/zookeeperdocker pull wurstmeister/kafkadocker pull kafkamanager/kafka-manager配置docker-compose.yml文件version: ‘3’services:zookeeper:image: wurstmeister/zookeeperports:- “2181:2181”kafka:
2021-03-14 14:32:22
347
原创 Java实例化新思考
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method;/** * @Author Mr.An * @Date 18/7/5 下午5:45 */ public class TestInherit { public static void main(Strin...
2018-07-05 19:15:50
178
原创 MacOS Sierra 安装HUE 4.1
一、前置安装 HUE是django开发的web项目需要安装部分python包,和java包。 1、安装java 2、安装更新homebrew a. ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)” b. brew doc...
2018-06-21 11:20:51
532
原创 java.net.UnknownHostException: hadoop
搭建完成hadoop 使用zookeeper作为群集管理器的HA后。 用eclipse客户端连接hadoop。或者直接在node节点上面执行:hdfs dfs -mkdir /test时报错:mkdir: java.net.UnknownHostException: mkdir: mkdir: java.net.UnknownHostException: hadoopham
2017-06-02 12:44:28
7236
原创 AOP调用注意点
package com.agp.aop.impl;import org.springframework.context.ApplicationContext;import org.springframework.context.support.ClassPathXmlApplicationContext;//CBuyCar接口的实现类Customer@Compone
2017-02-25 14:46:51
381
原创 JAVA动态代理学习
package com.agp.aop;import java.lang.reflect.InvocationHandler;import java.lang.reflect.Method;import java.lang.reflect.Proxy;import java.util.Arrays;interface Calculator {public i
2017-02-22 16:28:08
265
原创 Domino SSL SHA2启用手册
Domino如何启用SHA2,chrome等浏览器2016年12月31日之后强制关闭SHA1功能。需要提早启用SHA2功能,更安全。
2016-12-20 11:08:36
1660
原创 servlet的ServletConfig ServletContext演示
import java.io.IOException;import java.io.InputStream;import java.util.Enumeration;import javax.servlet.Servlet;import javax.servlet.ServletConfig;import javax.servlet.ServletContext;i
2016-11-04 17:13:37
320
原创 BeanListHandler演示
import java.lang.reflect.Field;import java.lang.reflect.Method;import java.sql.ResultSet;import java.sql.ResultSetMetaData;import java.sql.SQLException;import java.util.ArrayList;import ja
2016-10-18 16:18:02
542
原创 利用反射获取SQL数据库的对象
import java.io.InputStream;import java.lang.reflect.Field;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.s
2016-10-07 17:22:49
895
原创 JsonObject Android 读取
package com.agp.layoutdemo;import android.content.res.Resources;import android.os.Handler;import android.os.Message;import android.support.annotation.RawRes;import android.support.v7.app.AppComp
2016-09-06 17:03:45
160
原创 Android OnTouchEvent OnTouchListner 方法区别
OnTouchEvent属于Activity。OnTouchListner属于View。 View会返回本身Listener的监听结果,view的Listener设定为True,说明它自己可以处理。如果设定为False,就传递给整个Activity的Listener-->OnTouchEvent。 让OnTouchEvent处理。
2016-08-11 14:57:58
559
转载 单列模式在Thread模式下的变通
public class SingleTonThread {public static void main(String[] args) {RunDemo rundemo=new RunDemo();Thread t1=new Thread(rundemo);Thread t2=new Thread(rundemo);t1.start();t2.start();
2016-05-08 19:18:08
288
原创 HashMap学习
import java.util.Collection;import java.util.HashMap;import java.util.Map;import java.util.Set;public class HashMapDemo {public static void main(String[] args) {// TODO Auto-genera
2016-03-29 17:23:47
110
原创 final static区别示例
public class finalStaticDemo {public static void main(String[] args) {// TODO Auto-generated method stubString a = "hello2"; String aa="hellohello"; final String b = "hello";
2016-03-29 15:10:54
486
原创 Arraylist查看源代码
import java.util.ArrayList;import java.util.Iterator;class ArrayListDemo {public static void main(String[] args) {ArrayList al=new ArrayList();Student stu1=new Student("xiaoyi",20);
2016-03-17 17:18:17
913
原创 泛型数据容器Demo
import java.util.Arrays;import java.util.Scanner;class GenContainerDemo {public static void main(String[] args) {//GenContainer gc=new GenContainer();IContainer ic=new GenContainer();D
2016-03-15 16:46:30
272
原创 泛型方法Demo
class GenClassDemo5 {public static void main(String[] args) {Animal a=Animal.NewInstance();//静态成员子类,被用来了单例抽象类。a.tell("da");a.show(2.11);Animal.SubDemo as=a.new SubDemo();//成员内部类,调用方法
2016-03-13 11:55:25
445
原创 Java泛型通配符super使用Demo
class GenClassDemo4 {public static void main(String[] args) {SupGen sg=new SupGen();sg.setVar1(new Dog());sg.getVar1().tell();//SupGen sg=new SupGen(); /*GenClassDemo4.java:5: 错误:
2016-03-12 22:18:27
526
原创 Java泛型限制Demo3
class GenClassDemo3 {public static String str;public static Integer i;public static void main(String[] args) {//(Object)str="hello"; //:7: 错误: 意外的类型//(Object)i=10; //:7: 错误: 意外的类型//
2016-03-12 21:07:31
478
原创 泛型继承接口Demo
class GenClassDemo2 {public static void main(String[] args) {//System.out.println("Hello World!");SubGen sg=new SubGen("李四",30);System.out.println(sg.show()+"--"+sg.show2());sg.show4(35)
2016-03-08 18:40:55
517
原创 Java泛型Demo
class GenClassDemo{public static void main(String[] args) {GenClass gc=new GenClass(20.11);GenClass2 gc2=new GenClass2(30);gc.tell();gc2.tell(); //可以看到如果非泛型的时候:元素或者方法类型可以是基本类型,也可以是基类的包
2016-03-07 18:00:01
441
原创 java 自定义异常Demo
import java.util.Random;class WorkDoctorDemo{public static void main(String[] args) {Worker worker=new Worker();Doctor docter=new Doctor();try{worker.work();}catch (SickExceptio
2016-03-07 00:35:53
517
原创 try catch finally throw throws异常捕获和抛出demo
package com.age.www;import java.util.InputMismatchException;import java.util.Scanner;class TryCatchDemo {public static void main(String[] args) {ThrowDemo td=new ThrowDemo();Syst
2016-03-04 16:13:44
365
原创 java反射copy对象实例
package com.age.www;import java.lang.reflect.Array;import java.lang.reflect.Method;import java.lang.reflect.Field;class ReflectCopyDemo { public static void main(String[] args) throws
2016-03-02 10:18:23
438
原创 Reflect 数组操作示例
package com.age.www;import java.lang.reflect.Array;public class ReflectArrayDemo { public static void main(String[] args) throws Exception{ Object arry1d=Array.newInstance(Class.forName
2016-02-27 17:06:55
583
原创 匿名内部类 java 示例
class InnerAnonymousDemo {public static void main(String[] args) {int b=20;String str= new Object(){int a=10;String str="hello";public String toString(){System.out.println(a+str)
2016-02-24 16:16:13
610
原创 Java Reflect 反射 .invoke 示例
package com.age.www;import java.lang.reflect.Constructor;import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;public class ReflectionDemo1 {public static vo
2016-02-23 22:58:09
596
原创 Java 反射机制 .class .getClass() Class.forName("") .TYPE int void
package com.age.www;public class ReflectionDemo {public static void main(String[] args) {//对象名.getClass()产生Class对象Emploree1 e=new Emploree1();Class emploree=e.getClass();System.ou
2016-02-23 09:47:55
1019
转载 职坐标 选课系统整体框架 参考
package com.iotekclass.ht.view;import java.util.Scanner;import com.iotekclass.ht.beans.Student;import com.iotekclass.ht.dao.StudentDao;import com.iotekclass.ht.dao.impl.IStudentDao;
2016-02-21 18:58:10
481
原创 随机验证码
import java.util.Random;class RandomSecurityCode{public static void main(String[] args) {//System.out.println("Hello World!");char[] letter={'A','B','C','D','E','F','G','H','I','G','K','L
2016-02-20 22:18:33
224
原创 DateDemo 时间格式类 SimpleDateFormat DateFormat
时间格式类 SimpleDateFormat DateFormat Date
2016-02-19 16:06:43
390
原创 JAVA初始化顺序验证
class InitDemo {public static void main(String[] args) {//System.out.println(ABC.ID);//new ABC("xiaowang");new EFG("xiaoli",20);/* 输出结果:D:\EditPlusJava>java InitDemoABC静态代码块stati
2016-02-17 17:00:19
335
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人