How to Open and Edit Java Files ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • orangemonkey
    New Member
    • Apr 2007
    • 16

    #1

    How to Open and Edit Java Files ?

    Hey. Naive question, how do you open and edit java files? I use NetBeans IDE 6.01.

    Let's say I save a hello world program, I try to double click it, use the open with Netbeans, notepad, anything I could, but I all I get are these weird characters.
    Shouldn't it just open, ready to edit with my installed IDE, like C++ files?

    I've also installed JDK 6 update 5.

    Thanks for reading ! :)
  • Laharl
    Recognized Expert Contributor
    • Sep 2007
    • 849

    #2
    If you're trying to edit a .class file, all you'll get is garbage, since those are compiled bytecode (like the machine code your computer uses to do anything) that tells the Java Virtual Machine what to do. If you have a .java file, you can look at the source code and compile that into a .class. .java files can be opened in your text editor of choice, such as Notepad.

    Comment

    • chaarmann
      Recognized Expert Contributor
      • Nov 2007
      • 785

      #3
      Originally posted by orangemonkey
      Hey. Naive question, how do you open and edit java files? I use NetBeans IDE 6.01.

      Let's say I save a hello world program, I try to double click it, use the open with Netbeans, notepad, anything I could, but I all I get are these weird characters.
      Shouldn't it just open, ready to edit with my installed IDE, like C++ files?

      I've also installed JDK 6 update 5.

      Thanks for reading ! :)
      if you want to see the code of a *.class file, you can use a decompiler like FrontEnd Plus and open it there.

      Comment

      Working...