Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

setting up classpath

Posted on 2002-05-07
1
Medium Priority
?
173 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 150 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

610 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