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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:22:27+00:00 2026-06-15T15:22:27+00:00

I have a Java project with a large classpath – many of the items

  • 0

I have a Java project with a large classpath – many of the items are imported from different .jar files that have been added as dependencies (via Maven).

I’m looking for a programmatic way to list all the items on the classpath that come from the current project, i.e. excluding all the imported classpath items from other libraries and the Java runtime environment itself.

I need to do this at runtime, i.e. it should work off the actual current classpath.

Is there a good way to do this, and if so how?

  • 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-15T15:22:28+00:00Added an answer on June 15, 2026 at 3:22 pm

    There is no way to do this unless you create your own metadata.

    To the JVM, there is no distinction between items in the classpath. A jar is a jar is a jar.

    You can use the maven-dependency-plugin to write out a list of the dependencies that are local, and not transitive, and write that into a file, and put that file in your application.

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

Sidebar

Related Questions

We have a large (somewhat unwieldy) project, that definitely has files, both Java classes
I have a Rails 3 project that uses some java jar files. I'm putting
I have a Java application (a quite large one with many external .jar dependencies
I have many large files under project/public/deploy/. All the rest is my source codes.
I have a project in Java requiring to load large files (corpus for NLP)
I have been given a large PHP project that I am supposed to fix
I have a java project that uses JPA 2/Hibernate 3.5.6 for data access and
I have a Java project that needs a addon interface. I was thinking about
I have a Java project in Eclipse with ~10 packages and ~10 class files
I have a Java project that I'm trying to implement with a model-view-controller design.

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.