Viewing Java

Discussion in 'OT Technology' started by LooneyTuned, Feb 24, 2004.

  1. LooneyTuned

    LooneyTuned Oil? Bitch you cookin OT Supporter

    Joined:
    Nov 15, 2003
    Messages:
    2,699
    Likes Received:
    0
    Location:
    Edmonton, Alberta
    Hello..

    I was wondering if there was any way to view the java code (the .java file not the source(.html) file) directly from a website. LIke a java game? is there way u can get the java code so i can edit it? i can only get the source code which is useless. i wanna edit the little java games but im not sure how to get the code directly. thanks
     
  2. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    .java is text which is not useless unless you dont know java. that is your only way to edit a game

    the .class is the code compiled
     
  3. carlin

    carlin Guest

    http://members.fortunecity.com/neshkov/dj.html
    This is a free java decomplier. It should be able to give you code from the class file. If its *.jar files, you would have to extract the file(s) (google that).

    Hopefully you know enough about to java to tinker with the code... otherwise the program will be pretty meaningless for u ... hope that helps...
     
  4. Thrasher

    Thrasher Guest

    jar files are nothing more than zip files with a different extension, so you can easily open them up and extract them with winzip.

    BTW the decompiled code probably won't have the same variable names as the original code.
     
  5. carlin

    carlin Guest

  6. LooneyTuned

    LooneyTuned Oil? Bitch you cookin OT Supporter

    Joined:
    Nov 15, 2003
    Messages:
    2,699
    Likes Received:
    0
    Location:
    Edmonton, Alberta

    Hmm..okay but im only have the website though. So how do i get the class file? or even the jar files for that matter? this is where im confused. How to get the clsas files. And say if there are different classes made. will i get them all? or hmm...help lol :big grin:
     
  7. hondab16

    hondab16 New Member

    Joined:
    Oct 29, 2002
    Messages:
    203
    Likes Received:
    0
    most of the times the source code is not posted on a site - only the compiled byte-code files are. i think you are a bit confused. this is how java works:

    you write a program with .java files. this is where your source code goes. you can open a .java file with just about anything....IE, notepad, any text editor. when you're ready to run your program, you must first compile the .java source into byte code. this is what the .class file is. you cannot view the contents of a .class file (well you could, but it would look like a bunch of garbage that meant nothing). you then execute the .class file with the java virtual machine that is installed on the computer.

    so...if you want to edit the game, you need the .java files. make your changes in there, and then compile them and execute the class files. but like i say, the .java files usually arent stored on the website unless its open-source.

    people are talking about jar files in this thread too. dont let it confuse you, they're nothing more than a .zip file essentially. they can contain all class files, or all class and all java files. you'll usually want to use an IDE to open a jar file, athough i think winzip would work.

    if you're not familiar with how java works with class paths and packages, then i suggest you dont waste your time in trying to modify and re-compiling the game.

    anyways i hope this helps a little in explaining it.
     

Share This Page