Java .class files low-level (hex) editing?

Hello, all!
I have a problem:
There is an application (namely a J2ME instant messanger for Nokia mobiles). It is a non-commercial application. But unfortunately, there is a bad bug in the application. It is not even a bug, it is more a feature - but it does not support Russian (cyrillic) characters encoding. Russian characters in all incoming messages are displayed with a kind of hierogliphs.
I wrote to developers (and not only I did - I know at least 3 russian people who also wrote a developer about this) - but unsuccessful. Developer keeps silent.
So what I decided is to fix the bug by myself :) By decompilation, e t.c.
Unfortunally, the midlet is hard obfuscated :( So it took me some hours of reading obfuscated code, and now I see some ways which I must try to solve the problem. I think I must write a code which processes the desired String variables (Despite obfuscation, I can see which Strings to process to obtain effect), and inject this code somewhere to be executed, and from where it could reach the desired Strings.
But the great problem is that obfuscated classes produce a lot of erroneus code, which can not be compiled back. So I decide to reject the decompilation at all, or at least of the big classes (where it is a lot of errors, which I can not correct manually).
In some moments, the application stores the desired Strings in the java.lang.Hashmap. So if I could place my processing code into the Hashmap methods, then I could easily process what I need.
Evidently, I can not edit the real basic java classes. But why not to make the applicaton using my class with identical functionality, instead of java.jang.Hashmap?
My idea now is to edit the .class file of the midlet (yeah, edit with notepad), replacing all the references to "java/lang/Hashmap" or "java.lang.Hasmap" with "java/lang/Fuckmap" and "java.lang.Fuckmap".
So did I (replaced it in norepad).
I read the Sun's documentation about .class file structure, and it seems that nothing is against it. There is no encryption, no checksums, e t.c.
Then I produced "Fuckmap" class this way:
import java.lang.Hashmap;
class Fuckmap extends Hashmap {}
(compiled and preverified it of course)
And placed it into java/lang folder inside the application jar.
I instead of working properly, I get the "Application error - invalid constant pool entry"). What do I do wrong?

