This page is no longer maintained — Please continue to the home page at www.scala-lang.org

REPL: javap unavailable on this platform

9 replies
nilskp
Joined: 2009-01-30,
User offline. Last seen 1 year 27 weeks ago.
I read somewhere to include tools.jar, but I have no idea where I find that. It doesn't appear to be in the distribution.
BTW, I'm on Win7
dcsobral
Joined: 2009-04-23,
User offline. Last seen 38 weeks 5 days ago.
Re: REPL: javap unavailable on this platform

On Fri, Aug 19, 2011 at 17:39, Nils Kilden-Pedersen wrote:
> I read somewhere to include tools.jar, but I have no idea where I find that.
> It doesn't appear to be in the distribution.

It is on Java JDK. JDK, not JRE.

DaveScala
Joined: 2011-03-18,
User offline. Last seen 1 year 21 weeks ago.
Re: REPL: javap unavailable on this platform

I have this now too:
Windows 7 Home Premium 32 bit SP 1
JDK 7 b147
scala-2.9.1.RC3

tools.jar is on the classpath

C:\scala-2.9.1.RC3\examples>scala
Welcome to Scala version 2.9.1.RC3 (Java HotSpot(TM) Client VM, Java
1.7.0).
Type in expressions to have them evaluated.
Type :help for more information.

scala> :cp
Added 'C:\scala-2.9.1.RC3\examples'. Your new classpath is:
".;C:\javafx-sdk2.0-beta\rt\lib\jfxrt.jar;c:\akka-actors-1.1.2\lib\akka
\*;C:\Pro
gram Files\Java\jdk1.7.0\lib\tools.jar;C:\scalaz-
full_2.9.0-1-6.0\scalaz-core_2.
9.0-1-6.0.jar;C:\scala-2.9.1.RC3\examples"

scala> :javap err.Test
:javap unavailable on this platform.

nilskp
Joined: 2009-01-30,
User offline. Last seen 1 year 27 weeks ago.
Re: Re: REPL: javap unavailable on this platform
On Sun, Aug 21, 2011 at 4:00 PM, Dave <dave [dot] mahabiersing [at] hotmail [dot] com> wrote:
I have this now too:
Windows 7 Home Premium 32 bit SP 1
JDK 7 b147
scala-2.9.1.RC3

tools.jar is on the classpath

C:\scala-2.9.1.RC3\examples>scala
Welcome to Scala version 2.9.1.RC3 (Java HotSpot(TM) Client VM, Java
1.7.0).
Type in expressions to have them evaluated.
Type :help for more information.

scala> :cp
Added 'C:\scala-2.9.1.RC3\examples'.  Your new classpath is:
".;C:\javafx-sdk2.0-beta\rt\lib\jfxrt.jar;c:\akka-actors-1.1.2\lib\akka
\*;C:\Pro
gram Files\Java\jdk1.7.0\lib\tools.jar;C:\scalaz-
full_2.9.0-1-6.0\scalaz-core_2.
9.0-1-6.0.jar;C:\scala-2.9.1.RC3\examples"

scala> :javap err.Test
:javap unavailable on this platform.

I found that it doesn't work if you add the jar through :cp, you have to use the -cp option when starting scala. 
DaveScala
Joined: 2011-03-18,
User offline. Last seen 1 year 21 weeks ago.
Re: REPL: javap unavailable on this platform

Hello Nils,
I didn't add it tools.jar with :cp
I use :cp to display cp to see if it is really loaded in the REPL.
It is set in my windows environment.
As you can see it is on the classpath.
I also tried added c:\tools\tools.jar in my environment classpath but
that didn't help either
But I also started scala -cp c:\tools\tools.jar but that didn't change

On 22 aug, 14:49, Nils Kilden-Pedersen wrote:
> On Sun, Aug 21, 2011 at 4:00 PM, Dave wrote:
> > I have this now too:
> > Windows 7 Home Premium 32 bit SP 1
> > JDK 7 b147
> > scala-2.9.1.RC3
>
> > tools.jar is on the classpath
>
> > C:\scala-2.9.1.RC3\examples>scala
> > Welcome to Scala version 2.9.1.RC3 (Java HotSpot(TM) Client VM, Java
> > 1.7.0).
> > Type in expressions to have them evaluated.
> > Type :help for more information.
>
> > scala> :cp
> > Added 'C:\scala-2.9.1.RC3\examples'.  Your new classpath is:
> > ".;C:\javafx-sdk2.0-beta\rt\lib\jfxrt.jar;c:\akka-actors-1.1.2\lib\akka
> > \*;C:\Pro
> > gram Files\Java\jdk1.7.0\lib\tools.jar;C:\scalaz-
> > full_2.9.0-1-6.0\scalaz-core_2.
> > 9.0-1-6.0.jar;C:\scala-2.9.1.RC3\examples"
>
> > scala> :javap err.Test
> > :javap unavailable on this platform.
>
> I found that it doesn't work if you add the jar through :cp, you have to use
> the -cp option when starting scala.- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

