[SI-6026] :javap generates "Could not find class bytes ..." error Created: 05/Jul/12  Updated: 12/Sep/14  Resolved: 23/Oct/13

Status: CLOSED
Project: Scala Programming Language
Component/s: Repl / Interpreter
Affects Version/s: Scala 2.10.0-M4
Fix Version/s: Scala 2.10.4-RC1

Type: Bug Priority: Major
Reporter: DaveScala Assignee: A. P. Marki
Resolution: Fixed Votes: 1
Labels: community, has-pull-request

Issue Links:
relates to SI-8843 Scala Interpreter classloader - getRe... CLOSED


Windows 7 Home Premium 32 bit SP1

Welcome to Scala version 2.10.0-M4 (Java HotSpot(TM) Client VM, Java 1.6.0_33).
Type in expressions to have them evaluated.
Type :help for more information.
scala> class A
defined class A
scala> :javap -v A
Failed: Could not find class bytes for 'A'

In scala 2.9.2 REPL this works

Comment by Paul Phillips [ 18/May/13 ]

Not enough to go on, and possibly overtaken by events.

Comment by A. P. Marki [ 18/May/13 ]

This is what I got last summer, too.

You go, "How could that not work?" and then you're sucked in.

I'm pretty sure there's a horror flick where one of the young naifs says, "How could that not work?" and starts to fiddle, and the audience screams at the screen, "No! Don't fiddle!"

Comment by A. P. Marki [ 18/Oct/13 ]

Avoid the class loader bug by not creating a new loader if javap is available on the interpreter's class path.

It might be nice to back port the bug fix for AFCL, too.

Comment by A. P. Marki [ 18/Oct/13 ]


This lets you work around the bug by `scala -toolcp tools.jar` instead of other gymnastics.

Comment by A. P. Marki [ 18/Oct/13 ]

Supplemented by


which backports the `findResource` for AFCL. The use case should just work now.

Generated at Tue Dec 18 14:00:52 CET 2018 using JIRA 7.9.1#79001-sha1:60970b42586a2ec2760ed6cfe825b26961e62b9e.