Hello Atlassian Team,
I am unmarshaling a json string element containing the following fully qualified class name:
com.atlassian.jira.workflow.function.issue.UpdateIssueStatusFunction
I am trying to obtain the Class object for this class using the following line of code
Class.forName("com.atlassian.jira.workflow.function.issue.UpdateIssueStatusFunction");
When I run this code, I am getting ClassNotFoundException. We then realized that the class was not getting loaded. In order to load the class, I had to run the following lines of code:
log.warn(String.valueOf(UpdateIssueStatusFunction.class));
Class.forName("com.atlassian.jira.workflow.function.issue.UpdateIssueStatusFunction");
This line loaded the class and then I was able to obtain the Class object that I needed.
Now coming to the question.
Could you please tell me how to load the class using a classLoader (or something similar) when I want to generalize the above line of code as following:
Class.forName(name); // name is a string which receives a value at runtime.
?