D
D
daMage2014-09-14 19:00:03
Java
daMage, 2014-09-14 19:00:03

How to dynamically load packages in Java?

Hello. There are several varieties of the same class. It's kind of like themes in terms of gui, so at a certain point you only need to include 1 class. There is a structure
versions
-1
-2
in many files you have to write import app.versions.1.Class, is it possible to write a variable instead of 1 or something like that?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Power, 2014-09-14
@daMage

Perhaps what you need is reflection .
But since the description of the task is not fully understood, there may be an XY problem .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question