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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:44:50+00:00 2026-06-11T12:44:50+00:00

I have 3 jars: jar1, jar2 and jar3, in the same path who can

  • 0

I have 3 jars: jar1, jar2 and jar3, in the same path who can change in other pc (ex: c:\prova)

When I run jar1, it moves jar2 in the Windows Sturtup folder.

I want that jar2 simply activate jar3 at every windows startup, but of course it doesn’t find jar3 who is remained in the first path.

So I want that jar1 pass a reference (in this case the path c:\prova) to the jar2, when moving it, or at least on the first call to it.

I find it difficoult because:
I can’t write the path in a text file in jar2: text files in jars aren’t writable.

I can’t write the text file in the windows Startup folder: it will be opened at every win startup..

I can’t pass the path as a parameter, it will be good for the first call but I can’t store this value for the succesive calls.

Sorry for my bad english, thanks for any help!

  • 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-11T12:44:51+00:00Added an answer on June 11, 2026 at 12:44 pm

    To add the file Path.txt (with jar3’s path) in jar2:

    Runtime.getRuntime().exec("jar uf jar2.jar Path.txt");
    

    To read the file in jar2 (Startup is my class name):

            String s = "/Path.txt";
            is = Startup.class.getResourceAsStream(s);
            br = new BufferedReader(new InputStreamReader(is));
            while (null != (line = br.readLine())) {
                list.add(line);
            }
    

    Thank me!

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

Sidebar

Related Questions

I have added the .jars to my library and I can also instantiate other
I had a question about Java Class Path variables. If I have multiple jars
Does anyone have any idea if you can find source JARs on Maven repositories?
Hi all, I have about 10 jars and when I run my program I
It is possible to have 2 jars with the same name of class. Does
I have two jar files - jar1 and jar2. Both of them are located
So my understanding is that JARs can have a hierarchy of files and folders.
I'm using eclipse. In the WEB-INF/lib folder I have the following jars. jstl-api-1.2.jar jstl-impl-1.2.jar
I have an EAR file with a bunch of JARs in it, and one
I have two projects A and B both are built differently, but the jars

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.