Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Running classfile...

Posted on 1998-07-28
6
Medium Priority
?
211 Views
Last Modified: 2010-03-30
i am having trouble running a class that i have created.  I have also created a package that i am importing.

When i run the class i get the following error:
"Can't find class Udl"

I am running the class by entering the following command:

java Udl

Hope you can help.
Thanks in advance!

[NOTE]
I am not creating the Udl classfile as a package.
0
Comment
Question by:jefftk99
  • 4
  • 2
6 Comments
 

Author Comment

by:jefftk99
ID: 1228712
Edited text of question
0
 

Author Comment

by:jefftk99
ID: 1228713
Adjusted points to 50
0
 
LVL 5

Expert Comment

by:fontaine
ID: 1228714
Assuming that Udl.class is in c:\test, does the following work?

c:\test> SET CLASSPATH=.;c:\pathtopackage\package.jar
c:\test> java Udl
0
Technology Partners: 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!

 

Author Comment

by:jefftk99
ID: 1228715
i am all set now.  Thanks!
0
 

Author Comment

by:jefftk99
ID: 1228716
you may want to lock this question so i can grade it...
0
 
LVL 5

Accepted Solution

by:
fontaine earned 200 total points
ID: 1228717
Solution:

     c:\test> SET CLASSPATH=.;c:\pathtopackage\package.jar
     c:\test> java Udl

The VM search for classes that are in the classpath. The SET ... sets the classpath to include
the current directory, containing the main class as well as the library that it uses.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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 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…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
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…
Suggested Courses

972 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