Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Posts
    6
    Rep Power
    0

    Question How to run a project with the command prompt?

    Well this is my first post here:)

    Well I haven't been able to find this on the internet. When I go to run my project I want it to run in the command prompt, like it does in JCreator. Instead it runs in the IDE itself. Any ideas?

    Thanks

  2. #2
    soheil is offline Member
    Join Date
    Aug 2009
    Posts
    21
    Rep Power
    0

    Default

    IDE gives you a shell, but you want to run in a real shell try java -jar "your jar file name" in bash

  3. #3
    Join Date
    Jul 2009
    Posts
    6
    Rep Power
    0

    Default

    Im still lost, can you tell me step by step

  4. #4
    Aseem is offline Senior Member
    Join Date
    Mar 2009
    Location
    USA
    Posts
    127
    Rep Power
    0

    Default

    * download JDK
    * create a folder where you want to save all your work.
    * open notepad and write your java code and save it in that folder.
    *open command promt..
    * change directory to that folder
    * set your path e.g C:\mywork> set path=%path%;C:\Program Files\Java\jdk1.5.0_09\bin
    here mywork is the folder you have created to save your java files
    * after you set path
    * type javac <filename>
    java filename

    you are done..!

  5. #5
    Join Date
    Jul 2009
    Posts
    6
    Rep Power
    0

    Default

    Is there a way to run it in there automatically like in JCreator?

Similar Threads

  1. how to get the values from command prompt
    By tej in forum New To Java
    Replies: 3
    Last Post: 05-02-2009, 08:32 AM
  2. help me!!!! about command prompt..
    By kureikougaiji in forum New To Java
    Replies: 2
    Last Post: 11-13-2008, 06:15 PM
  3. Regular expressions from command prompt
    By GenkiSudo in forum New To Java
    Replies: 2
    Last Post: 09-21-2008, 02:40 PM
  4. Running eclipse java project on command prompt
    By hnmapara in forum New To Java
    Replies: 1
    Last Post: 07-09-2008, 08:29 AM
  5. Problem during executing Command Prompt
    By keshari in forum Advanced Java
    Replies: 4
    Last Post: 06-05-2008, 04:06 AM

Tags for this Thread

Posting Permissions

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