Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-29-2008, 03:07 PM
Member
 
Join Date: Jul 2008
Posts: 3
thelukestir is on a distinguished road
'cmd' is not recognized as an internal or external command
Hi i am trying to use some tutorials online to learn the basics of java but i cant seem to get anything to work this is the tut im using now codelords.net/mambo3/content/view/26/39/1/0/ Part 2: Getting started - The Tutorial Den[/url] but once i get to page 3 and i try to run cmdline.bat it gives me this error:'cmd' is not recognized as an internal or external command, operable program or batch file then it says press any key to continue .... help? i think it may be somehting about me editing my path variables... i cant seem to get those right

Last edited by thelukestir : 07-29-2008 at 03:20 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-29-2008, 06:11 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,223
Norm is on a distinguished road
You need to show the command that you are entering. Copy the full text of the console here.
What OS are you on?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 07-29-2008, 07:00 PM
Member
 
Join Date: Jul 2008
Posts: 3
thelukestir is on a distinguished road
i have done this so far
i put this into a notepad document and saved as Jackpot.java

class Jackpot
{
public static void main(String[] args)
{
System.out.println("Welcome to Jackpot3000!");
}
}

then put this into a notepad and saved as cmdline.bat

cmd
pause

then i run cmd.bat and the error message opens... im running Windows XP Professional
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 07-29-2008, 07:09 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,223
Norm is on a distinguished road
Quote:
Copy the full text of the console here.
What are you expecting to happen?
What you've typed above is very confusing.
How is the Jackpot.java file involved in your project?
If your create a batch file named cmdline.bat and then enter cmd.bat ??? Should you be entering: cmdline.bat instead?

Here's what I see on a console on XP:
Quote:
C:\Temp>cmdline.bat

C:\Temp>cmd
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 07-29-2008, 08:19 PM
Member
 
Join Date: Jul 2008
Posts: 3
thelukestir is on a distinguished road
i have a link to the tutorial in my first post but you have to copy + paste into browser... the issue is i cannot type anything into the command prompt because when i open it it comes up with this

'cmd' is not recognized as an internal or external command, operable program or batch file then it says press any key to continue

so i cannot enter any commands of any sort because if i type any key it will close the prompt.....
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 07-29-2008, 08:53 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,223
Norm is on a distinguished road
What OS are you on?
How are you opening the command prompt?
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 07-30-2008, 05:50 AM
Alan-LB's Avatar
Member
 
Join Date: Jun 2008
Location: Junee, NSW, Australia
Posts: 19
Alan-LB is on a distinguished road
Send a message via Yahoo to Alan-LB
You will need to compile your first file - Jackpot.java.

In Windows XP go to Start > All Programs > Accessories > Command Prompt. In this window you will need to type
"javac Jackpot.java" (without the quotes) this will compile your source code into a Bytecode file called Jackpot.class

Then type "java Jackpot" (without the quotes) to execute your program. After running your program type "exit" to close the Command Prompt window.

You can also open the Command Prompt window by going Start > Run (or Windows key + R) and entering "cmd" (without the quotes) .

Forget your cmdline.bat file. I think you need to learn what "command line" really means and how to use it. If your program doesn't compile or execute post the errors IN FULL here. You may need to know how to set your Path to point to the JDK directory.

Alan
__________________
There are 10 types of people - those who understand binary and those who don't!!
Today is the Beta version of Tomorrow!!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internal Frame order and canvas Z Index dazza-s New To Java 3 05-29-2008 08:20 AM
Eclipse's internal Tomcat vadimf Eclipse 0 02-14-2008 11:37 AM
javac not recognized as an internal or external command kotoko New To Java 6 11-05-2007 02:39 PM
Unable to execute command line command in java LordSM New To Java 1 08-08-2007 02:23 AM
an internal error occurred during refresh christina Eclipse 1 08-06-2007 11:37 PM


All times are GMT +3. The time now is 01:24 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org