Highlighted
Absent Member.
Absent Member.
312 views

Compile Issue-VUGen

Hi

I am new to using VUGen on my project and I am having trouble compiling a script. I am using Java.

I am trying to import various packages but VUGen complains that it cannot find them. VUGen can find the Java build-in packages but not the ones specific to my project.

My VUGen files are stored in a sub-folder of my project. How can I tell VUGen to look elsewhere for things it cannot find in its default places? I cannot find anywhere to set the classpath as in Eclipse.

Regards

Patrick
0 Likes
10 Replies
Highlighted
Established Member..
Established Member..

Re: Compile Issue-VUGen

Not getting ur points...what packages u r trying to import in vugen???which version u r using???
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Compile Issue-VUGen

Sorry. I will try to explain further. I am using VUGen v9.52. The best I can do is provide a sample of my code that illustrates what VUGen is having trouble with. So here gode.

import java.util.Properties;

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLSession;

import com.gmacfs.wholesale.automatictransactions.*;
import com.gmacfs.wholesale.framework.ServiceObjectRegistry;

import lrapi.lr;

public class Actions {
...
}

Basically VUGen cannot find the packages that start with "com.gmacfs". Those packages are part of the application I want to use VUGen to test. Any idea how I can get VUGen to find those packages?
0 Likes
Highlighted
Established Member..
Established Member..

Re: Compile Issue-VUGen

Vugen writes codes in C....but u r trying to write some java codes, this is one mismatch......more over if u want to import any files then u have to declare it in the init section.

Thanks,
Prasenjit
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Compile Issue-VUGen

I beg to disagree as all code from "import lrapi.lr" was generated by VUGen.
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Compile Issue-VUGen

All the Java related protocols script will be in Java.

Did you include the jar files in the classpath?
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Compile Issue-VUGen

This is exactly my problem. How do I add things to the classpath? Do I have to do it outside VUGen or is there a way of doing it inside the tool?
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Compile Issue-VUGen

You can include your custom jar files in the Runtime Settings > Classpath. And put import statement in the script as required.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Compile Issue-VUGen

Thanks but it still will not compile.

Attached ZIP files contains screenshots as follows.

0001 = classpath in VUGen
0002 = JAR file in the classpath
0003 = source code for class for JAR file
0004 = VUGen source

What am I doing wrong?
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Compile Issue-VUGen

You need to include that in "Runtime settings". I believe you included it in recording options as per snapshot 0001.jpg
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Compile Issue-VUGen

Yeah. Realised after I posted. All compiling Ok now. Thanks for your help.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.