Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Run project in Command Prompt
Run project in Command Prompt [message #252220] Tue, 25 March 2008 20:02 Go to next message
Eclipse UserFriend
Originally posted by: luke42990.gmail.com

I am trying to develop java command line programs, and all goes well, but
I have one thing a cannot figure out.. That is, is there any way to have
eclipse compile and then run a project in a Command Prompt (I.E. cmd.exe
in windows)? I have seen nothing on the internet.

Any help greatly appreciated!!

~Luke
Re: Run project in Command Prompt [message #252228 is a reply to message #252220] Tue, 25 March 2008 20:14 Go to previous messageGo to next message
Eclipse UserFriend
Luke Cycon wrote:
> I am trying to develop java command line programs, and all goes well,
> but I have one thing a cannot figure out.. That is, is there any way to
> have eclipse compile and then run a project in a Command Prompt (I.E.
> cmd.exe in windows)? I have seen nothing on the internet.
>
> Any help greatly appreciated!!
>
> ~Luke
>
Hi Luke. A simple way to do it is to export your classes to a JAR file
and the run the JAR file at the command prompt (e.g., java -jar
myjarfile.jar). You can also execute class files from the command
prompt, exactly like you would do without Eclipse. Hope this helps. Mark
Re: Run project in Command Prompt [message #252232 is a reply to message #252228] Tue, 25 March 2008 20:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: luke42990.aim.com

I have examined this, but that seems rather cumbersome. I was hoping to be
able to use something like the run button to have eclipse automatically run
the application. I am looking to use this in testing, therefore changing
the code then exporting then running in another command prompt seems
inefficient.

Thanks for the help,
Luke Cycon
"Mark Dexter" <dextercowley@gmail.com> wrote in message
news:fsc4il$429$2@build.eclipse.org...
> Luke Cycon wrote:
>> I am trying to develop java command line programs, and all goes well, but
>> I have one thing a cannot figure out.. That is, is there any way to have
>> eclipse compile and then run a project in a Command Prompt (I.E. cmd.exe
>> in windows)? I have seen nothing on the internet.
>>
>> Any help greatly appreciated!!
>>
>> ~Luke
>>
> Hi Luke. A simple way to do it is to export your classes to a JAR file and
> the run the JAR file at the command prompt (e.g., java -jar
> myjarfile.jar). You can also execute class files from the command prompt,
> exactly like you would do without Eclipse. Hope this helps. Mark
Re: Run project in Command Prompt [message #252236 is a reply to message #252232] Tue, 25 March 2008 20:52 Go to previous messageGo to next message
Eclipse UserFriend
Luke Cycon wrote:
> I have examined this, but that seems rather cumbersome. I was hoping to be
> able to use something like the run button to have eclipse automatically run
> the application. I am looking to use this in testing, therefore changing
> the code then exporting then running in another command prompt seems
> inefficient.
>
> Thanks for the help,
> Luke Cycon
> "Mark Dexter" <dextercowley@gmail.com> wrote in message
> news:fsc4il$429$2@build.eclipse.org...
>> Luke Cycon wrote:
>>> I am trying to develop java command line programs, and all goes well, but
>>> I have one thing a cannot figure out.. That is, is there any way to have
>>> eclipse compile and then run a project in a Command Prompt (I.E. cmd.exe
>>> in windows)? I have seen nothing on the internet.
>>>
>>> Any help greatly appreciated!!
>>>
>>> ~Luke
>>>
>> Hi Luke. A simple way to do it is to export your classes to a JAR file and
>> the run the JAR file at the command prompt (e.g., java -jar
>> myjarfile.jar). You can also execute class files from the command prompt,
>> exactly like you would do without Eclipse. Hope this helps. Mark
>
>
Why do you want to run the programs from the command prompt during the
development process? You can simulate any behavior you need from inside
Eclipse, including command line input/output and arguments. Mark
Re: Run project in Command Prompt [message #252241 is a reply to message #252236] Tue, 25 March 2008 21:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: luke42990.aim.com

I am trying to use the System.console() class. This returns a null
reference error in the eclipse console. Any further help appreciated!

Thanks,
~Luke


"Mark Dexter" <dextercowley@gmail.com> wrote in message
news:fsc6q1$33d$1@build.eclipse.org...
> Luke Cycon wrote:
>> I have examined this, but that seems rather cumbersome. I was hoping to
>> be able to use something like the run button to have eclipse
>> automatically run the application. I am looking to use this in testing,
>> therefore changing the code then exporting then running in another
>> command prompt seems inefficient.
>>
>> Thanks for the help,
>> Luke Cycon
>> "Mark Dexter" <dextercowley@gmail.com> wrote in message
>> news:fsc4il$429$2@build.eclipse.org...
>>> Luke Cycon wrote:
>>>> I am trying to develop java command line programs, and all goes well,
>>>> but I have one thing a cannot figure out.. That is, is there any way
>>>> to have eclipse compile and then run a project in a Command Prompt
>>>> (I.E. cmd.exe in windows)? I have seen nothing on the internet.
>>>>
>>>> Any help greatly appreciated!!
>>>>
>>>> ~Luke
>>>>
>>> Hi Luke. A simple way to do it is to export your classes to a JAR file
>>> and the run the JAR file at the command prompt (e.g., java -jar
>>> myjarfile.jar). You can also execute class files from the command
>>> prompt, exactly like you would do without Eclipse. Hope this helps. Mark
>>
>>
> Why do you want to run the programs from the command prompt during the
> development process? You can simulate any behavior you need from inside
> Eclipse, including command line input/output and arguments. Mark
Re: Run project in Command Prompt [message #252249 is a reply to message #252241] Tue, 25 March 2008 23:21 Go to previous messageGo to next message
Eclipse UserFriend
Luke Cycon wrote:
> I am trying to use the System.console() class. This returns a null
> reference error in the eclipse console. Any further help appreciated!
>
> Thanks,
> ~Luke
>
>
> "Mark Dexter" <dextercowley@gmail.com> wrote in message
> news:fsc6q1$33d$1@build.eclipse.org...
>> Luke Cycon wrote:
>>> I have examined this, but that seems rather cumbersome. I was hoping to
>>> be able to use something like the run button to have eclipse
>>> automatically run the application. I am looking to use this in testing,
>>> therefore changing the code then exporting then running in another
>>> command prompt seems inefficient.
>>>
>>> Thanks for the help,
>>> Luke Cycon
>>> "Mark Dexter" <dextercowley@gmail.com> wrote in message
>>> news:fsc4il$429$2@build.eclipse.org...
>>>> Luke Cycon wrote:
>>>>> I am trying to develop java command line programs, and all goes well,
>>>>> but I have one thing a cannot figure out.. That is, is there any way
>>>>> to have eclipse compile and then run a project in a Command Prompt
>>>>> (I.E. cmd.exe in windows)? I have seen nothing on the internet.
>>>>>
>>>>> Any help greatly appreciated!!
>>>>>
>>>>> ~Luke
>>>>>
>>>> Hi Luke. A simple way to do it is to export your classes to a JAR file
>>>> and the run the JAR file at the command prompt (e.g., java -jar
>>>> myjarfile.jar). You can also execute class files from the command
>>>> prompt, exactly like you would do without Eclipse. Hope this helps. Mark
>>>
>> Why do you want to run the programs from the command prompt during the
>> development process? You can simulate any behavior you need from inside
>> Eclipse, including command line input/output and arguments. Mark
>
>
Hi Luke. A Google search "system.console eclipse" yielded this article:
http://www.eclipsezone.com/eclipse/forums/t93685.rhtml. It looks like
you might be out of luck on this. You can vote for the bug, if you like.
Hope this helps. Mark
Re: Run project in Command Prompt [message #252252 is a reply to message #252249] Wed, 26 March 2008 00:27 Go to previous message
Eclipse UserFriend
Originally posted by: luke42990.aim.com

Yes, I have seen that article, looks like I am out of luck.... But do you
know and alternatives to System.Console.Readln that do not require scanners
etc?

If you happen to know one, this problem is a non-issue.

Thanks,
~Luke


"Mark Dexter" <dextercowley@gmail.com> wrote in message
news:fscfgv$hl9$1@build.eclipse.org...
> Luke Cycon wrote:
>> I am trying to use the System.console() class. This returns a null
>> reference error in the eclipse console. Any further help appreciated!
>>
>> Thanks,
>> ~Luke
>>
>>
>> "Mark Dexter" <dextercowley@gmail.com> wrote in message
>> news:fsc6q1$33d$1@build.eclipse.org...
>>> Luke Cycon wrote:
>>>> I have examined this, but that seems rather cumbersome. I was hoping
>>>> to be able to use something like the run button to have eclipse
>>>> automatically run the application. I am looking to use this in
>>>> testing, therefore changing the code then exporting then running in
>>>> another command prompt seems inefficient.
>>>>
>>>> Thanks for the help,
>>>> Luke Cycon
>>>> "Mark Dexter" <dextercowley@gmail.com> wrote in message
>>>> news:fsc4il$429$2@build.eclipse.org...
>>>>> Luke Cycon wrote:
>>>>>> I am trying to develop java command line programs, and all goes well,
>>>>>> but I have one thing a cannot figure out.. That is, is there any way
>>>>>> to have eclipse compile and then run a project in a Command Prompt
>>>>>> (I.E. cmd.exe in windows)? I have seen nothing on the internet.
>>>>>>
>>>>>> Any help greatly appreciated!!
>>>>>>
>>>>>> ~Luke
>>>>>>
>>>>> Hi Luke. A simple way to do it is to export your classes to a JAR file
>>>>> and the run the JAR file at the command prompt (e.g., java -jar
>>>>> myjarfile.jar). You can also execute class files from the command
>>>>> prompt, exactly like you would do without Eclipse. Hope this helps.
>>>>> Mark
>>>>
>>> Why do you want to run the programs from the command prompt during the
>>> development process? You can simulate any behavior you need from inside
>>> Eclipse, including command line input/output and arguments. Mark
>>
>>
> Hi Luke. A Google search "system.console eclipse" yielded this article:
> http://www.eclipsezone.com/eclipse/forums/t93685.rhtml. It looks like you
> might be out of luck on this. You can vote for the bug, if you like. Hope
> this helps. Mark
Previous Topic:How Do I change references to local methods
Next Topic:External Tool Builder isn't executed during manual build and auto build
Goto Forum:
  


Current Time: Wed Jul 23 18:06:58 EDT 2025

Powered by FUDForum. Page generated in 0.04879 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top