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 08-06-2007, 08:53 PM
Member
 
Join Date: Aug 2007
Posts: 25
Josiah.Haswell is on a distinguished road
Netbeans Platform and Module Dependencies
Hello everyone,

I've just begun to use the Netbeans Platform, and I have to say it's amazing. However, I have a question regarding module dependencies.

For one of my projects I'm using several external libraries. Over the course of the next year or so, I plan on writing at least several modules, each of which is in some way dependent upon the external libraries. It seems inefficient to add the external libraries (in the form of JAR files) to each module. Does anyone know of a way I could add the libraries to just one module, and add that module as a dependency for all of the other modules? I've tried creating a "core" module with all of the jars added to its classpath, and then adding that single module as a module dependency for all of the others, but I can't seem to access the code in the core module.

Any help would be tremendously appreciated.

Joe
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-06-2007, 08:58 PM
Senior Member
 
Join Date: Dec 2006
Posts: 748
levent is on a distinguished road
Hi Joe,

As far i understand you are looking for "Library Wrapper Module Project". Select File -> New Project -> Netbeans Plug-in Modules. You should see that project type at the right panel. Follow the instructions to add your jar files to that project. And once that project is created, add dependency of it to your other modules.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-06-2007, 09:14 PM
Member
 
Join Date: Aug 2007
Posts: 25
Josiah.Haswell is on a distinguished road
Thanks very much. It looks like that's what I was looking for.

Joe
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 08-06-2007, 11:11 PM
Member
 
Join Date: Aug 2007
Posts: 25
Josiah.Haswell is on a distinguished road
I'm sorry, I have one last question: Two of the libraries by default share the same code name base (e.g. xalan and xerces share org.apache). Should I wrap them in the same module, or should I change the code name base on one of them? (Will changing the code name base mess up the internal imports?).


Thanks!

Joe
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 08-06-2007, 11:49 PM
Senior Member
 
Join Date: Dec 2006
Posts: 748
levent is on a distinguished road
Hi again Joe,

I dont have enough experience on this but i think changing names space should not be a good idea for long term maintainability of the project.

By the way, as far as i remember there should already be a xerces module available inside netbeans. You might use that too. I have the Netbeans RCP book. I remember that they already have a Apache library included and i guess that was Xerces. I can check it if you can not find relevant information..
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 08-06-2007, 11:59 PM
Member
 
Join Date: Aug 2007
Posts: 25
Josiah.Haswell is on a distinguished road
Ok. Thanks for the tip. I'll try to work around it.

Joe
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 08-07-2007, 12:02 AM
Senior Member
 
Join Date: Dec 2006
Posts: 748
levent is on a distinguished road
Let us know your decision if possible..
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 08-07-2007, 12:06 AM
Member
 
Join Date: Aug 2007
Posts: 25
Josiah.Haswell is on a distinguished road
Will do!

Joe
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 08-07-2007, 12:48 AM
Member
 
Join Date: Aug 2007
Posts: 25
Josiah.Haswell is on a distinguished road
I've discovered that wrapping two jars that share the same namespace into one module wrapper doesn't appear cause problems, and seems to be working. I've yet to see how this will affect maintainability. If you add any Netbeans module that shares a namespace it causes the same problem.

Joe
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 08-07-2007, 01:04 AM
Senior Member
 
Join Date: Dec 2006
Posts: 748
levent is on a distinguished road
But don't those libraries has their own namespace (e.g. org.apache.xerces and org.apache.xalan)?
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 08-07-2007, 01:43 AM
Member
 
Join Date: Aug 2007
Posts: 25
Josiah.Haswell is on a distinguished road
Gah. They do, but the problem doesn't become apparent until you try to use the module. Sorry, I was mistaken.

I'm going to try to add them as libraries to an empty module, and then see if I can access them through that one.

Joe
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
Plugin project - Dependencies page (II) JavaForums Java Blogs 0 01-28-2008 12:40 AM
Plugin project - Dependencies page (I) JavaForums Java Blogs 0 01-28-2008 12:40 AM
JDeveloper Dependencies pringle New To Java 0 01-09-2008 01:44 AM
Calling A Session Bean Using A Web Module JavaForums NetBeans 0 07-31-2007 12:13 AM
Netbeans platform - JDBC module sara NetBeans 2 07-10-2007 02:21 PM


All times are GMT +3. The time now is 11:49 PM.


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