1

I've got to get the HtmlUnit dependencies working by tomorrow to complete a project. I need to use java to access a webpage, fill in a form and click some buttons - HtmlUnit has been recommended for this.

I have downloaded the htmlunit 2.19 bin files which appears to have the jar dependencies and a bunch of documentation on how to use certain features - but there is no 'installation' steps.

Can someone please step me through the installation of the jar dependencies?

I am using Windows 7 and NetBeans IDE 8.0.2.

Thank in advance :)

YoungHobbit
  • 13,254
  • 9
  • 50
  • 73
ChickenFeet
  • 2,653
  • 22
  • 26

2 Answers2

1

I fixed the problem. In the libraries menu, I was just adding the folder that contained the jar files. I had to remove that and then add all the jars individually. – Joe ref: Java: how to setup htmlunit

Right-click my project -> Properties -> Libraries -> Add JAR/Folder Then add each jar individually.

Community
  • 1
  • 1
ChickenFeet
  • 2,653
  • 22
  • 26
-1

In the downloaded htmlunit-x.y-bin.zip file, there is a lib folder, which contains all the dependencies.

or you can use maven:

<dependency>
    <groupId>net.sourceforge.htmlunit</groupId>
    <artifactId>htmlunit</artifactId>
    <version>2.19</version>
</dependency>
Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
  • I am not sure how to use maven. I tried right-clicking my project -> Properties -> Libraries -> Add JAR/Folder and selecting the lib folder that I downloaded. I will see if that works. Otherwise can you be a little more clear on the steps to use maven? – ChickenFeet Dec 17 '15 at 01:39