This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes How to create a JAXB Context from File System Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

How to create a JAXB Context from File System

Shaan Shar
Ranch Hand

Joined: Dec 27, 2005
Posts: 1249

Hi I was writing an unmarshaller for JAXB, but for that first I need to create a JAXB Context.

Here is the sample code I am using





Now if I am trying to run this Main class from c:\temp\doc\testproject and my JAXB Objects are somewhere else, how can I create a JAXB Context for that packge.
If I am doing the same code at the same folder where JAXB objects are kept then it's working fine but with different folder it's not working.Please check at line 28 and 29.

Please let me know if you didn't understand the issue exactly.

Thanks
Ankur
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

Please continue any discussion in the XML forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create a JAXB Context from File System