解决:移除系统依赖的jar包,重新导入。

只需要在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常了。

        ClassLoader appClassLoader = ClassLoader.getSystemClassLoader();
ClassLoader extClassloader = appClassLoader.getParent();
ClassLoader bootstrapLoader = extClassloader.getParent();
System.out.println("the bootstrapLoader : " + bootstrapLoader);
System.out.println("the extClassloader : " + extClassloader);
System.out.println("the appClassLoader : " + appClassLoader); System.out.println();
System.out.println("bootstrapLoader加载以下文件:"); URL[] urls = Launcher.getBootstrapClassPath().getURLs();
for (int i = ; i < urls.length; i++) {
System.out.println(urls[i]);
} System.out.println();
System.out.println("extClassloader加载以下文件:");
System.out.println(System.getProperty("java.ext.dirs")); System.out.println();
System.out.println("appClassLoader加载以下文件:");
System.out.println(System.getProperty("java.class.path"));

eclipse代码中使用到Launcher获取类加载器,找不到启动器类。的更多相关文章

  1. Java的类加载器都有哪些,每个类加载器都有加载那些类,什么是双亲委派模型,是做什么的?

    类加载器按照层次,从顶层到底层,分为以下三种: (1)启动类加载器(Bootstrap ClassLoader) 这个类加载器负责将存放在JAVA_HOME/lib下的,或者被-Xbootclassp ...

  2. eclipse 代码中突然出现特殊字符

    在写代码的时候,不知道点到了 eclipse 的哪个属性,代码中就出现了一些特殊字符,也不能删除. 请问,在 eclipse 中该怎么设置,才能将这些字符去掉. 如下图所示: 解决方法: 选择Wind ...

  3. java中定义的四种类加载器

    1,Bootstrap ClassLoader   启动类加载器2,ExtClassLoader   扩展类加载器3,AppClassLoader   系统类加载器4,ClassLoader   类加 ...

  4. [Eclipse配置] Eclipse代码中显示空白字符(空格,TAB和回车)的方法

    在代码页面点击右键进入 Preferences --> General --> Editors --> Text Editors. 在 Show whitespace charact ...

  5. eclipse插件开发中全局对象的获取

    转自:http://blog.csdn.net/liaomin416100569/article/details/7165425 1.获取系统默认的ShellShell shell = Platfor ...

  6. eclipse代码中每行的开始和结尾出现多余的特殊符号

    window -> preferences -> general -> editors -> text editors ->          show whitespa ...

  7. 深入探讨 Java 类加载器

    转自:http://www.ibm.com/developerworks/cn/java/j-lo-classloader/ 类加载器(class loader)是 Java™中的一个很重要的概念.类 ...

  8. 转载:深入探讨 Java 类加载器

    转载地址 : http://www.ibm.com/developerworks/cn/java/j-lo-classloader/ 深入探讨 Java 类加载器 类加载器(class loader) ...

  9. 【转】深入探讨 Java 类加载器

    转自:http://www.ibm.com/developerworks/cn/java/j-lo-classloader/index.html 类加载器是 Java 语言的一个创新,也是 Java ...

随机推荐

  1. html 5 如何限制上传的文件类型 (uploadifive)

    可以直接设置input标签的accept属性来限制上传文件的类型 <input type="file" accept="application/msword&quo ...

  2. Spring.NET学习笔记8——集合类型的注入(基础篇)

    1.基础类 public class Happy    {        public override string ToString()        {            return &q ...

  3. 修改python ide的主题,颜色

    1.找到这个名叫config-highlight.cfg文件后接下来就需要编辑它了 2. 贴上: [Obsidian] definition-foreground = #678CB1 error-fo ...

  4. smrtlink

    SMRT Link is the web-based end-to-end workflow manager for the Sequel™ System. It includes software ...

  5. py-函数基础

    定义: 函数是指将一组语句的集合通过一个名字(函数名)封装起来,要想执行这个函数,只需调用其函数名即可 特性: 1.减少重复代码2.使程序变的可扩展3.使程序变得易维护 函数参数 形参变量 只有在被调 ...

  6. Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable t

    spring与hibernate整合然后出现如下错误: org.springframework.beans.factory.BeanCreationException: Error creating ...

  7. MySQL】存储过程、游标、循环简单实例

    create procedure my_procedure() -- 创建存储过程 begin -- 开始存储过程 declare my_id varchar(32); -- 自定义变量1 decla ...

  8. MemCachedClient 节点失效时的处理

    引入jar包 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3 ...

  9. D3_book 11.3 force

    <!-- pie example --> <!DOCTYPE html> <meta charset="utf-8"> <style> ...

  10. mongodb 两小时入门

    传统的计算机应用大多使用关系型数据库来存储数据,比如大家可能熟悉的MySql, Sqlite等等,它的特点是数据以表格(table)的形式储存起来的.数据库由一张张排列整齐的表格构成,就好像一个Exc ...