[ExM Users] stc unsupported class error

Ketan Maheshwari ketan at mcs.anl.gov
Mon Apr 28 15:21:13 CDT 2014


It shows the following:
declare -x
PATH="/homes/ketan/cloud/ec2-api-tools-1.6.12.2/bin:/homes/ketan/apache-maven-3.2.1/bin:/homes/ketan/jdk1.7.0_07/bin:/homes/ketan/globus-install/bin:/homes/ketan/swift-0.94/cog/modules/swift/dist/swift-svn/bin:/homes/ketan/escience_2013/swift:/home/ketan/CoinIpopt/bin:/homes/ketan/cctools-install/bin:/home/neosotc/neos-bin:/home/ketan/tcl-install/bin:/home/ketan/mpich3-install/bin:/home/ketan/exm-install/turbine/bin:/home/ketan/exm-install/stc/bin:/homes/ketan/swig-install/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/mcs/bin:/usr/local/bin:/software/common/bin:/soft/apps/bin:/soft/gnu/bin:/soft/com/bin:/soft/adm/bin:/homes/ketan/bin/linux-Ubuntu_12.04-x86_64:/homes/ketan/bin"

It does have both /usr/bin and /homes/ketan/jdk1.7.0_07/bin and seems
/homes/ketan/jdk1.7.0_07/bin appears before /usr/bin which makes
/homes/ketan/jdk1.7.0_07/bin appear as default java.


On Mon, Apr 28, 2014 at 3:16 PM, Tim Armstrong <tim.g.armstrong at gmail.com>wrote:

>  Can you check that the PATH is exported, e.g:
>
> export | grep PATH
>
>
> On Mon, Apr 28, 2014 at 2:25 PM, Ketan Maheshwari <ketan at mcs.anl.gov>wrote:
>
>> Strange:
>>
>>  $ stc -v
>> STC: Swift-Turbine Compiler
>> for Turbine: 0.3.0
>> TURBINE_INSTALL=
>> TURBINE_HOME=/home/ketan/exm-install/turbine
>> Using Java: /usr/bin/java
>> $ which java
>> /homes/ketan/jdk1.7.0_07/bin/java
>>
>>
>>
>>
>>  On Mon, Apr 28, 2014 at 2:11 PM, Tim Armstrong <
>> tim.g.armstrong at gmail.com> wrote:
>>
>>>   Hmm, the code to locate java is really simple, it does a "which java"
>>> and that's all.  Is your path variable being exported after you add Java to
>>> it?
>>>
>>> You can get stc to report which java it's using with the lower case -v
>>> flag too.
>>>
>>>   - Tim
>>>
>>>
>>>  On Mon, Apr 28, 2014 at 12:58 PM, Ketan Maheshwari <ketan at mcs.anl.gov>wrote:
>>>
>>>> It appears so. I have my own java in PATH and am using the same for
>>>> building and running.
>>>>
>>>>
>>>>  On Mon, Apr 28, 2014 at 11:15 AM, Tim Armstrong <
>>>> tim.g.armstrong at gmail.com> wrote:
>>>>
>>>>>   It should default to the java in PATH - is it not doing that for
>>>>> you?
>>>>>
>>>>>  Currently it only uses two things to resolve java: the -j flag, and
>>>>> "which java" - other environment variables, etc, shouldn't affect it.
>>>>>
>>>>>  - Tim
>>>>>
>>>>>
>>>>> On Mon, Apr 28, 2014 at 11:04 AM, Ketan Maheshwari <ketan at mcs.anl.gov>wrote:
>>>>>
>>>>>> Hi Tim,
>>>>>>
>>>>>>  stc -V does not seem to show which java it is running with:
>>>>>>
>>>>>>  $ stc -V user.swift
>>>>>> stc: Optimization level 2
>>>>>>  Exception in thread "main" java.lang.UnsupportedClassVersionError:
>>>>>> exm/stc/ui/Main : Unsupported major.minor version 51.0
>>>>>>
>>>>>>  The -j option works but in my case, the stc call is part of a
>>>>>> generic script and this will involve detecting java on systems to run with.
>>>>>> Is it somehow possible to tell stc to use the same java in current env at
>>>>>> the time of build and run.
>>>>>>
>>>>>>  Thanks,
>>>>>> Ketan
>>>>>>
>>>>>>
>>>>>>  On Mon, Apr 28, 2014 at 10:56 AM, Tim Armstrong <
>>>>>> tim.g.armstrong at gmail.com> wrote:
>>>>>>
>>>>>>>   I haven't seen that one before.  It sounds like it's being run
>>>>>>> with an older version of Java than it was compiled with.
>>>>>>>
>>>>>>> Java class version 51.0 corresponds to java 7 (
>>>>>>> http://en.wikipedia.org/wiki/Java_class_file#General_layout), so it
>>>>>>> seems like it must be getting run with an older version.
>>>>>>>
>>>>>>>  You could try the -V switch to STC to see which java it's being run
>>>>>>> with, and then -j /path/to/jvm/bin/java to force a different java version.
>>>>>>>
>>>>>>>  - Tim
>>>>>>>
>>>>>>>
>>>>>>>   On Mon, Apr 28, 2014 at 10:33 AM, Ketan Maheshwari <
>>>>>>> ketan at mcs.anl.gov> wrote:
>>>>>>>
>>>>>>>>   Hi,
>>>>>>>>
>>>>>>>>  While running stc on MCS workstations, I get:
>>>>>>>>
>>>>>>>>  ./genleaf vanilla mockdock.c mockdock.h user.swift
>>>>>>>>  Exception in thread "main"
>>>>>>>> java.lang.UnsupportedClassVersionError: exm/stc/ui/Main : Unsupported
>>>>>>>> major.minor version 51.0
>>>>>>>>
>>>>>>>>  Somehow the java versions at build and runtime are getting mixed
>>>>>>>> up.
>>>>>>>>
>>>>>>>>  This is how I build:
>>>>>>>>
>>>>>>>>  export JAVA_HOME=/homes/ketan/jdk1.7.0_07
>>>>>>>>  ant install -Ddist.dir=/home/ketan/exm-install/stc
>>>>>>>>
>>>>>>>>  I have the same java in my env:
>>>>>>>>
>>>>>>>>  $ which java
>>>>>>>> /homes/ketan/jdk1.7.0_07/bin/java
>>>>>>>>
>>>>>>>>
>>>>>>>>  Any suggestions to fix this?
>>>>>>>>
>>>>>>>>  Thanks,
>>>>>>>> Ketan
>>>>>>>>
>>>>>>>>   _______________________________________________
>>>>>>>> ExM-user mailing list
>>>>>>>> ExM-user at lists.mcs.anl.gov
>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/exm-user
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/exm-user/attachments/20140428/745f79f1/attachment-0001.html>


More information about the ExM-user mailing list