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 8562253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:41:28+00:00 2026-06-11T16:41:28+00:00

I want to open help.chm file when click on the help button. At present

  • 0

I want to open help.chm file when click on the help button. At present , it is opened from the desktop when click help button. I copied and paste the file in one of the packages in my project. Is there a way to open this file from this package?

This is what I did to open the file from desktop

private void helpActionPerformed(java.awt.event.ActionEvent evt)    
{                                            
    try
    {


         Runtime.getRuntime().exec("hh.exe C:/Users/toshiba/Desktop/help2.chm");
    }    
    catch (Exception ex)
    {
        ex.printStackTrace();
        System.out.println(ex.getMessage());
    }            
}         
  • 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-11T16:41:30+00:00Added an answer on June 11, 2026 at 4:41 pm

    Use getResourceAsStream(String name) or getResources(String name) and provide the package name and resource name separated and prefixed by ‘/’.

    For example if the resource is in the package Test:

    /Test/help.chm:

    Inside the class which you want to access the resource from you’d do (getResourceAsStream(String name)):

    InputStream is=getClass().getResourceAsStream("/Test/help.chm");
    

    or using getResources(String name):

    URL file=getClass().getResource("/Test/help.chm");
    

    for further help have a look at this great tutorial.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to open .chm help file when click on Help button. When i
i want to open .chm help file when click on Help button on swing
I want to open a specific subpage of my CHM -Help for my program.
I want to open a file in the folder ( /root/Desktop/HTMLFiles/sample.html ) as http://localhost/HTMLFiles/sample.html
A file name will be passed in from standard in. I want to open
I have help.html file in resource directory. I can open it from Eclipse these
i want to open a new pop up window when user click the button.But
I want to open some file from my application, file are created by the
I want to open a page in new tab of browser on button click.
I want to open a new window in button click.I have used a code.

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.