Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: how to compile your .java files

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation how to compile your .java files

    how to compile your .java files with: "Java SE Development Kit 7"


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: how to compile your .java files

    i have jdk 7, and when i run javac.exe with my .java file as argument and then when i look in the folder where my .java file was ther is no class file!!!
    btw when i type in cmd javac C:\test\les1.java it says that it isn't a command

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: how to compile your .java files

    How are you running javac?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Junior Member
    Join Date
    Nov 2011
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: how to compile your .java files

    just typing in command promt
    javac
    but it says it isn't a command
    i do it by "run" and it doesn't create a .class file

  6. #6
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: how to compile your .java files

    At the very top of the page I sent you, there's a link to this, which explains exactly what's going on: Lesson: Common Problems (and Their Solutions) (The Java™ Tutorials > Getting Started)
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  7. #7
    Think of me.... Mr.777's Avatar
    Join Date
    Mar 2011
    Location
    Pakistan
    Posts
    1,136
    My Mood
    Grumpy
    Thanks
    20
    Thanked 82 Times in 78 Posts
    Blog Entries
    1

    Default Re: how to compile your .java files

    when i type in cmd javac C:\test\les1.java it says that it isn't a command
    It's surely not a command.

    First, cd to the directory where your .java exists. Then compile it.

Similar Threads

  1. how to compile java and import it as package
    By clementnas in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 19th, 2011, 05:53 AM
  2. Can't compile .java file in JDeveloper due to missing files
    By javanewbie2 in forum Java Theory & Questions
    Replies: 4
    Last Post: July 7th, 2011, 10:22 AM
  3. [SOLVED] Compile a set of java files for a sudoku program
    By kanishk.dudeja in forum Java Theory & Questions
    Replies: 7
    Last Post: June 16th, 2011, 09:54 AM
  4. [SOLVED] Netbeans 7.0 won't compile files.
    By Melawe in forum Java IDEs
    Replies: 3
    Last Post: June 14th, 2011, 04:38 AM
  5. [SOLVED] help in java i cant compile this
    By timeline in forum What's Wrong With My Code?
    Replies: 5
    Last Post: April 15th, 2010, 02:11 PM