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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:16:41+00:00 2026-06-03T03:16:41+00:00

I am using some API in which there is a class Reader which have

  • 0

I am using some API in which there is a class Reader which have a method readXml(String path)

now when i use this method and give some path which in my computer like

           Reader reader = new Reader();
           reader.readXml("C:\\work\\myfile.xml");

it always faile to read the file

In there API documentation it is mentioned

      readXml(java.lang.String resourcePath) 
      Loads the orthography model, from the specified embedded JAR resource.

so do i need to put my file in some embedded jar resources ,if yes what would be the way of doing it and then reading from it

Thanks

  • 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-03T03:16:42+00:00Added an answer on June 3, 2026 at 3:16 am

    The wording is a bit strange, but I think that what the documentation means is that the resource path is a path used by the classloader to load a resource. The file is thus not searched in the file system, but in the classpath, following the rules detailed in ClassLoader.getResource().

    So, the XML file should be accessible from the classpath. Suppose c:\work is in the classpath, the resource path should thus be "myfile.xml" or "/myfile.xml" depending on how this method is implemented. If c:\ is in the classpath, then the path should be "work/myfile.xml" or "/work/myfile.xml".

    If this library is a general-purpose API and is well-designed, it should accept something other than a resource path as argument, like a java.io.Reader or java.io.InputStream.

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

Sidebar

Related Questions

I have been using the AddressBook api of the iPhone for some time now.
I have a method wrapping some external API call which often returns null .
Assuming I'm using some graphic API which allows me to draw bezier curves by
Is there any way using foursquare api or some other location based api to
I have an app using the EWS API. Some computers using Exchange 2003 and
I'd like to use SQLiteCursor class to fetch data (not using Cursor class). This
Can we accomplish on Winforms both Tunneling and Bubbling? Maybe by using some API
I am using the jquery ajax api so load in some content, the code
I am trying to retrieve some data from an API using CURL request. Is
I am working on some Plesk integration using the XML API and I am

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.