PDA

View Full Version : Help java problem,when importing a class to another folder


Ms_mary10
02-12-2009, 03:43 PM
problem importing


im trying to run a this class Helloworld.java which is in folder
SVNLOCAL\src\com\xxx\application
it needs Helloworldcommand

Class Helloworldcomand.java which is in
SVNLOCAL\src\com\xxx\changes\command


i have tried to import Helloworldcommand.java
using
import com.xxx.changes.command.Helloworldcommand;
i have packaged it using

nb:both classes have been packaged in their respective folders
ie package com.xxx.changes.command for Helloworldcommand.java

and package com.xxx.application for Helloworld.java

but i an getting alot of errors,what cold be wrong?:confused:

shyam
02-12-2009, 03:48 PM
what errors?

Ms_mary10
02-12-2009, 04:05 PM
Ok Class Helloworldcommand implements a class Command and CommandException class in the same folder
SVNLOCAL\src\com\xxx\changes\command.

when i compile Class Helloworld in folder
SVNLOCAL\src\com\xxx\application
which imports Helloworldcommand.java

im getting errors such as
class Command not found
class CommandException not found

servlet
02-13-2009, 06:55 AM
Can u post the errors here? Again, how do you compile this classes, I mean from which directory you executed javac command? post the command that you used to compile, here.

Have you configured CLASSPATH properly?