Converting .class file
Hi all,
i have a doubt regarding, How to convert a .class file into a .java file without using any tools.
If you look at the java spec there is a chapter on class file structure.
One warning however. D'ya ever see 'Batman Returns'? You know the part where the penguin reassembles all those documents with sticky tape - that's the kind of area you are in here.
Tools will make you life so much simpler. Try jad, lovely. Or even javap -c, you don't get javacode, but the bytecode is reasonably easy to understand.
Similar Messages
-
Error while converting class file to exp and jca file
error while converting *.class file to *.exp and *.jca file
=====================================================================================================================
linux-y60u:/home/admin/java_card_kit-2_2_1/samples/src # converter -exportpath "/home/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/HelloWorld 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
Java Card 2.2.1 Class File Converter, Version 1.3
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/HelloWorld.class
parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/Identity.class
error: com.sun.javacard.samples.HelloWorld.HelloWorld: unsupported class file format of version 50.0.
error: com.sun.javacard.samples.HelloWorld.Identity: unsupported class file format of version 50.0.
conversion completed with 2 errors and 0 warnings.
=====================================================================================================================i compile a file javacard use this command:
===
javac -source 1.3 -target 1.1 -g -classpath ./classes:../lib/api.jar:../lib/installer.jar src/com/sun/javacard/samples/Identity/Identity.java
===
and try to convert this class use this command
===
/home/xnuxerx/admin/java_card_kit-2_2_1/bin/converter -exportpath "/home/xnuxerx/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/Identity 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
===
result convert:
===
Java Card 2.2.1 Class File Converter, Version 1.3
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
parsing /home/xnuxerx/admin/java_card_kit-2_2_1/samples/classes/com/sun/javacard/samples/Identity/Identity.class
converting com.sun.javacard.samples.Identity.Identity
error: export file framework.exp of package javacard.framework not found.
conversion completed with 1 errors and 0 warnings.
===
why ??
please your comment for this problem.
thank 4 all. -
How to convert .class file to exec file...
hi.
how to convert .class file to exec file...
please explain me clearly.....
thanks...Placing your exact "question" into google:
http://www.google.com/search?q=how+to+convert+.class+file+to+exec+file... -
How to convert .class files to .java files
Hi,
I want to convert .class files to .java files. Is there is any software for that doing except Dj DCompiler? Because if i am using this i am not getting proper code i mean as it is available in the file.
I tried by writing simple java file and i compiled Sample.java file and i got a .class file then i converted this Sample.class to Sample.java file by using DjDcompiler but i was missing some statements i need entire code that is available in Sample.java file. Please tell me any other software for that doing.
Thank you in advanceI want to convert .class files to .java files.
iles. Is there is any software for that doing except
Dj DCompiler? Because if i am using this i am nothttp://www.google.com/search?hl=en&q=java+decompiler&meta=
getting proper code i mean as it is available in the
file.I doubt you ever will.
I tried by writing simple java file and i compiled
Sample.java file and i got a .class file then i
converted this Sample.class to Sample.java file by
using DjDcompiler but i was missing some statements i
need entire code that is available in Sample.java
file. Please tell me any other software for that
doing.Did you hear about "compiler opimizations"? -
Converting .class file to .dll file
Hi
Can any body tell me what is the procedure for converting .class file to .dll(windows) file.
Thanks,
latifOne way, You could produce a DLL that wraps the JVM and loads your java class exposing a C and/or C++ callable interface, but that is a lot to go through.
Otherwise, if you are thinking of using Java class for .net applications you can
use IKVM.NET to convert Java class to .NET dll. For this you can refer to:
http://www.ikvm.net/userguide/tutorial.html -
Hi all, I am new in java card development.
This is my environment setting:
@echo off
set JC_HOME=C:\JavaCard\java_card_kit-2_2
set JAVA_HOME=C:\j2sdk14103
set PATH=.;%JC_HOME%\bin;%PATH%
I have created the Wallet applet according to 'Zhiqun Chen" text book and named it WalletApp.java.
I have compiled this file to a class file.
This is where is I saved my file
C:\JavaCard\java_card_kit-2_2\samples\src\com\sun\javacard\samples\WalletApp\WalletApp.java.
But I don't really understand how to convert the class file.
May I know what is this for?
-out EXP JCA CAP
-exportpath
-applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1
com.sun.javacard.samples.HelloWorld.HelloWorld
com.sun.javacard.samples.HelloWorld
0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0
must save this in what file?
I tried to type in the command line below (and the result):
C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sap
les\Wallet\Wallet.opt
error: file scr\com\sun\javacard\saples\Wallet\Wallet.opt could not be found
Usage: converter <options> package_name package_aid major_version.minor_ver
sion
OR
converter -config <filename>
use file for all options and parameters to converter
Where options include:
-classdir <the root directory of the class hierarchy>
set the root directory where the Converter
will look for classes
-i support the 32-bit integer type
-exportpath <list of directories>
list the root directories where the Converter
will look for export files
-exportmap use the token mapping from the pre-defined export
file of the package being converted. The converter
will look for the export file in the exportpath
-applet <AID class_name>
set the applet AID and the class that defines the
install method for the applet
-d <the root directory for output>
-out [CAP] [EXP] [JCA]
tell the Converter to output the CAP file,
and/or the JCA file, and/or the export file
-V, -version print the Converter version string
-v, -verbose enable verbose output
-help print out this message
-nowarn instruct the Converter to not report warning messages
-mask indicate this package is for mask, so restrictions on
native methods are relaxed
-debug enable generation of debugging information
-nobanner suppress all standard output messages
-noverify turn off verification. Verification is default
*********************************************************May I know What is the correct command line to convert the class file and what must I do to before converting the class file?
I saw some article saying we must use JDK1.3, is it a must?
Your solution is highly appreciated.
Thank you!Hi Ricardo,
I saved the file below as WalletApp.opt in the directory of scr\com\sun\javacard\samples\WalletApp
-out EXP JCA CAP
-exportpath c:\javacard\java_card_kit-2_2\api_export_files
-applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2:0x1 WalletApp.WalletApp
WalletApp 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2 1.0
But I still have the problem below:
C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sam
ples\WalletApp\WalletApp.opt
error: file scr\com\sun\javacard\samples\WalletApp\WalletApp.opt could not be fo
und
Usage: converter <options> package_name package_aid major_version.minor_ver
sion
OR
converter -config <filename>
May I know What's wrong with my command or file?
Where can I download JDK because what I can find is J2SDK.
Thank you! -
How to convert .class file to .dll file
hi,
I got a problem, I have to convert my java .class file to .dll file. Microsoft VC++ program will invoke the converted .dll file.
Is there any other possibility.
I was confused.
Cam any body help me. If you are having solution for the can you send to my [email protected] account.
thanks,No, it is not possible to do what you are suggesting. Yes, you could produce a DLL that wraps the JVM and loads your java class exposing a C and/or C++ callable interface, but that is a lot to go through unless your class is VERY complex. Otherwise, you might want to just create and maintain two implementations.
-
How to convert class file into exe
I have made a simple calculator using swing.now i want it to be used as an application from the desktop..How can i do it?..any suggestions?
raghu0007 wrote:
I have converted the class file to jar using jar cvf simplecalci.jar simplecalci.class.
Now i don't know wat to do next since when i double click the jar.....windows shows the message
Failed to load Main-class manifest attribute from c:\users\raghu\simplecalculator\build\classes\simplecalculator\simplecalci.jar
I am using netbeans and i have JRE 5 as well as JRE 6 installed.
I don't knw wat to do.Netbeans creates the .jar file for you,
Simply right click on the project node in nb and select
clean and buildnext goto the location of the project
Eg:
C:\Documents and Settings\raghu0007\My Documents\NetBeans Projects\SimpleCalculcator\dist\There will usually be 2 files in there, 1 for the Gui parts and the other(.jar) the rest.
These two files must always be together (same directory for the jar file to work)
copy the dist folder to C:\Program Files\, Rename it and create a shortcut to the simplecalci.jar file
If you know the above just take a look at how you modified the MANAFEST file and the file(MF,class...) locations in the .jar
For Windows XP
Edited by: gtRpr on 2008/06/20 09:48 -
Convert .class files into .java files???
Does anybody know how to convert x.class file back to a x.java file. Or in other terms, extract .java files from a jarfile??
Thanks for any help
/carlosDoes anybody know how to convert x.class file back to a x.java file.As Dr.Clap said, that's decompiling.
Or in other terms, extract .java files from a jarfile??That isn't quite the same thing. You can decompile a .class that's in a jar, but a .class file doesn't have to be in a jar and a file in a jar isn't necessarily a .class. -
How to convert class files into java files??
Hey Guys,
I need a little help.
I want to know wheather we can view .class files as .java files or convert the .class to .java files.Is ther any tool or software for doing that.
Or in other words can i see the source code of any .class file..??
Plz do tell me if we can do that or any other way we can do that.
Regds,
GokulSort of. A "decompiler" will take a class file and generate a source code file of source code that could be compiled to get the class file you started out with. However, it won't be the same source code that was originally used to create the class. Most notably, comments will be missing, and variable names will probably be meaningless.
And before you say "java is bad because you can decompile it", note that any language that you can execute you can theoretically decompile.
Also, you can view the raw byte codes. If you're familiar with assembly language, or better yet familar with java bytecodes and the JVM in particular, you can often find out what a particular method does just by viewing the byte codes. -
How to convert class file to Java source code ?
Hi All ,
Currently am working in Peoplesoft Demo project using java as Plug in.We have only the class files and jar files and we have planned to modify the code for future enhancements.We dont have any legal issues here as we are already working with our client for the original source code.
Kindly help me out in doing this reverse engineering process.We have come to know the below steps would help us out.Can someone guide us in acheiving this process step by step.Please add your experience here and let us know what are the other steps required ..
(1)Rename the file from .jar to .zip and extract the .zip file.
(2)Decompile the desired .class file using 3rd party tool and get .java file.
(3)Modify the .java file and compile it.
(4)Now zip the extracted files and rename the it from .zip to .jar.
We need to verify whether the modified .jar file will work
Thanks & Regards
Kar1983Thanks for your reply ....We have asked them so many times ..but they say they dont have it .Since we have planned to do some enhancements from our end we have planned to do reverse engineering process.
-
Converting class files into java source codes
Dear Friends,
It is true that conversion of class files to its java source codes is possible through some software. I want to know, is there any way to protect my java source codes from viewing or copying illegally by other persons ?
If I create JAR file from java files, can it be also convertible back to source codes ?
AviYou can use code obfuscators in order to protect your code. And yes a jar file can also be decompiled.
http://www.retrologic.com/
http://www.2lkit.com/products/2LKitObf/
http://www.codingart.com/codeshield.html
http://www.drjava.de/obfuscator/ -
How to convert class file to pdb
Hi all,
i am very new to mobile programming, i have just bought a mobile phone with PalmOS with java-enabled. So, I searched here for more information.
I have just downloaded some games in zip format. I opened and discovered it looks like a war archive. But how can i convert it to pdb format?
EricDownload MIDP for Palm Os. Will convert you jar files to pdb.
-
How to convert JSP Compiled class file back to JSP
Is their any way to convert the JSP converted class file back into JSP file, I have few JSP files missing in my application but i do have class files deployed corresponding to the JSP file. Is their any way where i can convert my JSP class file back to JSP. I tried used decompliers but it conerts the class file into JAVA files, Is their any such decompiler that converts the JSP converted class file into Java files.
Thanks in Advance.nope...its not et al possible...!!!
You cant convert class file back to JSP....!! -
How to convert java class file version without decompiling
Hi,
Oracle R12.1.3 i am having illegal access error while try to access the class file version Java 1.3 uses major version 47,So how to convert the class file version without using decompiling.
Current java version is 1.6.0_07
Is there any tool or API for converting class file version?
Thanks,
Selvapandian TBeside this I wonder where you get your error from since AFAIK 12c comes with java 1.6.
Well wonder no more!
OP isn't using Oracle 12c database.
They are using Oracle R12.1.3 - which is the E- Business Suite.
Maybe you are looking for
-
How can i log into my itunes account and snyc my iphone using a shared computer
I am currently sharing a computer with my husband. I need to sync my iphone to itunes. Everytime I log in itunes,a list of my husband's music is still on the left side of the screen. I'm afraid to sync my phone even though I have logged in my account
-
Windows 8 and iPod nano (6th gen)
I'm using windows 8 and my iPod nano (6th gen) is not showing up in iTunes. I've reset the iPod and deleted and downloaded ITunes to my computer, but nano still not showing up. Has anyone else had this problem, any solutions? Thanks
-
How do i eliminate an old apple id that belongs to daughter and shows up as default
how do i eliminate an old apple that belongs to daughter and shows as my default I want to eliminate it completely
-
How can i detect digital signal transitions?
Hi, I have to monitor several digital signals and i'm not interested in the signals themeseves,but in their transitions because those represents important events in my problem. I have an E series daq card, so i think that the only way i can do this u
-
Enterprise Manager failes to load after installing Oracle IDM on LINUX86x64
Hi Folks We are into a serious problem: We have completed these tasks till now on RHE Linux 86 x 64 bit Install Oracle Database 11g - working fine and running Install WebLogic Server Version: 10.3.5.0 - working fine - Console opens fine Install IDM -