Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-08-2008, 01:56 PM
Member
 
Join Date: Feb 2008
Posts: 2
sta2003 is on a distinguished road
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 01:58 PM. Reason: adding smt.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-12-2008, 12:22 AM
Member
 
Join Date: Feb 2008
Posts: 16
Deathmonger is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 02-12-2008, 10:29 AM
Member
 
Join Date: Jan 2008
Posts: 8
praveena is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 02-12-2008, 12:03 PM
Member
 
Join Date: Feb 2008
Posts: 2
sta2003 is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using packages prfalco New To Java 5 01-31-2008 11:38 PM
packages problem cew27 New To Java 5 01-10-2008 10:14 PM
Commonly used packages Java Tip Java Tips 0 12-17-2007 11:05 AM
using Packages JavaForums Java Blogs 0 11-15-2007 06:50 PM
packages ai_2007 Advanced Java 1 07-31-2007 01:10 PM


All times are GMT +3. The time now is 08:39 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org