A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
running a class in a package
Joined: Jan 07, 2003
Jul 01, 2004 12:21:00
I have the following dir structure
all the class files are in dir d. the package name is c.d
to run class with main method I do the following
I get an error saying classNotFoundException for classWithMain
Joined: Mar 13, 2004
Jul 01, 2004 12:33:00
Do you have installed JVM properly? 'cause your consecution is right.
Jos� Alberto Mu�iz Navarro
Joined: Oct 27, 2003
Jul 01, 2004 13:36:00
c:\exam\a\b java c.d.classWithMain
Do you actually say
cd c:\exam\a\b ?
Are you sure your current working directory upon the java call is b?
I agree. Here's the link:
subject: running a class in a package
Doubt in ch-10(Kathhy Sierra)
Theoretical doubt from K&B book : File.separator
class not found
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015