You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by swaroopk <ku...@gmail.com> on 2011/05/17 08:13:03 UTC

Java concurrent classes compile issue

Hi,

I am trying to compile my source with java compiler 1.6.
JAVA_HOME, path contains path to jdk 1.6. In my project's pom.xml 
I have mentioned jdk version like this,
       <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
		<version>2.3.2</version>		
        <configuration>       		  
		  <compilerVersion>1.6</compilerVersion>
        </configuration>
      </plugin>

     <properties>
		<targetJdk>1.6</targetJdk>
    </properties>

When I try to compile source code, it gives following error,
cannot find symbol
symbol  : method
invokeAll(java.util.Collection&lt;com.test.MyCallable&lt;Result&gt;>)
location: interface java.util.concurrent.ExecutorService

I understand that class MyCallable is ? extends Callable, and it should run
fine on jdk 1.6,
but still it gives above error. From where does it takes 1.5 for
compilation?

--
View this message in context: http://maven.40175.n5.nabble.com/Java-concurrent-classes-compile-issue-tp4402714p4402714.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Java concurrent classes compile issue

Posted by Wayne Fay <wa...@gmail.com>.
>        <configuration>
>                  <compilerVersion>1.6</compilerVersion>
>        </configuration>
>                <targetJdk>1.6</targetJdk>

This configuration is simply not correct. See the documentation.

http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Java concurrent classes compile issue

Posted by swaroopk <ku...@gmail.com>.
I tried mvn clean and I get following warning during compile time,

Unable to autodetect 'javac' path, using 'javac' from the environment.

--
View this message in context: http://maven.40175.n5.nabble.com/Java-concurrent-classes-compile-issue-tp4402714p4402766.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org