It's not a secret anymore!*
The moose likes Ant, Maven and Other Build Tools and the fly likes Help with ant warning during build Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Help with ant warning during build" Watch "Help with ant warning during build" New topic
Author

Help with ant warning during build

David Garratt
Ranch Hand

Joined: Aug 08, 2003
Posts: 196

I am working on a OSX Mountain Lion Machine. I have exported the ant build.xml file from my Eclipse project. I have both java 1.6 (apple) and java 1.7 (oracle) installed however from the command prompt java 1.7 is the default. I need to keep my project compatible with Java 1.6 for now.

When I run the build I get the warning message :-

[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6




My attempts at googling this message or fragments of it have not proved very helpful - I'm assuming that it's (maybe) something to do with me running the java 1.7 compiler on a project flagged for 1.6 - but that just a guess.

If someone could give me some idea of what I need (if anything) to do in order to correct this it would be most helpful.

My java 1.7 is installed in this location :- /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk
My java 1.6 is installed in this location :- /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home


Dave
David Garratt
Ranch Hand

Joined: Aug 08, 2003
Posts: 196

Further research has found this which seems to confirm my suspicions https://blogs.oracle.com/darcy/entry/how_to_cross_compile_for

However I am a little unsure about the syntax (path) I need to use.

I have the path /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents to my Apple 1.6 JDK - but it has a number of directories under it and I'm unsure which of these I need to reference.

I've also stumbled across /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes which maybe an alternative as well.

Dave
David Garratt
Ranch Hand

Joined: Aug 08, 2003
Posts: 196

In case it helps anyone I think I have the solution as follows:-

 
Consider Paul's rocket mass heater.
 
subject: Help with ant warning during build
 
Similar Threads
Cannot build war with Spring Beans File included
can't generate JUnit report
Ant: earExport is not working with Jdk 1.4
creating long classpath?
ServletTestCase::request is not accessible my test class, which extends jspTestCase.