<div dir="ltr"><div><div>It should default to the java in PATH - is it not doing that for you? <br><br></div>Currently it only uses two things to resolve java: the -j flag, and "which java" - other environment variables, etc, shouldn't affect it.<br>
<br></div>- Tim<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 28, 2014 at 11:04 AM, Ketan Maheshwari <span dir="ltr"><<a href="mailto:ketan@mcs.anl.gov" target="_blank">ketan@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Tim,<div><br></div><div>stc -V does not seem to show which java it is running with:</div><div><br></div>
<div><div>$ stc -V user.swift</div><div>stc: Optimization level 2</div><div class=""><div>Exception in thread "main" java.lang.UnsupportedClassVersionError: exm/stc/ui/Main : Unsupported major.minor version 51.0</div>
</div></div><div><br></div><div>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.</div>
<div><br></div><div>Thanks,</div><div>Ketan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Mon, Apr 28, 2014 at 10:56 AM, Tim Armstrong <span dir="ltr"><<a href="mailto:tim.g.armstrong@gmail.com" target="_blank">tim.g.armstrong@gmail.com</a>></span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="">
<div dir="ltr">
<div>
<div>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.<br>
<br>
Java class version 51.0 corresponds to java 7 (<a href="http://en.wikipedia.org/wiki/Java_class_file#General_layout" target="_blank">http://en.wikipedia.org/wiki/Java_class_file#General_layout</a>), so it seems like it must be getting run with an older version.<br>
<br>
</div>
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.<br>
<br>
</div>
- Tim<br>
</div>
</div><div class="gmail_extra"><br>
<br>
<div class="gmail_quote"><div class=""><div><div>On Mon, Apr 28, 2014 at 10:33 AM, Ketan Maheshwari <span dir="ltr">
<<a href="mailto:ketan@mcs.anl.gov" target="_blank">ketan@mcs.anl.gov</a>></span> wrote:<br>
</div></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div><div>
<div dir="ltr">Hi,
<div><br>
</div>
<div>While running stc on MCS workstations, I get:</div>
<div><br>
</div>
<div>./genleaf vanilla mockdock.c mockdock.h user.swift<br>
</div>
<div>Exception in thread "main" java.lang.UnsupportedClassVersionError: exm/stc/ui/Main : Unsupported major.minor version 51.0<br>
</div>
<div><br>
</div>
<div>Somehow the java versions at build and runtime are getting mixed up.</div>
<div><br>
</div>
<div>This is how I build:</div>
<div><br>
</div>
<div>export JAVA_HOME=/homes/ketan/jdk1.7.0_07<br>
</div>
<div>ant install -Ddist.dir=/home/ketan/exm-install/stc<br>
</div>
<div><br>
</div>
<div>I have the same java in my env:</div>
<div><br>
</div>
<div>
<div>$ which java</div>
<div>/homes/ketan/jdk1.7.0_07/bin/java</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Any suggestions to fix this?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Ketan</div>
</div>
<br></div></div></div></div><div class="">
_______________________________________________<br>
ExM-user mailing list<br>
<a href="mailto:ExM-user@lists.mcs.anl.gov" target="_blank">ExM-user@lists.mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/exm-user" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/exm-user</a><br>
<br>
</div></blockquote>
</div>
<br>
</div>
</div>
</blockquote></div><br></div>
</blockquote></div><br></div>