Loadrunner11 configures Jdk, and whether the verification is successfully configured

Let me first talk about my virtual machine win7 64-bit, the JDK downloaded is the 32-bit version 1.6, and the eclipse download should also be 32-bit.

1. Download address of jdk: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html

2. Build the java environment

  • Computer Properties -> Advanced System Settings -> Advanced (Environment Variables)
  • System variables -> New -> variable name (JAVA_HOME), variable value (path where jdk is located), for example: C:\Program Files (x86)\Java\jdk1.6.0_45, click 'Save'
  • Find the variable name Path, edit -> check whether the variable value has ;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin; , if not add it, note: you need to add ";" in front to distinguish it from the previous variable.
  • Verify that jdk is configured successfully: open and run (win+r)->cmd->java -version
  • New variable name: CLASSPATH, variable value: .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;C:\Program Files (x86)\Java\jdk1.6.0_45\lib, click 'Save'; loadrunner creates a new Java Vuser, Run-time Settings->Java Environment Settings->Classpath indicates that the configuration is successful.

  

3.Eclipse download address: http://www.eclipse.org/downloads/packages/release/luna/sr2

4. Use eclipse to write a simple test class, create a new Java Project (Loadrunner), package name: com.lr.test, class name: HelloJava

5. Find the path of the above example, copy the com folder to the save path of the Java Vuser example, then modify the Java Vuser example and import the written class file

6.F5 to run, the expected result 'HelloJava' can appear

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324739960&siteId=291194637