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

  • Home
  • SEARCH
  • 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 6368549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:41:24+00:00 2026-05-25T00:41:24+00:00

I am actually loading OWL files in my java web app with the following

  • 0

I am actually loading OWL files in my java web app with the following code:

InputStream is = Dummy.class.getResourceAsStream("content.owl");

I created Dummy.class in the same package as content.owl is to get access to this file.

Is there a (refactor-safe) way to load content.owl directly without the need of a dummy class?

  • 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-05-25T00:41:24+00:00Added an answer on May 25, 2026 at 12:41 am

    I think you should be able to get that resource from any class by giving relative path of it according to location of output folder where your compiled files are put.

    For example initially the resource file in proj/src/a/b/content.owl package and the class I access this resource is in package proj/src/a/b/c/d/MyClass.java. After building the project my executables go under bin folder and the class I access the resource goes to proj/bin/a/b/c/d/MyClass.class directory and resource goes into proj/bin/a/b/content.owl.

    And as bin folder is specified as the output folder in classpath of my project, I can access to resource with the code:

    InputStream is = MyClass.class.getResourceAsStream("/a/b/content.owl");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Actually i'm using xml files for my web pages configuration , xml files contain
I am actually loading a page as a modal dialog box as window.showModalDialog(url.aspx). The
Actually my question is all in the title. Anyway: I have a class and
Is it possible to read the GUID from the Assembly without actually loading it
With all the smarts of actually loading images being done by the .net framework,
Basically I have an app that would require things(around 20 index files) to be
I was just thinking that when should I actually consider loading more than one
My problem is actually not the ajax loading itself, more the capability to load
I've (actually my classmate) got a problem with loading local ZEND_AMF services on Windows
I have got quite slow query (actually this is data loading from mysql.dump). Now

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.