Import the Maven project
We also describe how to set up IntelliJ as your IDE to run Adobe PDF Library Java sample programs.
Note: Before you complete these steps, make sure that you set up your Java samples to work with Maven.
Select Import Project.
Note that if you already have a project loaded in IntelliJ, your screens might look somewhat different from these shown here, but the steps will work the same way.
Browse to the Java/Sample_Source directory for your Adobe PDF Library installation.
Click OK. Select the option to Import project from external model, and select Maven.
Don’t change the default values shown. Click Next.
Under Select Maven projects to import, click select the project and click Next.
Select the project SDK to use. JDK v.1.7.0_80 is the minimum required version. If the JDK you want to use does not appear, click the sign to add it. Click Next. Select the version of the JDK you have installed on your machine and that you plan to use with IntelliJ.
Generate the project sources
Right click on the project name. Click Maven and Generate Sources and Update Folders.
Click the Target folder so that it appears with Sample_Source in the project view.
Set the Run Configuration defaults
Click Run, and Edit Configurations.
Expand the Defaults folder to display the list of default options.
Add this value as the VM options:
Add the environment variables for your platform, Windows, UNIX, or Mac. Click next to the Environment variables field.
Click to add a new Environment variable. You will add two environment variables for your platform:
For Windows, the Environment Variables would look like this:
Leading to a Configuration Screen that looks like this:
Click Apply, and OK.
This is how the environment variables should appear on your IntelliJ Configuration screen:
Run your Java sample. The default configuration settings will be saved and used automatically for any Adobe PDF Library sample Java program you run in the future using IntelliJ. After these default values are in place, you only need to select the main class when selecting a Java sample to open and run.