Coder Social home page Coder Social logo

Comments (7)

core-lib avatar core-lib commented on July 23, 2024

没听明白 抛出什么异常?

from xjar.

itlidaye avatar itlidaye commented on July 23, 2024

Exception in thread "main" java.lang.ClassCastException: com.cluster.ImClusterService cannot be cast to com.cluster.ImClusterServiceIfc
at com.commons.classload.SKJarLauncher.main(SKJarLauncher.java:94)

from xjar.

core-lib avatar core-lib commented on July 23, 2024

你们用到了自定义ClassLoader 吗

from xjar.

itlidaye avatar itlidaye commented on July 23, 2024

image

image
image

from xjar.

itlidaye avatar itlidaye commented on July 23, 2024

是用的 xjar 的 ClassLoader 只是我自己封装了一下

from xjar.

core-lib avatar core-lib commented on July 23, 2024

这个我在开发XJar的时候倒没有考虑这种使用场景
我给你一个思路吧 同一个Class 被不同的ClassLoader 加载 是两个class 所以是不能强转的
初看你这段代码 好像 ClassLoader parent = this.getClass().getClassLoader().getParent(); 有点问题
是不是应该改成ClassLoader parent = this.getClass().getClassLoader();

from xjar.

itlidaye avatar itlidaye commented on July 23, 2024

之前 我是照着 XJarLauncher 这个类写的

image
改成你说的 方式 还是不行
xjar 是不是只支持 一个jar 包的环境

还有其他的解决方案嘛

from xjar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.