supersdar / collide

Automatically exported from code.google.com/p/collide
Apache License 2.0
0 stars 0 forks source link

ant dist fails to pick the right version of java? #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
$ ant dist
Buildfile: /home/hemanth/lab/collide/build.xml

src.shared.build:
    [mkdir] Created dir: /home/hemanth/lab/collide/bin/classes
    [javac] Since compiler setting isn't classic or modern, ignoring fork setting.
    [javac] Compiling 63 source files to /home/hemanth/lab/collide/bin/classes

BUILD FAILED
/home/hemanth/lab/collide/java/com/google/collide/shared/build.xml:7: The 
following error occurred while executing this line:
/home/hemanth/lab/collide/macros.ant.xml:89: Class not found: javac1.7

Total time: 1 second

$ uname -a
Linux hemanth-OptiPlex-755 2.6.35-32-generic #65-Ubuntu SMP Tue Jan 24 13:48:14 
UTC 2012 i686 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 10.10
Release:    10.10
Codename:   maverick

$ javac -version
javac 1.7.0_03

$ java -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) Server VM (build 22.1-b02, mixed mode)

Original issue reported on code.google.com by hemanth...@gmail.com on 5 Jul 2012 at 5:25

GoogleCodeExporter commented 8 years ago
What ant version are you running?  This error looks like Ant failing to find 
the right class.

Assigning to Freeland, I think he wrote the build.properties.

Original comment by dragonsinth on 5 Jul 2012 at 6:26

GoogleCodeExporter commented 8 years ago
To make it work in ubuntu, I had to use a ppa installer to get java7 setup 
right http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html

Also make sure you set JAVA_HOME and ANT_HOME in .bashrc.

And you should also check ant -version as well.  <1.8.4 = no go.

Original comment by Ja...@wetheinter.net on 5 Jul 2012 at 6:30

GoogleCodeExporter commented 8 years ago
Should be fixed now.
9d9db58011dced140f542ba8b6aa5e37e6c7b417

Original comment by dragonsinth on 5 Jul 2012 at 4:51

GoogleCodeExporter commented 8 years ago
As suggested, I pinned to ant 1.8... we are using the "javac1.7" word 
(introduced in ant 1.8.2, though we could have instead used "modern" as its 
synonym).  But in practice I think we all have been using 1.8.2-or-4, and 
pinning seems to avoid any such confusions in the future.

As a side note, however, anything in build.properties can be overridden by 
creating your own local.properties, and setting it there, so (previously) if 
you wanted to use ant 1.7, you could have set javac.compiler=modern there, and 
I think it would have worked... unless there is some other dependency, which I 
hadn't noticed, and that possibility is why I agreed to pin it.

Side fix in the same update, "ant clean" will now recreate the generated source 
directories, which helps keep Eclipse from whining if they go mis sing.

Original comment by srthomas...@gmail.com on 5 Jul 2012 at 10:55

GoogleCodeExporter commented 8 years ago
BUILD FAILED
/home/hemanth/lab/collide/java/com/google/collide/client/build.xml:69: The 
following error occurred while executing this line:
/home/hemanth/lab/collide/macros.ant.xml:197: Java returned: 1

Original comment by hemanth...@gmail.com on 9 Jul 2012 at 9:51