Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8693635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:35:24+00:00 2026-06-13T00:35:24+00:00

Here is my code: import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; final WebClient webClient = new WebClient();

  • 0

Here is my code:

import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;

final WebClient webClient = new WebClient();
final HtmlPage startPage = webClient.getPage("http://htmlunit.sf.net");

And this is the error I get:

11-04 21:58:08.761: ERROR/dalvikvm(17868): Could not find class 'com.gargoylesoftware.htmlunit.DefaultCssErrorHandler', referenced from method com.gargoylesoftware.htmlunit.WebClient.<init>
11-04 21:58:08.771: ERROR/dalvikvm(17868): Could not find class 'com.gargoylesoftware.htmlunit.DefaultCssErrorHandler', referenced from method com.gargoylesoftware.htmlunit.WebClient.<init>
11-04 21:58:09.501: ERROR/AndroidRuntime(17868): FATAL EXCEPTION: AsyncTask #1
11-04 21:58:09.501: ERROR/AndroidRuntime(17868): java.lang.RuntimeException: An error occured while executing doInBackground()
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at android.os.AsyncTask$3.done(AsyncTask.java:200)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at java.lang.Thread.run(Thread.java:1027)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868): Caused by: java.lang.NoClassDefFoundError: com.gargoylesoftware.htmlunit.DefaultCssErrorHandler
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:157)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at com.gargoylesoftware.htmlunit.WebClient.<init>(WebClient.java:180)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at com.Testapp4.fa.ForumAdapter.isGood(ForumAdapter.java:209)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at com.Testapp4.BoardIndex$pbar.doInBackground(BoardIndex.java:82)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at com.Testapp4.BoardIndex$pbar.doInBackground(BoardIndex.java:1)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
11-04 21:58:09.501: ERROR/AndroidRuntime(17868):     ... 4 more
11-04 21:58:09.872: ERROR/WindowManager(17868): Activity com.Testapp4.BoardIndex has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40562468 that was originally added here
11-04 21:58:09.872: ERROR/WindowManager(17868): android.view.WindowLeaked: Activity com.Testapp4.BoardIndex has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@40562468 that was originally added here
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.view.ViewRoot.<init>(ViewRoot.java:275)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.view.Window$LocalWindowManager.addView(Window.java:430)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.app.Dialog.show(Dialog.java:288)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.app.ProgressDialog.show(ProgressDialog.java:107)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.app.ProgressDialog.show(ProgressDialog.java:90)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at com.Testapp4.BoardIndex$pbar.onPreExecute(BoardIndex.java:66)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.os.AsyncTask.execute(AsyncTask.java:391)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at com.Testapp4.BoardIndex.Load(BoardIndex.java:191)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at com.Testapp4.BoardIndex.onCreate(BoardIndex.java:56)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1780)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1837)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.app.ActivityThread.access$1500(ActivityThread.java:132)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1033)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.os.Looper.loop(Looper.java:143)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at android.app.ActivityThread.main(ActivityThread.java:4196)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at java.lang.reflect.Method.invokeNative(Native Method)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at java.lang.reflect.Method.invoke(Method.java:507)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
11-04 21:58:09.872: ERROR/WindowManager(17868):     at dalvik.system.NativeStart.main(Native Method)

I’ve included almost every jar, while a couple has been removed because they were responsible for Eclipse crashing. I suppose that I’ve included everything necessary for that 2 lines of code.

In practice, HtmlUnit is experiencing difficulties to work on Android.

Any advice would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:35:25+00:00Added an answer on June 13, 2026 at 12:35 am

    If you just want to get a page and maybe fill out some forms and submit it, jsoup is a good alternative.

    I got it working in android with no problems, just add the jsoup.jar to the libs folder.

    Here is the simple example

    Document doc = Jsoup.connect("http://jsoup.org/")
                .timeout(4000)
                .get();
    

    Or an example submitting data

    Connection.Response res = Jsoup.connect("http://example.org")
                    .data("q", username, "password", password) 
                    .method(Method.GET)
                    .execute();
    
    Document doc = res.parse();
    System.out.println(doc);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So here is my source code : import com.jaspersoft.mongodb.MongoDbConnection; import com.jaspersoft.mongodb.MongoDbDataSource; import java.io.File; import
Using bottlenose - ( http://pypi.python.org/pypi/bottlenose/0.3.4 ) Here's my code: import bottlenose,json AMAZON_SECRET_KEY=XXX AMAZON_ACCESS_KEY_ID =
Here is my code : import java.util.List; import com.atlassian.jira.ComponentManager; import com.atlassian.jira.bc.filter.SearchRequestService; import com.atlassian.jira.issue.Issue; import
Here is my code import java.io.*; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.*; import java.sql.*;
Here is the code: import javax.swing.SwingUtilities; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JLabel; import java.awt.event.*;
Here is my code: import javax.swing.*; import java.awt.*; public class PanelModel { public static
Here is my code import org.ksoap2.*; import org.ksoap2.serialization.*; import org.ksoap2.transport.*; import android.app.Activity; import android.os.Bundle;
Here is the code: import javax.swing.*; import java.awt.event.*; import java.awt.*; public class TestGrid {
For some reason, I can't get pyglet to draw sprites. Here's my code: import
Here is some sample Python code: import re some_regex = re.compile(r\s+1\s+) result = some_regex.search(

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.