nilskp
Joined: 2009-01-30,
User offline. Last seen 1 year 27 weeks ago.
Re: Re: REPL: javap unavailable on this platform
On Mon, Aug 22, 2011 at 8:14 AM, Dave <dave [dot] mahabiersing [at] hotmail [dot] com> wrote:
Hello Nils,
I didn't add it tools.jar with :cp
I use :cp to display cp to see if it is really loaded in the REPL.
It is set in my windows environment.
As you can see it is on the classpath.
I also tried added c:\tools\tools.jar in my environment classpath  but
that didn't help either
But I also started scala -cp c:\tools\tools.jar but that didn't change

Try: scala -cp "c:\tools\tools.jar"
DaveScala
Joined: 2011-03-18,
User offline. Last seen 1 year 21 weeks ago.
Re: REPL: javap unavailable on this platform

Same
:javap unavailable on this platform.

On 22 aug, 15:50, Nils Kilden-Pedersen wrote:
> On Mon, Aug 22, 2011 at 8:14 AM, Dave wrote:
> > Hello Nils,
> > I didn't add it tools.jar with :cp
> > I use :cp to display cp to see if it is really loaded in the REPL.
> > It is set in my windows environment.
> > As you can see it is on the classpath.
> > I also tried added c:\tools\tools.jar in my environment classpath  but
> > that didn't help either
> > But I also started scala -cp c:\tools\tools.jar but that didn't change
>
> Try: scala -cp "c:\tools\tools.jar"

dcsobral
Joined: 2009-04-23,
User offline. Last seen 38 weeks 5 days ago.
Re: Re: REPL: javap unavailable on this platform

Maybe it doesn't work on Java 7. If you verify that's the case, I'd
suggest opening a ticket.

On Sun, Aug 21, 2011 at 18:00, Dave wrote:
> I have this now too:
> Windows 7 Home Premium 32 bit SP 1
> JDK 7 b147
> scala-2.9.1.RC3
>
> tools.jar is on the classpath
>
> C:\scala-2.9.1.RC3\examples>scala
> Welcome to Scala version 2.9.1.RC3 (Java HotSpot(TM) Client VM, Java
> 1.7.0).
> Type in expressions to have them evaluated.
> Type :help for more information.
>
> scala> :cp
> Added 'C:\scala-2.9.1.RC3\examples'.  Your new classpath is:
> ".;C:\javafx-sdk2.0-beta\rt\lib\jfxrt.jar;c:\akka-actors-1.1.2\lib\akka
> \*;C:\Pro
> gram Files\Java\jdk1.7.0\lib\tools.jar;C:\scalaz-
> full_2.9.0-1-6.0\scalaz-core_2.
> 9.0-1-6.0.jar;C:\scala-2.9.1.RC3\examples"
>
> scala> :javap err.Test
> :javap unavailable on this platform.

DaveScala
Joined: 2011-03-18,
User offline. Last seen 1 year 21 weeks ago.
Re: REPL: javap unavailable on this platform

Yep

C:\scala-2.9.1.RC3\examples>scala
Welcome to Scala version 2.9.1.RC3 (Java HotSpot(TM) Client VM, Java
1.6.0_18).
Type in expressions to have them evaluated.
Type :help for more information.

scala> :javap err.Test
Compiled from "err.scala"
public final class err.Test extends java.lang.Object{
public static final void main(java.lang.String[]);
public static final void delayedInit(scala.Function0);
public static final java.lang.String[] args();
public static final void scala$App$_setter_$scala$App$$initCode_
$eq(scala.co
llection.mutable.ListBuffer);
public static final void scala$App$_setter_$executionStart_
$eq(long);
public static final scala.collection.mutable.ListBuffer scala$App$
$initCode(
);
public static final void scala$App$$_args_$eq(java.lang.String[]);
public static final java.lang.String[] scala$App$$_args();
public static final long executionStart();
public static final void x_$eq(int);
public static final int x();
public static final int[] ar();
}

On 22 aug, 19:23, Daniel Sobral wrote:
> Maybe it doesn't work on Java 7. If you verify that's the case, I'd
> suggest opening a ticket.
>
>
>
>
>
> On Sun, Aug 21, 2011 at 18:00, Dave wrote:
> > I have this now too:
> > Windows 7 Home Premium 32 bit SP 1
> > JDK 7 b147
> > scala-2.9.1.RC3
>
> > tools.jar is on the classpath
>
> > C:\scala-2.9.1.RC3\examples>scala
> > Welcome to Scala version 2.9.1.RC3 (Java HotSpot(TM) Client VM, Java
> > 1.7.0).
> > Type in expressions to have them evaluated.
> > Type :help for more information.
>
> > scala> :cp
> > Added 'C:\scala-2.9.1.RC3\examples'.  Your new classpath is:
> > ".;C:\javafx-sdk2.0-beta\rt\lib\jfxrt.jar;c:\akka-actors-1.1.2\lib\akka
> > \*;C:\Pro
> > gram Files\Java\jdk1.7.0\lib\tools.jar;C:\scalaz-
> > full_2.9.0-1-6.0\scalaz-core_2.
> > 9.0-1-6.0.jar;C:\scala-2.9.1.RC3\examples"
>
> > scala> :javap err.Test
> > :javap unavailable on this platform.
>
> --
> Daniel C. Sobral
>
> I travel to the future all the time.- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

DaveScala
Joined: 2011-03-18,
User offline. Last seen 1 year 21 weeks ago.
Re: REPL: javap unavailable on this platform

Thanks for helping.
The issue is here:
https://issues.scala-lang.org/browse/SI-4936

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland