Results 1 to 15 of 15
Like Tree1Likes
  • 1 Post By jim829

Thread: make class file writable

  1. #1
    bernal121 is offline Member
    Join Date
    Dec 2016
    Location
    bulgaria
    Posts
    6
    Rep Power
    0

    Default make class file writable

    Hi i have a jar wich has a class file wich is read only , does anyone know is it possible to make this class file writable (and if its possible can you make it) ? i tried to make it writable with intelliJ by clicking the lock icon but that didnt work ! any help will be appreciated , thank you



    PS im not new to java :)
    Attached Files Attached Files

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,679
    Rep Power
    6

    Default Re: make class file writable

    Define "make a class file writable"? Do you mean decompile? So you can get the original Java code?
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  3. #3
    bernal121 is offline Member
    Join Date
    Dec 2016
    Location
    bulgaria
    Posts
    6
    Rep Power
    0

    Default Re: make class file writable

    Quote Originally Posted by SurfMan View Post
    Define "make a class file writable"? Do you mean decompile? So you can get the original Java code?

    I wanna edit some lines in the class file ( intelij says that the class is decompiled)
    i press the lock icon but nothing happens !!
    make class file writable-ggggggg.jpg

  4. #4
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,679
    Rep Power
    6

    Default Re: make class file writable

    IntelliJ has decompiled the class for you and it exists in memory only. If you want to change the code, either use the jar as library and subclass it, or copy/paste the code and create your own version (which comes with its own problems, because it's obfuscated).
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  5. #5
    bernal121 is offline Member
    Join Date
    Dec 2016
    Location
    bulgaria
    Posts
    6
    Rep Power
    0

    Default Re: make class file writable

    Thanks , which comes with its own problems : the cope paste method or both methods ?

  6. #6
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,679
    Rep Power
    6

    Default Re: make class file writable

    Using it as a library (if it's even meant to be a library in the first place) is the preferred way. Looking at the screenshot, it's a GUI component with all private final fields, so there is no overriding any of these. This will not be an option.

    That leaves only copy/pasting of the decompiled code. This is tricky since it probably still uses classes from the original source, and you don't have those either. Second, this is probably illegal. I think I am looking at the source code of the BF Trading Bot? Make sure the license allows you to reverse engingeer the code, which it probably doesn't.

    So depending on WHY you need the change, your options are:
    - Get the source (legally) and compile it yourself
    - Ask the author to change what you think needs changing
    - Buy a license for the program
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  7. #7
    bernal121 is offline Member
    Join Date
    Dec 2016
    Location
    bulgaria
    Posts
    6
    Rep Power
    0

    Default Re: make class file writable

    it s bf bot yes :) it s trial version ( 1 day trial) , when i do copy paste it gives me more than 700 errors , ok thanks for the info :)
    by the way most common error is cannot resolve this cannot resolve that :)

  8. #8
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,679
    Rep Power
    6

    Default Re: make class file writable

    Quote Originally Posted by bernal121 View Post
    it s bf bot yes :) it s trial version ( 1 day trial) , when i do copy paste it gives me more than 700 errors , ok thanks for the info :)
    by the way most common error is cannot resolve this cannot resolve that :)
    Busted :)

    "Cannot resolve symbol" is because you're missing all the libraries and original sourcecode. The only option left is to buy a license.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  9. #9
    bernal121 is offline Member
    Join Date
    Dec 2016
    Location
    bulgaria
    Posts
    6
    Rep Power
    0

    Default Re: make class file writable

    no i have them but it will be a long process to copy / paste them with the right structure :)

  10. #10
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,679
    Rep Power
    6

    Default Re: make class file writable

    Decompiling all the classes does not mean you have the sourcecode.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  11. #11
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    5,739
    Rep Power
    10

    Default Re: make class file writable

    Two options:

    1. Spend weeks trying to circumvent the the 1 day license (with no guarantee of success).
    2. Spend a couple of days working for some money so you can purchase a license.

    I recommend option 2.

    Regards,
    Jim
    Last edited by jim829; 01-02-2017 at 04:27 PM.
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  12. #12
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,679
    Rep Power
    6

    Default Re: make class file writable

    Quote Originally Posted by jim829 View Post
    Two options:

    1. Spend weeks trying to circumvent the the 1 day license (with no guarantee of success).
    2. Spend a couple of days working for some money so you can purchase a license.

    I recommend option 2.

    Regards,
    Jim
    Not bad, 120 GBP for a years license (https://bfbotmanager.com/buy). WIth a few good bets, the ROI would be pretty quick.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  13. #13
    bernal121 is offline Member
    Join Date
    Dec 2016
    Location
    bulgaria
    Posts
    6
    Rep Power
    0

    Default Re: make class file writable

    Quote Originally Posted by SurfMan View Post
    Not bad, 120 GBP for a years license (https://bfbotmanager.com/buy). WIth a few good bets, the ROI would be pretty quick.
    its not this bot !
    its private bot and the owner wants 5000 euro make class file writable-yyy.jpg
    Last edited by bernal121; 01-02-2017 at 05:45 PM.

  14. #14
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    5,739
    Rep Power
    10

    Default Re: make class file writable

    Ok. A few more days of work :)

    Regards,
    Jim
    SurfMan likes this.
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  15. #15
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,679
    Rep Power
    6

    Default Re: make class file writable

    Yeah, that's a big chunk out of the wallet. Still, reverse engineering is not the way. Move on to a better/cheaper product.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

Similar Threads

  1. Java won't make class file
    By amelia22 in forum New To Java
    Replies: 11
    Last Post: 08-20-2013, 01:12 PM
  2. Replies: 4
    Last Post: 08-01-2013, 10:11 PM
  3. compiler telling me to make a file for a public class
    By silverglade in forum New To Java
    Replies: 10
    Last Post: 04-26-2011, 07:47 AM
  4. PDF - Editable/Writable
    By ananddevaraj in forum Java Servlet
    Replies: 0
    Last Post: 06-05-2010, 10:46 AM
  5. Use an internal Method or Make a class file?
    By TimHuey in forum New To Java
    Replies: 2
    Last Post: 09-18-2009, 03:06 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •