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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:21:45+00:00 2026-05-23T08:21:45+00:00

Created small Java application using Netbeans IDE. In package cntp is my source file

  • 0

Created small Java application using Netbeans IDE.
In package cntp is my source file from which i load neural network:

NeuralNetwork myNeuralNetwork = NeuralNetwork.load("src\\nwork\\nfile.nnet");

This static method has 2 overloads:

public static NeuralNetwork load(String filePath);
public static NeuralNetwork load(InputStream inputStream);

I placed file nfile.nnet in nwork package.

Everything works when i run application from Netbeans but when i copy the content of “dist”
folder somewhere else and execute jar it doesn’t find the dependent nfile.nnet.
So i need the way to make my application path portable. How to achieve this?

Solution thx to @RC and @Aaron Digulla from referenced post:
InputStream is=ClassLoader.class.getResourceAsStream("/nwork/nfile.nnet");
NeuralNetwork myNeuralNetwork = NeuralNetwork.load(is);

  • 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-23T08:21:45+00:00Added an answer on May 23, 2026 at 8:21 am

    You can use resources. see Getting the inputstream from a classpath resource (XML file)

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

Sidebar

Related Questions

I have created a small application which opens,reads and creates Excel files. The app
I want to globalize my application. I have created a small form which asks
I have just created a mid-sized web-application using Java, a custom MVC framework, javascript.
I want to create a small java application to copy some wiki content from
I created a small application to read some files from the disk and zip
We are going to implement a small java application with BDD, which reads an
I'm developing bunch of relatively small Spring based java web-application. I'm mostly using annotations
I'm writing a small demo application in Java using Spring, that needs to have
I am trying to create a small Java application using Tomcat and am having
I was created one small business application..Here I got the data from server and

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.