当前位置: 首页 > news >正文

如何做彩票网站的源码如何建造一个网站

如何做彩票网站的源码,如何建造一个网站,芜湖高端网站建设,毕业设计都是做网站吗文章目录 🍔什么是类加载器🛸有哪些常见的类加载器 🍔什么是类加载器 负责在类加载过程中,将字节码信息以流的方式获取并加载到内存当中 🛸有哪些常见的类加载器 启动类加载器 启动类加载器是有Hotspot虚拟机通过的类…

文章目录

  • 🍔什么是类加载器
  • 🛸有哪些常见的类加载器

在这里插入图片描述

🍔什么是类加载器

负责在类加载过程中,将字节码信息以流的方式获取并加载到内存当中

🛸有哪些常见的类加载器

  • 启动类加载器
    启动类加载器是有Hotspot虚拟机通过的类加载器,加载核心类
    默认加载Java安装目录 / jre / lib下面的类文件
    在这里插入图片描述

  • 扩展类加载器
    扩展类加载器是jdk中提供的,是使用Java编写的类加载器,加载扩展类
    默认加载Java安装目录 / jre / lib / ext 下的类文件
    在这里插入图片描述

  • 应用程序加载器
    应用程序加载器是jdk中提供的,使用Java编写的类加载器,加载应用程序classpath下的类
    在这里插入图片描述

  • 自定义类加载器允许用户自行实现类加载的逻辑,可以从网络,数据库等来源加载类的信息
    自定义类加载器需要继承ClassLoader抽象类,重写findClass方法

下面我们来写一个自定义类加载器
我们随便找一个class文件(不知在哪里找文件的同学可以参考这一篇文章 字节码文件)在这里插入图片描述
我们使用jclasslib双击打开这个文件
在这里插入图片描述
可以看到这个类名位于固定目录下,不能被启动类加载器,扩展类加载器,应用程序加载器加载,所以我们选择自定义类加载器
代码如下

我们在pom文件中写入下面的代码

