There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
black screen blue screen blue screen of death boot computer connection crash css dell display driver drivers error excel firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem ram router slow software sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
java cmd line help


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
tenniskev18's Avatar
Junior Member with 18 posts.
 
Join Date: May 2007
Experience: Intermediate
16-Jan-2008, 05:54 PM #1
java cmd line help
Hey guys! This is my second java class and in the first we didn't have to use cmd. It was like behold and then go on. lol

Anyways our TA's that grade our assignments use the cmd to check our programs.

Well.. how can i get a program to compile in the cmd? I can get it to run.
also if i go into a directory, how can i go backwards?

Last question, what command do i use to open through cmd with applet viewer. Is it Appletviewer ?

Thanks
Chicon's Avatar
Computer Specs
Distinguished Member with 6,681 posts.
 
Join Date: Jul 2004
Location: 50° 34' 07.13" N - 04° 10' 23.
Experience: Second socks retriever
17-Jan-2008, 01:41 AM #2
Hi tenniskev18,

To compile your JAVA program, you have to use the command javac.exe.
On a Windows standard installation, both javac.exe and appletviewer.exe files are stored in the following directory :

C:\Program Files\Java\jdkXXX\bin where XXX is the version number of the JDK.
r3drock3t88's Avatar
Computer Specs
Senior Member with 234 posts.
 
Join Date: Jan 2007
Experience: Advanced
18-Jan-2008, 06:47 PM #3
to compile code through command line you have to navigate to the folder your code is in by using the "cd" command...for example, if I wanted to navigate to a folder named "java" that is in my C drive, I'd type this...

cd c:\java

and my command line would now be in the directory "C:\Java" ... While in there, to compile your code you type this line ...

javac nameOfFile.java

and it should compile successfully. if it doesn't that means you didnt tell your command line where java is located at on your computer. I am not 100% certain where you need to go for this because I did it awhile ago, but you can easily find help on google, unless someone here knows the directions.

If it compiles correctly, to run it type this...

java nameOfFile

And hit enter, you should be good to go!
__________________
If you're interested in learning how I make 100% FREE & LEGIT money each month through surveys, check out my personal website below!

Storhino's Personal Blog - Make Money Online!

I wrote an article on how I do it and a picture of my check will be up ASAP... so check it out, it's 100% FREE to participate, and I promise you will receive a personal check when your first months over! .

r3drock3t88
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 07:13 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.