2 lexzeus, mlk:
I understood you.
I jave just tried it, and used "jaga/util/Fuckmap" (jaga, not java). But still the same ("Invalid constant pool entry). I tried two times (maybe I could make something wrong?), both times took "clean" jar package, e t.c.
Do you really think jav.alang.Hashmap should help now? I have ony little hope :(

Similar Messages

  • Low level Hex disk edit & search util needed- suggestions please?

    low level Hex disk edit & search util needed- suggestions please?
    Maybe It's just late & I've had a bad day.... but I haven't needed a low level Hex disk edit & search utility suitable for an Intel 10.4.x Mac until now and can't seem to locate one.
    There should be plenty of free/shareware options (because they're handy and not particularly hard to write ... and every tech head needs one some time)...
    Any suggestions please?
    [I haven't bothered with the commercial stuff - like tech tool/Norton/*insert name here* Recover/repair, Something Genius etc. etc. because they are all without exception either unnecessary (just pretty shells for the underlying UNIX/X utils) useless AND greedy $-gougers, just useless, or just money gougers so I couldn't even say whether any still have a 'feature' like the old Norton Disk editor app had - but a quick look about suggest not...]
    grumble
    Any specific suggestions/links, please?
    TIA

    they are all without exception either unnecessary (just pretty shells for the underlying UNIX/X utils) useless AND greedy $-gougers, just
    useless, or just money gougers
    Such a high-esteem for fellow human beings - and
    programmers...
    You know, there are some good decent nice people
    behind those names?
    You'd be amazed at how much testing goes into a product.
    [SNIP]
    g'day Hatter...
    Yes, I know there are some good decent nice people behind those names..fellow human beings - and fellow programmers (so yes, I do know...) In previous incarnations I have 'thunk up' and developed, Marketed & supported considerably more complex Apps & systems myself - I even know some of the people you mention personally - and they are usually decent Blokes/women but normally, it isn't the programmers who make the decisions on pricing/features/support/performance/upgrade costs & cycles etc...
    My only error was, I agree, the phrase 'without exception' - but (mainly) only because I haven't bought/tested & used all of them very very recently. So I offer my apologies to those to whom my remarks should not apply (long, late night/early morning frustration...)
    However, I also offer a few simple pertinent examples:
    One 'top name' Utility company had a 'save your Mac HD' product on the market for some time that was almost guaranteed to TRASH it irretrievably but did NOT say so - nor did they help or compensate those they harmed.
    Several are selling what amount to simple, pretty, GUI shells for 'free' or OS-included command line tools - no more, no less but do NOT say so and are asking good money for the 'software'.
    Many are asking ridiculous prices for "regular upgrades" so you can keep their tool current with your Mac OS - one wants US$100/year for it, another, $15 per u/g, others, US$25 or $40 per u/g; one asks 'only' $10 - and these 'upgrades' are happening 3,4,5,6 times per year and are necessary for the Marketing company to keep their product Saleable to new purchasers and new Macs (as well as for important Bug Fixes - and only co-incidentally to keep it performing with your current Mac and OS - which is what you paid them for in the first place).
    I won't pay for a product 3, 6 or 9 times and I won't advise my clients to: It's not unreasonable for a person to expect a 'sensible lifetime/currency' of Product X for Computer Y - say 3 years (e.g. AppleCare). I wouldn't object to paying for an "upgrade" at that point - IF it's worth the money.
    Software is Waaay too expensive in many cases and is simply inviting 'piracy' - from people who have already PAID for the product: sadly, they are killing their own Gooses.
    Seriously, one product costs ca. US$100 to Buy in the first place
    To keep it actually working for you costs about the same again Per Year - a 3 year 'sensible lifetime' or 'currency' cost of US$300 or $400! [That'll buy a lot of 'bare drives' to put in a handy Firewire case for automatic backups in Background, differential backups etc. and other simple practices which render this product type largely unnecessary ].
    For what? A relatively simple set of utilities which would actually cost the company involved less than $5 total each - over 3 years - to make available to existing ( or 'current') owners. [Applecare 'complete' Hardware and Software warranty & support on a US$2000 iMac - which includes Tech Tools Pro Deluxe or somesuch costs about US$165 for 3 years. Total.]
    Having designed, developed, Marketed, supported & maintained more complex Applications to/for a sizeable user-base (in US terms) over multiple complete Series of Product 'life-cycles' - regular Updates and all, I think I know where the pirates are.
    These practices have been rampant in the MSWindows™ market for a longtime. It's a real shame to see it in the Mac world.
    I have all the esteem in the world for those fellow human beings who deserve such - and programmers who are 'good decent nice people'.
    I have none to spare for monopolists, 'exploitationists' or any of those who take unfair/unreasonable advantage of their fellow human beings - AND of programmers who are 'good decent nice people' (like, say, ME... .
    In any event, as I said: they are "killing their Gooses": I know of at least 6 software companies which went this route a while back. All are dead or dying.
    Thank you for your help - and the opportunity to apologise for 'mis-speaking'.
    all the best,
    orig g4 733, many others thru (the luvly) Macintels     New & old Macs, Wintels, MacIntels, other systems...

  • Editor fails to close a java class file.

    jdev 10.1.3.4
    Even if I click the X on the editor tab, jdev editor does not close the file.
    File-->Close does not close the file either.
    File-->Close All closes all files, however.
    Instead of closing the file, it just jumps to the next file in the editor.
    This has been happening to me for a some time, and it happens with Java class files only.
    jsp or xml files do close no problem.
    Any idea how to fix this?
    Thanks for your help.
    Edited by: Yunki on Jan 7, 2009 2:54 PM

    Hi,
    since this doesn't reproduce on other machines, please let us know how this can be reliably reproduced
    Frank

  • Layout controller java class file

    Hi all
    I want to edit a layout controller java class file.
    When I click on edit button, it shows me the path of the layout controller java class file.
    Anybody can tell me the location from where I can download this java file.
    I have followed this thread discussion, please refer following link:
    https://forums.sdn.sap.com/thread.jspa?threadID=83494
    Regards
    Kapil

    Hi Romano and Robert
    The concept of 'hot deployment' is still a bit unclear to me in terms of implementation. I followed the links provided by you but they explained theory and no steps to implement it.
    I however followed this blog link : http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/5800
    "Flexible UI component development demystified" by Thilo.
    I downloaded his sample project : https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/3091fdd3-a999-2910-f18f-eae1386d2ae0
    I imported it in my studio, replaced appropriate jar files to get it in rebuildable state and then deployed it on portal.
    After deployement and restarting the server, I created and applied the new layout controller to the layout set of KM iview.
    This time however a blank KM page was displayed.
    I checked the deploy messages in NWDS, it showed me following warning and info messages:
    1. com.sap.portal.plugins.config-archiver: Config archive successfully created (time to export 578 ms)
    2. com.sap.portal.plugins.config-archiver: Invalid structure (missing /FlexibleUIComponents/src.config/install/meta/expanded folder)
    3. com.sap.portal.plugins.config-archiver: No privateArchive.properties file is defined.
    Please note, I have not modified anything in the downloaded sample project, just fixed it with required jar files picked up from the server directories.
    I am using SP15 NWDS and EP server is 7.00SP16.
    As a beginner, I just want to first get this downloaded sample project implementation correct.
    Please let me know corrections/pointers for this. It would be highly appreciated.
    Thanks
    Kapil.

  • How to read the java class file to convert it in java.

    hello all,
    i m developing the java application which generated the java code from the java 'class file' .
    Can anybody please help me, Is any java support for reading the class file? or how to know the class file format?
    I know the application javad, jad, javap which is doing the same thing.
    thanks for reply,
    - Jayd

    do you mean decompiling? there are tons of java decompilers available out there, what exactly are you trying to do here?

  • How to convert a .jsp to a .java/.class file for use in peoplesoft

    Hi java/jsp experts,
    I want to convert a .jsp to a .java/.class file. is there a tool available, please let me know if you have any pointers....
    or can i do it manually:
    these are a few lines that the .jsp contains, and i would like to translate this to be in .java/.class format:
    <%@ page import="sun.misc.BASE64Encoder, javax.crypto., javax.crypto.spec."%>
    <%@ page import="java.util.StringTokenizer" %>
    <%@ page import="java.util.Map" %>
    <%!
    sb.append("<input type=\"hidden\" name=\"orderPage_serialNumber\" value=\"");
    sb.append(serialNumber);
    sb.append("\">\n");
    return sb.toString();
    %>
    how can i translate the above import statements and html elements from jsp to java, please let me know.
    Once i have the .java file created from the .jsp, I will compile .java to create the .class file and invoke the .class in peoplecode by using java apis available in peopletools.
    Thanks in advance.

    Is there a way convert a binary .exe file( compiled by
    another compiler) into Java .class/.jar file ? Anyone
    know of a free program that can do this?It's not possible. There are many decompilers and disassemblers for Java but nothing will take you from ANY binary to Java source. It would be the end of computing as we know it and the beginning of a new era -:)

  • How to convert dll to a java class file?

    Hi folks:
    I have some DLLs in VB and C++ and I wanna to convert them to a java class file. Does anybody know if exist a sw or easy way to do it?
    thanks
    Autair

    Well, I believe you could write JNI to call the functions in the DLLs, although I wouldn't recommend it. (You'd have a non-portable, fragile result.)

  • How to convert java .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 access variables declared in java class file from jsp

    i have a java package which reads values from property file. i have imported the package.classname in jsp file and also i have created an object for the class file like
    classname object=new classname();
    now iam able to access only the methods defined in the class but not the variables. i have defined connection properties in class file.
    in jsp i need to use
    statement=con.createstatement(); but it shows variable not declared.
    con is declared in java class file.
    how to access the variables?
    thanks

    here is the code
    * testbean.java
    * Created on October 31, 2006, 12:14 PM
    package property;
    import java.beans.*;
    import java.io.Serializable;
    public class testbean extends Object implements Serializable {
    public String sampleProperty="test2";
        public String getSampleProperty() {
            return sampleProperty;
    }jsp file
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="java.sql.*,java.util.*"%>
    <html>
    <head>
    <title>Schedule Details</title>
    </head>
    <jsp:useBean id="ConProp" class="property.testbean"/>
    <body>
    Messge is : <jsp:getProperty name="msg" property="sampleProperty"/>
    <%
      out.println(ConProp.sampleProperty);
    %>
    </body>
    </html>out.println(ConProp.sampleProperty) prints null value.
    is this the right procedure to access bean variables
    thanks

  • Converting Java class file to .dll

    Dear all,
    Is there any way to convert a Java class file to a .dll file?
    (Background being that there is a software that only allows callouts to DLLs and the method I have developed is in Java so need to convert it to a .dll)
    Any insight/advice/pointers are most appreciated.
    Thanks much,
    David

    Hi there,
    Yes you can convert a Java Class to DLL file using Microsoft Visual J#.NET (Installation required Visual Studio.NET) you can download it from the microsoft site.
    www.microsoft.com/downloads
    then go for search below in combo box(Visual J#.NET). After installation open new project select class library. write your java code(not fully supported j2se). build your application. All the Java Code is embeded in dll. Found at e.g. C:/JavaToDll/bin/debug/JavaToDll.dll This is a way to convert Java Code to a dll. frankly speaking i do not like .NET (copy of Java Technology must be baned completely).
    Thanks
    Please correct if i am wrong.
    Yahya Kamran (Software Engineer)

  • Where to find Java Class File Specification for Java 5.0?

    Where to find Java Class File Specification for Java 5.0?
    thank you in advance.

    same place you found it for 1.4Can u give more details? I thought the class spec for Java 1.4 is the same as Java 1.2.
    anyone can tell where to find Java Class File Specification for Java 5.0?
    Thanks.

  • Problem in finding java class file

    I am writting an application using servlets , JSP and a simple java classfile. The simple java class file is for connection pool and the name of connection pool class is DBConnectionManager . I am using JavaWebserver2.0 and I have placed this class file in .\JavaWebserver2.0\classes
    I am placing my servlets in .\JavaWebserver2.0\servlets folder. Since I am using wfm package so my servlets are placed in .\JavaWebserver2.0\servlets\wfm .
    The problem is with compiling the servlet placed in wfm folder . I get the following error:-
    TestServlet.java:11:cannot resolve symbol
    symbol: class DBConnectionManager
    location: class wfm.TestServlet
    However when I try to compile this class in servlets folder and remove the package statement from the source file, it compiles and works very fine. I am having lot of confusion as the class DBConnectionManager is in classpath but even then compiler gives error. The same class when placed in servlets folder and package statement is removed works very fine.
    Kindly help.

    Hi,
    Is the DBConnectionManager class declared public?
    Does the TestServlet import the package that contains the DBConnectionManager?
    This is all I can come up with, with the current information.
    Cheers,
    --Arnout                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • In which directory should i keep java class files in oracle apps

    hi
    I have one problem, In which Top & directory should i keep java class files in oracle apps
    krishna

    Hi
    By itself its available in oracle\visappl\au\11.5.0\java\
    thats were the location needs to be placed in the apps.zip.
    Thanks
    Riyas

  • Error occured when using javap (Java Class File Disassembler)

    Hi,
    I have tried to use Java Class File Disassembler by using javap and i'm getting the error shown below,
    C:\> javap abc.class
    ERROR: Could not find abc.class
    abc.class present in C:\ drive.
    Please let me know how to solve the problem
    Thanks in Advance
    Soundar

    Hi,
    Thanks for your information, it works fine. Please let me know is there any option to display the method and variable implemation in abc.class.
    I have tried javap abc it displays the method name only.
    Thanks in advance,
    Soundar

  • Where to keep the java class file which is being used from a form?

    Hi,
    Actually I am developing a form which has a bean area and the data will be displayed in the bean area in the form of grid. And I will register this form with apps and will run the from Oracle apps. I want to know that there is a java class file that is being refered by the form, where should this java class file be placed and is there any other places where any changes are required so that the form runs correctly from the Oracle apps and can find the java class file.
    I am very thankful to each and everyone who will be able answer this question of my.

    do you mean decompiling? there are tons of java decompilers available out there, what exactly are you trying to do here?

Maybe you are looking for