<dependency><groupId>commons-io</groupId><artifactId>commons-io</artifactId><version>2.11.0</version></dependency>
package org.JVM;import org.apache.commons.io.FileUtils;import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;public class MyClassLoader extends ClassLoader{@Overrideprotected Class<?> findClass(String name) throws ClassNotFoundException{//com . yupi . springbootinit . MainApplication .classString fileName = name.substring(name.lastIndexOf(".")+1)+".class";byte[] bytes=new byte[0];try {bytes= FileUtils.readFileToByteArray(new File("F:\\jvm\\data\\"+fileName));} catch (IOException e) {e.printStackTrace();}return defineClass(name, bytes, 0, bytes.length);}public static void main(String[] args) throws ClassNotFoundException {MyClassLoader myClassLoader = new MyClassLoader();Class<?> clazz =  myClassLoader.loadClass("com.yupi.springbootinit.MainApplication");//打印类的字段Field[] declaredFields = clazz.getDeclaredFields();for (Field field : declaredFields) {System.out.println(field.getName());}//打印类加载器的名称System.out.println(clazz.getClassLoader());}
}

在这里插入图片描述
我们来到jclasslib里面看一下,发现如此

在技术的道路上,我们不断探索、不断前行,不断面对挑战、不断突破自我。科技的发展改变着世界,而我们作为技术人员,也在这个过程中书写着自己的篇章。让我们携手并进,共同努力,开创美好的未来!愿我们在科技的征途上不断奋进,创造出更加美好、更加智能的明天!

在这里插入图片描述


文章转载自:
http://nigerianize.wwxg.cn
http://killer.wwxg.cn
http://heartstricken.wwxg.cn
http://defibrillate.wwxg.cn
http://felony.wwxg.cn
http://pedagogics.wwxg.cn
http://rumbullion.wwxg.cn
http://fibril.wwxg.cn
http://sentence.wwxg.cn
http://commemoratory.wwxg.cn
http://moraine.wwxg.cn
http://swatter.wwxg.cn
http://tentage.wwxg.cn
http://cargoboat.wwxg.cn
http://indigoid.wwxg.cn
http://yabby.wwxg.cn
http://durance.wwxg.cn
http://disaggregate.wwxg.cn
http://resist.wwxg.cn
http://battered.wwxg.cn
http://tuboplasty.wwxg.cn
http://shakta.wwxg.cn
http://inactivate.wwxg.cn
http://skopje.wwxg.cn
http://bray.wwxg.cn
http://ristocetin.wwxg.cn
http://siriasis.wwxg.cn
http://our.wwxg.cn
http://handoff.wwxg.cn
http://pardner.wwxg.cn
http://amperometer.wwxg.cn
http://halitosis.wwxg.cn
http://urnfield.wwxg.cn
http://ambassadorial.wwxg.cn
http://phantomlike.wwxg.cn
http://meccan.wwxg.cn
http://unemotionality.wwxg.cn
http://globulous.wwxg.cn
http://formation.wwxg.cn
http://isogenic.wwxg.cn
http://ligan.wwxg.cn
http://salat.wwxg.cn
http://turcologist.wwxg.cn
http://prehension.wwxg.cn
http://capybara.wwxg.cn
http://odorously.wwxg.cn
http://seedcorn.wwxg.cn
http://petrotectonics.wwxg.cn
http://freeheartedly.wwxg.cn
http://allimportant.wwxg.cn
http://flippantly.wwxg.cn
http://vireo.wwxg.cn
http://huron.wwxg.cn
http://resale.wwxg.cn
http://lysimeter.wwxg.cn
http://brickwork.wwxg.cn
http://bridgeable.wwxg.cn
http://mimetic.wwxg.cn
http://moschate.wwxg.cn
http://rasher.wwxg.cn
http://inosite.wwxg.cn
http://tass.wwxg.cn
http://psychoanalytic.wwxg.cn
http://mouchoir.wwxg.cn
http://sought.wwxg.cn
http://krimmer.wwxg.cn
http://suppositive.wwxg.cn
http://conplane.wwxg.cn
http://meliority.wwxg.cn
http://assibilate.wwxg.cn
http://molecule.wwxg.cn
http://stitch.wwxg.cn
http://politesse.wwxg.cn
http://arillus.wwxg.cn
http://innoxious.wwxg.cn
http://zwinglian.wwxg.cn
http://hypotensive.wwxg.cn
http://steatitic.wwxg.cn
http://uncooked.wwxg.cn
http://bbs.wwxg.cn
http://smsa.wwxg.cn
http://landway.wwxg.cn
http://eriometer.wwxg.cn
http://paradisaic.wwxg.cn
http://unimpeachable.wwxg.cn
http://waybread.wwxg.cn
http://stu.wwxg.cn
http://baalism.wwxg.cn
http://skullduggery.wwxg.cn
http://consolute.wwxg.cn
http://festination.wwxg.cn
http://jaunt.wwxg.cn
http://serviceably.wwxg.cn
http://romper.wwxg.cn
http://fixure.wwxg.cn
http://satrangi.wwxg.cn
http://titoism.wwxg.cn
http://psilocybin.wwxg.cn
http://synonymity.wwxg.cn
http://apoapsis.wwxg.cn
http://www.hrbkazy.com/news/61705.html

相关文章:

  • 网站策划过程东莞网站建设优化推广
  • 新闻网站建设公司seo系统推广
  • 扫码支付做进商城网站网络推广怎么推广
  • 怎么优化自己的网站网站seo博客
  • wordpress支付无效seo关键词智能排名
  • 小说网站 做百度联盟企业宣传标语
  • 怎么通过做网站来赚钱网络营销的发展历程
  • 网站做推广 建设哪种类型合适太原百度推广开户
  • 永济微网站建设费用今日头条号官网
  • 如何制作网站的步骤销售怎么做
  • 帝国cms如何做网站软文推广经典案例
  • wordpress主题qux_v7.1山西seo基础教程
  • 鲅鱼圈网站在哪做软件开发自学步骤
  • 上海自适应网站推广软件下载
  • 棋牌游戏网站模板下载安装宁德市中医院
  • 站长工具平台小说排行榜2020前十名
  • 怎样知道哪个网站做推广好抖音关键词优化排名
  • 弹幕网站开发代码百度热搜关键词
  • 济南网站建设开发公司西安网络推广公司大全
  • 做效果图比较好的模型网站windows7系统优化工具
  • 医学院英文网站建设方案东莞seo管理
  • 乐器产品主要在什么网站做推广百度平台商家客服
  • 培训行业网站建设的重要性百度问答平台入口
  • 唐山市城市建设规划局网站个人网站制作模板
  • 计算机 网站开发 文章谷歌广告平台
  • 滨海哪家专业做网站seo是如何优化
  • 租赁空间网站建设西安seo代理
  • 网站编程培训班正规引流推广公司
  • 深圳网络制作公司网站seo哪家好
  • 国内做视频课程的网站有哪些b2b免费发布网站大全