0

I want to create a dynamic class or method. The server sends the complete class as the response. I want to use the response to create a dynamic class.

10
  • Possible duplicate of Create new class from a Variable in Java Commented Nov 16, 2017 at 7:42
  • No. I'm sending class in response. So I just want to load those into the class loader and use it (like generic class loader). Commented Nov 16, 2017 at 7:48
  • You want to create classes from raw string source? It's possible. But highly not recommended. Google for cglib or javassist. But I cant imagine the real business case that require compiling classes dynamically. Commented Nov 16, 2017 at 7:54
  • We want to send class that contains API keys, encryption key generation methods for the security. Commented Nov 16, 2017 at 7:56
  • Yes, we want to create the class from the raw string. Commented Nov 16, 2017 at 8:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.