Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Java and JDK

Options
  • 12-10-2011 10:09am
    #1
    Closed Accounts Posts: 613 ✭✭✭


    I have a java.jar file that i have retrieved from a device and I wish to modify part of the code.Trouble is cannot get it to open.I know little about java.I downloaded the jdk from the website.The .jar file seems to be associated with java but open with or simply double clicking the .jar does nothing.I did winrar the .rar initally and got some class files and a bunch of folders \client\a\a\a\a\a. These files seem to be assistance with wordpad.Open With Java... computer just beeps and nothing happens.
    Is the file as it a commercial release protected against viewing/modification?
    Any help appreciated!


Comments

  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    A jar file is just a archive of files, usually java class files. Java class files are byte code so I doubt you will be able to do what you describe.

    What do you want to change?


  • Moderators, Education Moderators Posts: 1,863 Mod ✭✭✭✭Slaanesh


    You can use http://www.rarlab.com/ - Winrar to open the jar file. It is essentially just a repository of files. It will most unlikely contain the source code that you wish to modify only the compiled class files. Jar files can hold any file type.


  • Closed Accounts Posts: 613 ✭✭✭4Sheets


    Guys thanks..yes I have used winrar to open the .jar.
    How do I get the Java complier to open..is there a way to open the development environment..I have no options to launch from start/programs.

    This is what I have installed..is this the correct program.

    jdk-7-windows-i586 (1).exe


  • Registered Users Posts: 385 ✭✭EoghanConway


    4Sheets wrote: »
    I have a java.jar file that i have retrieved from a device and I wish to modify part of the code.

    This is an advanced topic.
    4Sheets wrote: »
    I know little about java.

    This is a critical blocker.
    4Sheets wrote: »
    How do I get the Java complier to open..is there a way to open the development environment..I have no options to launch from start/programs.

    You mean an IDE? Netbeans, Eclipse et al.
    These use the JDK to compile, analyse, debug etc. java classes (more accurately they are capable of managing and using several different JDKs installed on your machine)


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    4Sheets wrote: »
    Guys thanks..yes I have used winrar to open the .jar.
    How do I get the Java complier to open..is there a way to open the development environment..I have no options to launch from start/programs.

    This is what I have installed..is this the correct program.

    jdk-7-windows-i586 (1).exe
    What do you mean open?

    You use the java compiler, javac on a file such as:

    javac myclass.java


  • Advertisement
  • Registered Users Posts: 7,157 ✭✭✭srsly78


    The classes might be obfuscated. If so you won't be able to reverse-engineer or change anything without extreme difficulty (would be easier to just write it from scratch).


  • Closed Accounts Posts: 613 ✭✭✭4Sheets


    srsly78 wrote: »
    The classes might be obfuscated. If so you won't be able to reverse-engineer or change anything without extreme difficulty (would be easier to just write it from scratch).


    I reckon it most likely is...It makes perfect that the manufacturer would protect the IP.
    thanks for the help everyone but i think i should leave this hack alone...


  • Registered Users Posts: 3,735 ✭✭✭Stuxnet


    try the bluej ide, its great for beginners

    http://bluej.org/


  • Closed Accounts Posts: 5,482 ✭✭✭Kidchameleon


    You can open the jar file like others have said. You can then "decompile" the class files with one of the many Java decompilers out there. Try this one:

    http://java.decompiler.free.fr/


Advertisement