Import Jar and execute a Java Class
Could someone please explain me the process to execute a Java class?
1. What protocol to use for the script?
2. How to import JAR file and where?
3. How to invoke the target class for execution?
Greatly appreciate any help.
1. Java vuser
2. In your Java script (import com.mypackage.myclass...) but you also need to add it to the classpath in the script's Run-Time Settings (Run-Time Settings/Java Environment Settings/Classpath). Make sure the jar file is reachable from your load generators as well.
3. Just like you would instantiate a class in any Java program
Vugen has in recent version excellent integration with Eclipse for scripting Java vusers in a more Java friendly environment. When you have set up your script, add your eclipse.exe location to Options/Scripting/Java in Vugen and off you go. You can even run scripts from within Eclipse.
Last edited by LGH; 06-04-2014 at 12:21 AM.