The Artima Developer Community
Sponsored Link

Java Buzz Forum
A case for cross-compilation

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Vlad Roubtsov

Posts: 20
Nickname: vladr
Registered: May, 2003

Vlad Roubtsov is a Java Q&A columnist for JavaWorld
A case for cross-compilation Posted: Jul 29, 2003 11:03 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Vlad Roubtsov.
Original Post: A case for cross-compilation
Feed Title: Java Curiosity Shop
Feed URL: http://www.blog-city.com/bc/
Feed Description: Java esoterics: things from "don't try this at home" category
Latest Java Buzz Posts
Latest Java Buzz Posts by Vlad Roubtsov
Latest Posts From Java Curiosity Shop

Advertisement
Here is an article on a very rarely discussed topic. Using correct -target and -bootstrap compiler options is not hard and yet few people or even enterprise software houses seem to do it, which I find quite odd. In any case, if you wanted to really understand how javac locates class definitions or what those "Compliance and Classfiles" Eclipse compiler options are really about, the article might prove interesting. As explained in the article, with a small effort you can control which Java platform versions your code is allowed to run on. This is in effect a partial solution to the Java versioning problem. It is kind of unfortunate that Java does not have a better one at the moment. It would have been great to be able to look at a .class file and detect programmatically which J2SE platforms it is compatible with. I hope the new metadata support coming in J2SE 1.5 will help in this area. I got the idea for my opening puzzle from an ADVANCED-JAVA discussion started by Attila Szegedi. He tells me that his example has already been used to convince JDOM people to build against 1.2.2 rt.jar. Also, I like the compiler in Eclipse a lot and have submitted a feature request for the compiler to warn you when you are using a target setting that is incompatible with the JRE library version. Looks like it will be supported as a new compiler warning in Eclipse 3.0. Hopefully, cross-compilation will become a common practice one day.

Read: A case for cross-compilation

Topic: Javelin, Yet Another Extensible Java Compiler From BEA Previous Topic   Next Topic Topic: A is for Axion ... Z is for Zaurus

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use