Solved

setting up classpath

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
eclipse apache tomcat admin console 52 156
how to debug htl and js pages 8 58
Is Applet the way to go for my drag and drop system? 8 36
Java Eclipse Loop 3 31
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

730 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