loading class at runtime in java ClassNotFoundException

后端 未结 1 1468
悲&欢浪女
悲&欢浪女 2021-01-27 20:51

I am having problems calling classes at run time in java Im basically making a plugin framework

it starts off by opening plugin/Plugins.cfg and parses the test into a ma

相关标签:
1条回答
  • 2021-01-27 21:18

    Your file doesn't point to a valid class or jar file.

    Debug the following line; you will notice it's path isn't an existing path in your file system.

    File file  = new File(System.getProperty("user.dir") + File.separator + "plugins" + File.separator + className);
    

    I would assume that you've forgotten to include .class in the className.

    0 讨论(0)
提交回复
热议问题