Solved

setting up classpath

Posted on 2002-05-07
1
171 Views
Last Modified: 2013-11-23
Hi,

I have set my classpath to :

/opt/SUNWips/lib/com/ediet

but everytime i try to compile a java file which resides in /opt/SUNWips/lib, it says the files i'm trying to import which resides in /opt/SUNWips/lib/com/ediet
is not found.

After i jar all the files in the com directory and its subdirectories and set the classpath as :

/opt/SUNWips/lib/com/ediet/ediet.jar

it works! I would like to know is it possible to achieve the above..without having to do the jar file step?

Pls advise. Thanks.

0
Comment
Question by:osiruz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
mickoo earned 50 total points
ID: 6993683
That maybe because your Classes are in  the package
/opt/SUNWips/lib/com/ediet

and you have set the classpath to the directory ediet.
Try setting the classpath to the parent directory of opt.
ie: the directory that contains your opt directory.

The runtime for a class named com.org.Test expects to find it in a directory structure
com/org/Test.class
So your classpath should point to where your directory structure starts.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question