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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:03:50+00:00 2026-06-09T21:03:50+00:00

I am having a problem using the custom jar libraries (algs4.jar/stdlib.jar from http://algs4.cs.princeton.edu/home/ )

  • 0

I am having a problem using the custom jar libraries (algs4.jar/stdlib.jar from http://algs4.cs.princeton.edu/home/) with the command prompt. I added the libraries to the IntelliJ classpath setting (project sturcture -> SDKs -> classpath) and am able to use their classes with no problems using IntelliJ.

However, I also want to be able to use these libraries in the command prompt. Even though I had no CLASSPATH variable set in my Windows settings I’ve been able to use javac/java in cmd with no problems when using the standard java libraries. (Probably because IntelliJ sets the CLASSPATH for all the standard libraries on every startup/compile to work systemwide). However, even after adding the 2 jars to the IntelliJ classpath setting, I wasn’t able to use “javac” in cmd. I then created the CLASSPATH variable in windows settings, and added the jars to them. After this I was able to compile with javac with no problems. However, when I try to run the program in cmd, I get this:

“Error: Could not find or load main class “.

I get this error whenever I uses ANY of the jar libraries, including the standard ones, with which I didn’t have problems prior to setting the Windows CLASSPATH. I guess what happens is once I set my own CLASSPATH this overrides the classpath set by intelliJ. When I removed the CLASSPATH, I was once again able to compile and run the standard libraries in cmd, but not the 2 custom libraries.

Please 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-09T21:03:52+00:00Added an answer on June 9, 2026 at 9:03 pm

    You should make these libraries a part of the project by adding them to the module dependencies as a library instead of the JDK, then you can produce an artifact jar file that will have all the dependencies inside or near the jar and referenced via the jar manifest file classpath. See also the artifacts help section.

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

Sidebar

Related Questions

I am having a problem with filling a ShapeDrawable containing a custom PathShape using
I'm having a problem using the sed substitution option that executes a command in
I'm having a problem using custom components at runtime. I have this custom FlowLayoutPanel
I'm using StackContainer as a menu but I'm having a problem to attach custom
I’m having a problem when using django custom commands on Heroku. On my local
I'm having a problem while trying to call a custom Model method from my
I have been having a strange problem using a custom delegate class in ARC.
I am having problems using my custom class with a std::map. The class dynamically
I am having problem using mvc:resources in spring 3.1 configuration. Initially i was working
I'm having a problem using UpdateModel(theModelToUpdate) causing concurrency issues. Basically whats happening is, there

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.