Results 1 to 5 of 5
  1. #1
    artemff is offline Member
    Join Date
    Dec 2009
    Posts
    41
    Rep Power
    0

    Question *.java to *.class

    How convert *.java-file to *.class file??

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    10

    Default

    Using the command prompt, navigate to the folder in which your java files are located with the cd command:
    atThePrompt>cd folder
    Then use the compiler to compile the files with:
    folder>javac *.java
    The class files should appear in the same folder. To send them elswhere, say the classes folder, use the -d switch:
    folder>javac -d classes *.java

  3. #3
    artemff is offline Member
    Join Date
    Dec 2009
    Posts
    41
    Rep Power
    0

    Default

    hardwired,Thanks

  4. #4
    gcampton Guest

    Default

    and the run them simply: java filename.with_no_extension

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,370
    Blog Entries
    1
    Rep Power
    21

Similar Threads

  1. Replies: 1
    Last Post: 05-31-2009, 10:57 PM
  2. Replies: 1
    Last Post: 05-31-2009, 02:17 PM
  3. Replies: 16
    Last Post: 05-28-2009, 03:41 PM
  4. Replies: 14
    Last Post: 05-28-2009, 05:44 AM
  5. class.java to class.exe
    By f_the_cook in forum New To Java
    Replies: 11
    Last Post: 07-16-2008, 02:24 PM

Posting Permissions

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