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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:58:57+00:00 2026-06-11T16:58:57+00:00

I’m starting a Java programming class at UCSD next week and I’m trying to

  • 0

I’m starting a Java programming class at UCSD next week and I’m trying to prepare over the weekend. There is a library called objectdraw.jar which comes with the book we will be using for our class projects. I am currently using Vim for my Java projects because most assignments will be simple and I am still trying to learn and master Vim.

Now to the question:

In C++ I am able to use #include with angled brackets <> to include headers in a default folder and #include with quotes “” to include local header files. It seems from what I’ve found with some Internet searches that you can’t do that with Java.

I tried putting the objectdraw.jar file in the same folder as my .java file for the first assignment, but it doesn’t find the library using the following code:

import java.awt.*;
import objectdraw.*;

When I searched online, the Gentoo HOWTO mentioned setting a CLASSPATH but then mentions that those instructions should be considered deprecated, but doesn’t provide further instructions.

The website where I downloaded the library http://eventfuljava.cs.williams.edu/library.html does not provide instructions for Vim, but does for other IDEs like Eclipse and Netbeans.

Can anyone tell me where I would place the .jar file to ALL my projects can find it, or can anyone point me to a resource where I might find an answer. I seem to be asking the wrong questions when searching online.

Thanks!

  • 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-11T16:58:59+00:00Added an answer on June 11, 2026 at 4:58 pm

    Look here for how to set classpath using command line options to any of the java sdk tools – java, javac. The page shows how to set the environment variable CLASSPATH as well as how to use the switch -classpath.

    In your case if you have the objectdraw.jar in the same directory as your source files, then you will need a command like this to compile –

    javac -classpath . MyClass.java
    

    and this to run

    java -classpath . MyClass
    

    You can also provide the full path to a jar file in the classpath and add multiple directories and jars. Such as -classpath .:/path/to/my.jar:/some/other/directory note paths and separators for *nix environment. on Windows it would be ; and \

    Edit: Note comment below for quoting paths with spaces in them.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm trying to select an H1 element which is the second-child in its group
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.