Coder Social home page Coder Social logo

Comments (13)

aumarbello avatar aumarbello commented on May 23, 2024

Hello, would like to pick this issue up.

Which version should it be tested agaist? 9 or 10?

from freedomotic.

dmitraver avatar dmitraver commented on May 23, 2024

I had problems building the project having java 10. Can run it again and post error messages here.

from freedomotic.

mcicolella avatar mcicolella commented on May 23, 2024

@aumarbello java 10
@dmitraver yes, thanks

from freedomotic.

aumarbello avatar aumarbello commented on May 23, 2024

@mcicolella What would fixing this issue entail, just checking if it runs on Java 10 or also making changes to ensure it runs smoothly on Java 10?

from freedomotic.

mcicolella avatar mcicolella commented on May 23, 2024

@aumarbello for now we need to know if there are some problems with newer versions.

from freedomotic.

aumarbello avatar aumarbello commented on May 23, 2024

Okay, would run on Java 9 and 10 and report back any issues I experience.

from freedomotic.

mcicolella avatar mcicolella commented on May 23, 2024

@aumarbello thanks for your help.

from freedomotic.

mcicolella avatar mcicolella commented on May 23, 2024

Currently Java 11 is the default version.
Freedomotic is not compatible: the code doesn't compile on JDK 11 and the binary based on Java 8 doesn't run on 11.
We need to fix it ASAP.

from freedomotic.

mcicolella avatar mcicolella commented on May 23, 2024

The main problem is related to this code block
URLClassLoader classLoader = (URLClassLoader) ClassLoader.getSystemClassLoader(); Class<?> clazz = classLoader.loadClass(pojo.getHierarchy()); //eg: com.freedomotic.things.impl.ElectricDevice EnvObjectLogic logic = null; try { logic = (EnvObjectLogic) clazz.newInstance(); logic.setPojo(pojo); injector.injectMembers(logic); } catch (InstantiationException ex) { LOG.error(Freedomotic.getStackTraceInfo(ex)); } catch (IllegalAccessException ex) { LOG.error(Freedomotic.getStackTraceInfo(ex)); }
here

ClassLoader can't be casted to URLClassLoader in Java 11.

from freedomotic.

gmolica avatar gmolica commented on May 23, 2024

I will try to make it compatible with Java 11.

from freedomotic.

mcicolella avatar mcicolella commented on May 23, 2024

Thanks @gmolica

from freedomotic.

mcicolella avatar mcicolella commented on May 23, 2024

Maybe the following could be a possible workround
https://cgjennings.ca/articles/java-9-dynamic-jar-loading/
https://github.com/CGJennings/jar-loader

from freedomotic.

mcicolella avatar mcicolella commented on May 23, 2024

Fixed in
90eaa57
b1221af
521acc3

from freedomotic.

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.