Solved

setting up classpath

Posted on 2002-05-07
1
168 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
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now