What am I doing wrong? hg: lambda/lambda/langtools: More bug fixes:
Howard Lovatt
howard.lovatt at gmail.com
Tue Aug 17 19:33:28 PDT 2010
Hi Maurizio,
If I set up a couple of variables to make commands shorter and clearer:
howard-lovatts-computer-3:src lov080$ echo $jdk
/Users/lov080/Dropbox/Personal/Java/JDK7/langtools/dist/bin
howard-lovatts-computer-3:src lov080$ echo $hglibs
/Users/lov080/Dropbox/Personal/Java/JDK7/langtools/dist/lib
Check that javac.jar is present:
howard-lovatts-computer-3:src lov080$ ls -l $hglibs/javac.jar
-rw-r--r-- 1 lov080 515598196 1364115 14 Aug 18:36
/Users/lov080/Dropbox/Personal/Java/JDK7/langtools/dist/lib/javac.jar
Run the command line entirely manually, I get:
howard-lovatts-computer-3:src lov080$ $jdk/java
-Xbootclasspath/p:$hglibs/javac.jar -ea -jar $hglibs/javac.jar
-Xlint:all -source 7 -XDallowFunctionTypes -d ../build/classes
lambdas/*.java
VM option '+UnlockExperimentalVMOptions'
VM option '+EnableMethodHandles'
VM option '+EnableInvokeDynamic'
An exception has occurred in the compiler (1.7.0-internal). Please
file a bug at the Java Developer Connection
(http://java.sun.com/webapps/bugreport) after checking the Bug Parade
for duplicates. Include your program and the following diagnostic in
your report. Thank you.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for
com.sun.runtime.ProxyHelper not found
Check that ProxyHelper is in javac.jar:
howard-lovatts-computer-3:src lov080$ jar tf $hglibs/javac.jar
[snip]
com/sun/source/tree/NewClassTree.class
com/sun/source/tree/ParameterizedTypeTree.class
com/sun/source/tree/ParenthesizedTree.class
com/sun/source/tree/PrimitiveTypeTree.class
com/sun/source/tree/ReturnTree.class
[snip]
Then I conclude that the problem is that ProxyHelper isn't in javac.jar.
Is this the problem?
Cheers,
-- Howard.
On 17 August 2010 18:41, Maurizio Cimadamore
<maurizio.cimadamore at oracle.com> wrote:
> On 17/08/10 02:02, Howard Lovatt wrote:
>>
>> Hi Maurizio,
>>
>> I am using the script generated by running make from the Mercurial
>> repository, the pertinent line from the langtools/dist/bin/javac
>> script is:
>>
>>
>> "/System/Library/Frameworks/JavaVM.framework/Versions/1.7.0_2010_07_30/Home//bin/java"
>> "${bcp:+-Xbootclasspath/p:"$bcp"}" ${ea} ${javaOpts} -jar
>> "${mydir}"/../lib/javac.jar ${toolOpts}
>>
>
> the script assumes to be in a NetBeans like structure in which you have a
> dist/ folder with two subfolders, bin/ (where your javac/java scripts are)
> and lib/ where (javac.jar is). I guess that a failure to locate
> lib/javac.jar could cause the problem you are talking about - I'd suggest
> verifying that javac.jar is really accessible using the ../lib/javac.jar
> path (relative to the path in which the script you are calling is located).
>
> Maurizio
>
>
>> Where the java VM called is the MLVM from:
>>
>> http://www.concord.org/~sbannasch/mlvm/
>>
>> The javac script mentioned above is called by:
>>
>> $jdk/javac -Xlint:all -source 7 -XDallowFunctionTypes -d
>> ../build/classes $package/*.java
>>
>>
>> Cheers,
>>
>> -- Howard.
>>
>> On 16 August 2010 17:59, Maurizio Cimadamore
>> <maurizio.cimadamore at oracle.com> wrote:
>>
>>>
>>> Hi
>>> From the message you are getting it seems like the special class
>>> com.sun.runtime.ProxyHelper is not included in the boot classpath, this
>>> causing the completion error to occur when the compiler tries to generate
>>> code that depends on such class. How are you invoking the lambda compiler?
>>>
>>> Maurizio
>>>
>>> On 15/08/10 22:46, Howard Lovatt wrote:
>>>
>>>>
>>>> @Remi,
>>>>
>>>> The syntaxes (sp ?) Person#compareByAge and Person#compareByAge(
>>>> Person, Person ) result in:
>>>>
>>>> An exception has occurred in the compiler (1.7.0-internal). Please
>>>> file a bug at the Java Developer Connection
>>>> (http://java.sun.com/webapps/bugreport) after checking the Bug Parade
>>>> for duplicates. Include your program and the following diagnostic in
>>>> your report. Thank you.
>>>> com.sun.tools.javac.code.Symbol$CompletionFailure: class file for
>>>> com.sun.runtime.ProxyHelper not found
>>>>
>>>> The syntax Person#compareByAge() results in:
>>>>
>>>> lambdas/Main.java:35: method compareByAge in class Person cannot be
>>>> applied to given types
>>>> Arrays.sort( people, Person#compareByAge() );
>>>> ^
>>>> required: Person,Person
>>>> found: no arguments
>>>>
>>>> Implying that Person#compareByAge( Person, Person ) is the correct
>>>> syntax, however that causes the above exception.
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> --
>> -- Howard.
>>
>
>
--
-- Howard.
More information about the lambda-dev
mailing list