0

I want to load all the code straight to memory from a link without having to actually download it and store it. I have tried looking it up, but I've only found ways to compile a class using strings.

Would it even be possible to make that?

  • You can create a special classloader that fetches class files over the network. See this for a starting point: https://stackoverflow.com/questions/41963273/how-to-use-classloader-to-load-class-file-from-server-to-client. Also you can fetch a string (a Java file) and compile it to executable code with something like Javassit. Pick your poison. – Daniel Voina Oct 30 '21 at 20:00
  • @DanielVoina Will, that include other imported classes or do I have to manually include all of them? – whydoihavetochoseaname Oct 31 '21 at 06:47
  • You mean transitively loaded? Any class you want to use directly or indirectly should be fetched and loaded in the VM – Daniel Voina Oct 31 '21 at 08:39

0 Answers0