dcsimg
Packages
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ravi_raj
Posted On:   Monday, March 11, 2002 12:30 AM

I have defined an hierarchy of packages and organized the source files in appropriate subdirectories. root package : FlexIMA It has subdirectories : ByteCodeExtractor Precompiler AgentCreation I have placed a package statement for *.java files belonging to respective packages . For eg : In Precompiler .. package FlexIMA.Precompiler ; I want to use the classes defined in ByteCodeExtractor and Precompiler in the *.java files of AgentCreation. For eg : I have a source file called Creator.java in which the first few lines are ... package FlexIMA.AgentCreation ; import FlexIMA.Precompiler.* ; import Flex   More>>

I have defined an hierarchy of packages and organized the source files in appropriate subdirectories.


root package : FlexIMA

It has subdirectories :
ByteCodeExtractor

Precompiler

AgentCreation

I have placed a package statement for *.java files belonging to respective packages .

For eg : In Precompiler ..

package FlexIMA.Precompiler ;

I want to use the classes defined in ByteCodeExtractor and Precompiler in the *.java files of AgentCreation.

For eg : I have a source file called Creator.java in which the first few lines are ...

package FlexIMA.AgentCreation ;

import FlexIMA.Precompiler.* ;

import FlexIMA.ByteCodeExtractor.* ;

Whenever i compile the *.java files in AgentCreation package i get errors of the form : "Package not found"

What is the solution to it ?

   <<Less

Re: Packages

Posted By:   Sean_Ruff  
Posted On:   Monday, March 11, 2002 06:03 AM

Sounds like you haven't set up your classpath correctly



If the folder FlexIMA is located at c:JavaProjectsFlexIMA

then you could do the following:

javac -classpath c:JavaProjects *.java


Hope this helps.
About | Sitemap | Contact