Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAXB sample in the JWSDP1.3

 
Tong Chen
Ranch Hand
Posts: 1011
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to use the JWSDP1.3 and tried to get the first example unmarshal-read running.
Used the ant to build it without problem.
Then I saw a Main.class was created under c:\jwsdp-1.3\jaxb\samples\unmarshal-read

Then under the same place, I tried to type in the commandline:
java Main
Then got the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
Anyone gets any ideas?
Thanks!
 
Greg T Robertson
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i believe most of the build.xmls in the samples have a task named run as well so do an "ant run" and it should work. otherwise manually place the jaxb libs on your classpath and run them
 
Tong Chen
Ranch Hand
Posts: 1011
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used:
java -classpath C:\jwsdp-1.3\jaxb\lib\*.jar; C:\jwsdp-1.3\jwsdp-shared\lib\*.jar Main
don't work?
 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try putting individual jar file names in classpath instaed of *.jar.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic