wukoje / openjdk-osx-build

Automatically exported from code.google.com/p/openjdk-osx-build
0 stars 0 forks source link

Unable to locate the Javac Compiler in: /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/1.7.0.jre/Contents/Home/../lib/tools.jar #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download OpenJDK-OSX-1.7-universal-20110915.dmg or > 20110915
2. Drag 1.7.0.jdk to folder as instructed
3. Set JAVA_HOME and PATH to that jdk
4. Try to build a java (Maven) project.

1.
....$JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home
2.
cd /Users/rami/NetBeansProjects/RubinSuite; 
JAVA_HOME=/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home 
"/Applications/NetBeans/NetBeans 
7.0.1.app/Contents/Resources/NetBeans/java/maven/bin/mvn" -DskipTests=true 
--also-make --projects org.swailem:modules-startup install

3.
[INFO] --- maven-compiler-plugin:2.4-SNAPSHOT:compile (default-compile) @ 
modules-actions ---
[INFO] Compiling 18 source files to 
/Users/rami/NetBeansProjects/RubinSuite/actions/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] Unable to locate the Javac Compiler in:
  /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/1.7.0.jre/Contents/Home/../lib/tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.338s
[INFO] Finished at: Fri Sep 23 13:24:59 CEST 2011
[INFO] Final Memory: 12M/145M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:2.4-SNAPSHOT:compile 
(default-compile) on project modules-actions: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] 
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/1.7.0.jre/Contents/Hom
e/../lib/tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.

What is the expected output? What do you see instead?
BUILD SUCCESS :)
[INFO] BUILD FAILURE

What version of the product are you using? On what operating system?

Mac osx 10.7.1

Please provide any additional information below.

OpenJDK-OSX-1.7-universal-20110913.dmg  work perfect

greetz palman

Original issue reported on code.google.com by Ram...@googlemail.com on 23 Sep 2011 at 11:32

GoogleCodeExporter commented 9 years ago
Could you provide Maven poms ?

To me, it's something related to tools.jar location algorithm used for OS/X.
Correct location is 
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/lib/

Original comment by henri.gomez on 30 Sep 2011 at 9:01

GoogleCodeExporter commented 9 years ago
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>Rubin</artifactId>
        <groupId>org.swailem</groupId>
        <version>3.0.0-SNAPSHOT</version>
    </parent>
    <groupId>org.swailem</groupId>
    <artifactId>modules-startup</artifactId>
    <version>3.0.0-SNAPSHOT</version>
    <packaging>nbm</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-netbeans-api-annotations-common</artifactId>
            <version>RELEASE701</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-modules</artifactId>
            <version>RELEASE701</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-util</artifactId>
            <version>RELEASE701</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-dialogs</artifactId>
            <version>RELEASE701</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-awt</artifactId>
            <version>RELEASE701</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>modules-login</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>modules-manager</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>jxl</artifactId>
                    <groupId>jexcelapi</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jcommon</artifactId>
                    <groupId>jfree</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>jfreechart</artifactId>
                    <groupId>jfree</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>beansbinding</artifactId>
                    <groupId>org.jdesktop</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-util-lookup</artifactId>
            <version>RELEASE701</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.modules</groupId>
            <artifactId>org-netbeans-modules-editor-settings-storage</artifactId>
            <version>RELEASE701</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.netbeans.api</groupId>
            <artifactId>org-openide-windows</artifactId>
            <version>RELEASE701</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>buildnumber-maven-plugin</artifactId>
            <version>1.0</version>
            <exclusions>
                <exclusion>
                    <artifactId>maven-scm-api</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-manager-plexus</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-clearcase</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-cvs-commons</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-cvsexe</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-git-commons</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-gitexe</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-hg</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-perforce</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-bazaar</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-starteam</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-svn-commons</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-svnexe</artifactId>
                    <groupId>org.apache.maven.scm</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-scm-provider-svnjava</artifactId>
                    <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>plexus-interactivity-api</artifactId>
                    <groupId>org.codehaus.plexus</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>plexus-container-default</artifactId>
                    <groupId>org.codehaus.plexus</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>plexus-utils</artifactId>
                    <groupId>org.codehaus.plexus</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>sqljet</artifactId>
                    <groupId>org.tmatesoft.sqljet</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>svnkit</artifactId>
                    <groupId>org.tmatesoft.svnkit</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>wagon-provider-api</artifactId>
                    <groupId>org.apache.maven.wagon</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-profile</artifactId>
                    <groupId>org.apache.maven</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-project</artifactId>
                    <groupId>org.apache.maven</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-artifact</artifactId>
                    <groupId>org.apache.maven</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-artifact-manager</artifactId>
                    <groupId>org.apache.maven</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-core</artifactId>
                    <groupId>org.apache.maven</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-model</artifactId>
                    <groupId>org.apache.maven</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-plugin-api</artifactId>
                    <groupId>org.apache.maven</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>maven-settings</artifactId>
                    <groupId>org.apache.maven</groupId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>nbm-maven-plugin</artifactId>
                <extensions>true</extensions>
                <version>3.6</version>
                <configuration>
                    <keystore>../keystore</keystore>
                    <keystorealias>rami</keystorealias>
                    <keystorepassword>*****</keystorepassword>
                    <useDefaultManifestFile>true</useDefaultManifestFile>
                </configuration>

            </plugin>

            <plugin>
                <!-- NetBeans 6.9+ requires JDK 6 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.4-SNAPSHOT</version>
                <configuration>
                    <verbose>true</verbose>
                    <source>1.7</source>
                    <target>1.7</target>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4-SNAPSHOT</version>
                <configuration>
                    <!-- to have the jar plugin pickup the nbm generated manifest -->
                    <useDefaultManifestFile>true</useDefaultManifestFile>
                    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <id>generate-buildnumber</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                        <configuration>
                            <format>{0,number}</format>
                            <items>
                                <item>buildNumber</item>
                            </items>
                            <buildNumberPropertiesFileLocation>${basedir}/src/main/resources/org/swailem/core/startup/Bundle.properties</buildNumberPropertiesFileLocation>
                            <buildNumberPropertyName>buildNumberSeq</buildNumberPropertyName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>generate-timestamp</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                        <configuration>
                            <format>{0,date,yyyyMMddHHmm}</format>
                            <items>
                                <item>timestamp</item>
                            </items>
                            <buildNumberPropertiesFileLocation>${basedir}/src/main/resources/org/swailem/core/startup/Bundle.properties</buildNumberPropertiesFileLocation>
                            <buildNumberPropertyName>buildDate</buildNumberPropertyName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>
    <name>RubinSuite - Startup</name>
</project>

Original comment by Ram...@googlemail.com on 30 Sep 2011 at 9:48

GoogleCodeExporter commented 9 years ago

Original comment by henri.gomez on 30 Sep 2011 at 10:27