File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes javap file question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "javap file question" Watch "javap file question" New topic
Author

javap file question

Jose Manuel
Greenhorn

Joined: Feb 14, 2003
Posts: 5
Hi,
After applied:
jar xf Serialio.jar
I was able to see that it had classes files. My question is:
1. Is it possible to get the source code of this classes with javap application? I have tried to do it:
javap SerialConfig.class
but the message was:
"Error: Binary file 'Serial Port' contains Serialio.SerialPort"
Could anybody help me please?
Thanks in advance.
Jose.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9001
The command should be
javap SerialConfig
not
javap SerialConfig.class


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Jose Manuel
Greenhorn

Joined: Feb 14, 2003
Posts: 5
With "javap SerialConfig" the result has been the same:
Error:Binary file 'SerialPort' contains Serialio.SerialPort
Jose
Jose Manuel
Greenhorn

Joined: Feb 14, 2003
Posts: 5
Could anybody help me with this please?
Thanks in advance.
Jose.
marilyn murphy
Ranch Hand

Joined: Aug 28, 2001
Posts: 83
I ran into the same problem when trying to use javap on a class in the JDK source code.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9001
Make sure you set your classpath to the beginning of the package hierarchy and specify the full package name.
Ex.
C:\java\myProject>javap -classpath ../ myProject.myClass
or
C:\java>javap -classpath . myProject.myClass
 
IntelliJ Java IDE
 
subject: javap file question
 
Threads others viewed
How to find unused imports and remove unused imports.
using javap utility
Accessibility of default constructors
interpreting bytecode
javap and jar files
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture