File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javap file question

 
Jose Manuel
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The command should be
javap SerialConfig
not
javap SerialConfig.class
 
Jose Manuel
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With "javap SerialConfig" the result has been the same:
Error:Binary file 'SerialPort' contains Serialio.SerialPort
Jose
 
Jose Manuel
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anybody help me with this please?
Thanks in advance.
Jose.
 
marilyn murphy
Ranch Hand
Posts: 84
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I ran into the same problem when trying to use javap on a class in the JDK source code.
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic