This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Java Migration from 1.4 to 1.6

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,
I am working on a Java Upgrade project from JDK 1.4 to JDK 1.6 Update 16(jdk1.6.0_16).
The project uses JAXB so I even changed the JAXB jars to latest version 2.2.
I made the changes in the build.xml pointing to 1.6 from 1.4
I am facing some problem with the JAXB jars.
I am getting "Cannot be resolved to a type" errors for few Java files in the code because of which the appropriate Jars are not being generated.

Please help me out as I am new to Migration stuff.

Thanks,
Anant
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Be aware that Java 6 includes JAXB, whereas Java 1.4 did not. So the external JAXB version you have may be older or younger than what Java 6 has, and thus causing trouble.

The way to use a different version than the one that comes with the JRE is described in http://java.sun.com/javase/6/docs/technotes/guides/standards/
 
Marshal
Posts: 74688
335
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And welcome to JavaRanch
 
Anant Kamat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just read the article but could not find any solution. Also the path mentioned in the page is not avaiable.
I am using JAXB version 2.2. I changed all the version numbers in the config files but to no use. The build still fails.
When I click on the build.xml failed path it shows me this
" <javac encoding="Cp1252" srcdir="src/java/com/sbc/sde" destdir="${sde.build.home}" debug="${compile.debug}" optimize="${compile.optimize}" source="1.6" target="1.6"> "

I changed the source and target from 1.4 to 1.6
 
Ulf Dittmer
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This: srcdir="src/java/com/sbc/sde" is most certainly wrong. Most likely it should be srcdir="src/java"
 
Anant Kamat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
My problem is resolved. Actually the problem was due to the XSD interpretation by JAXB 2.0
I had to make certain code changes.

Thanks for all your help.

Regards,
Anant
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic