Loading classes not present in the classpath

前端 未结 2 1987
慢半拍i
慢半拍i 2021-01-03 10:56

Let\'s say I\'ve compiled a Groovy script using Groovyc, which has generated one or more .class files in the file system. From a Java application, how do I add those classes

2条回答
  •  旧时难觅i
    2021-01-03 11:39

    You need to write your own classloader.

    This javadoc link has an example of how you can define a custom one.

提交回复
热议问题