Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Could u please tell me how can I plug-in JAXB to JBuilder?

  Asked By: Michael    Date: Oct 31    Category: Java    Views: 572
  

I'm very thankful if anyone helps me running a sample of Java to XML binding by using of JAXB, even without JBuilder.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Tamara Nguyen     Answered On: Oct 31

I have an experience in this field,
At first, you should have an Schema that jaxb  create Objects from it.
and then you should write an ant task to do it (create objects from schema).
the lib should be these jar files :

1- activation.jar
2- jaxb1-impl.jar
3- jaxb-api.jar
4- jaxb-impl.jar
5- jaxb-xjc.jar
6- jsr173_1.0_api.jar

and ant task should be like this :


<property name="jaxb.home" value="."/>

<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
<classpath refid="build.classpath"/>
</taskdef>

<target name="JAXB" description="Compile all java  source files">
<echo message="Compiling the schema..."/>
<xjc schema="view/schema/opxiActivityLog.xsd" package="com.project.opxi.manager.adaptor.JaxbObject" destdir="${opxi.src.dir}">
<produces dir="${opxi.src.dir}/com/project/opxi/manager/adaptor/JaxbObject/JaxbObject" includes="**/*.java" />
</xjc>
<echo message="Compiling the java source files..."/>

<javac destdir="${classes.dir}"
debug="true"
fork="true"
source="1.5"
classpathref="build.classpath">
<src path="${opxi.src.dir}/${src.classes.prefix}/adaptor/JaxbObject"/>
<!--<classpath refid="build.classpath" />-->
</javac>
</target>

and then you could get these Objects.

 
Answer #2    Answered By: Ujala Hashmi     Answered On: Oct 31

Im really new into this jaxb  and if u can explain to me a bit what you
mean by creating an ant task it would be of great help.......

 
Didn't find what you were looking for? Find more on Could u please tell me how can I plug-in JAXB to JBuilder? Or get search suggestion and latest updates.




Tagged: