Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run class from command line

Status
Not open for further replies.

ddddd

Programmer
Jan 10, 2002
11
0
0
US
Hi,

I am trying to run the class from command line (Windows98).
The main class is
c:\...\jbproject\HHHH\classes\hhhh\hhhhClass.class
I just cannot run it by:
c:\java c:\...\jbproject\HHHH\classes hhhh.hhhhClass
nor
c:\java c:\...\jbproject\HHHH\classes\hhhh hhhhClass

I hava checked that hhhhClass.java includes package hhhh and class hhhhClass and the main.

Can you help?
 
u need to add this path to your class path
"c:\...\jbproject\HHHH\classes"
 
Hi,

Thank you.

1. I made the .class from .java by JBuilder and the path is
c:\...\jbproject\HHHH\classes\hhhh\hhhhClass.class
2. I tried
c:\>java c:\...\jbproject\HHHH\classes\hhhh hhhh.hhhhclass
and got error
Exception in thread "main" java.lang.NoClassDefFoundRrror: c:\...\jbproject\hhhh\classes\hhhh
3. I have tried to set classpath without success
 
Hi,

your should include the path like this:

c:\java -classpath "c:\...\jbproject\HHHH\classes" hhhh.hhhhClass

Anjas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top