Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Loading Java Class files in the extension

vkumar
vkumar Posts: 29

Dear All-
I was using JavaScript/Groovy and will write the code within the tool.
I am trying to implement extension using java and have written an extension as java.class file. The class is not getting loaded. I m giving the qualified name and build path has correct settings.
P.S: If I tried with some java class like java.lang.string its working fine

Comments

  • jakubiak
    jakubiak Posts: 795 admin

    Thanks for the screenshot!

    Did you add your project to the SOAtest System Properties preferences? If not, then SOAtest does not know how to find your class files. Go to the System Properties preferences, and click on "Add Java Project", and specify the project where your code lives. After you do this, click the "Reload" button on the System Properties preferences page to reload the classes from your project, and you should now be able to access your classes from an Extension Tool.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    It looks like your fully qualified class name is "response.Update". However, I see you using "CustomScripting.response.Update" which is wrong. As mentioned, you should also use the "Add Java Project" button to add output folder of your Java project to the classpath.

  • vkumar
    vkumar Posts: 29

    Thank you both. This worked. I was using the qualified name from eclipse.

  • Sourabh25
    Sourabh25 Posts: 37
    edited March 2018

    What needs to be done if i want to load the class files which are added as maven dependency in the java perspective?

  • jakubiak
    jakubiak Posts: 795 admin

    Hi @Sourabh25, this question looks like a duplicate of what you already asked in https://forums.parasoft.com/discussion/3530/how-to-use-soatest-extension-tool-with-maven - let's keep the maven-related discussion there.