Results 1 to 4 of 4
- 02-08-2008, 12:56 PM #1
Member
- Join Date
- Feb 2008
- Posts
- 2
- Rep Power
- 0
Importing packages from the packages within same application.
Hello,
My question is about both importing packages and EJBs. I thought that here is the right place for my problem.
There are two projects which are named "client" and "server" in my application. In project "server", there exist a session bean and a class. In project "client", I want to use both session bean class and the other class of "server". I have import classes from "server" to "client". But in "client", the classes of "server" are not found. I couldn' t understand my mistake.
I hope, I could tell my problem as well.
Can you help me about this problem.
Thanks.Last edited by sta2003; 02-08-2008 at 12:58 PM. Reason: adding smt.
- 02-11-2008, 11:22 PM #2
Member
- Join Date
- Feb 2008
- Posts
- 16
- Rep Power
- 0
Just wanted to say, I have the same problem too. That was the same reason I joined this forum, and I've been looking around for a solution, but I haven't found anything.
I know that the classes you use for import, or when creating a package, each class has to be in the same folder, but still can't get a package to work.
Someone help please.
- 02-12-2008, 09:29 AM #3
Member
- Join Date
- Jan 2008
- Posts
- 8
- Rep Power
- 0
you must have both packages in the same directory
try compiling the class from outside the directory
eg:
in directory "samedir" u have both server and client..
compile from parent directory of samedir:
javac samedir/server/*.java
javac samedir/client/*.java
run from parent directory of samedir
this will work
- 02-12-2008, 11:03 AM #4
Member
- Join Date
- Feb 2008
- Posts
- 2
- Rep Power
- 0
thank you for your replies.
But I think I have forgetten to say that, there are two different projects under a unique application. They are in different directories. (the basic structure is like in the example)
example:
project1-server(package)
project2-client(package)
I wanted to use the methods of "client" within "server". But I couldn' t import "client" package to "server" package.
I have solved my problem and now I can import packages from other projects easily.
I use jdeveloper 10g for my projects and when I choose the dependencies from project properties of the project (where I want to import other packages),other projects are listed. If we select the projects from the list, we can import other packages.
I am not sure whether my explanation is clear. But I have solved my problem by this way.
Similar Threads
-
Using packages
By prfalco in forum New To JavaReplies: 5Last Post: 01-31-2008, 10:38 PM -
packages problem
By cew27 in forum New To JavaReplies: 5Last Post: 01-10-2008, 09:14 PM -
Commonly used packages
By Java Tip in forum Java TipReplies: 0Last Post: 12-17-2007, 10:05 AM -
packages
By ai_2007 in forum Advanced JavaReplies: 1Last Post: 07-31-2007, 12:10 PM
Bookmarks