Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Running a JAVA program

Posted on 2004-10-26
9
Medium Priority
?
254 Views
Last Modified: 2010-03-31
Hi. I have Downloaded all the necesarry JAVA files I need. the SDK one I needed I downloaded. Now, (since I'm learning JAVA in school) I created a ".java" file but it doesn't execute using javac.exe or java.exe through the command prompt. I know this is probably been discussed on the homepage, But all I want to know is what I have to do (since I have the necesarry files) to compile and run a java programs. a step by step procedure would be helpful. Thanks.

Ryan
0
Comment
Question by:ryan423
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 37

Accepted Solution

by:
zzynx earned 150 total points
ID: 12411162
0
 
LVL 6

Expert Comment

by:expertmb
ID: 12411187
to compile
C:\myprogramdir\javac fileName.java
to run
java fileName
0
 
LVL 6

Expert Comment

by:expertmb
ID: 12411208
just check
@ the prompt do
C:\javac
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 37

Expert Comment

by:zzynx
ID: 12411301
All possible problems you could have with the classpath are described in the link I posted
0
 

Author Comment

by:ryan423
ID: 12418475
i'll check out the link thanks. would it be a permanent solution or would i have to do it everytime?
0
 
LVL 1

Expert Comment

by:Mindbender
ID: 12418502
This is not an answer but advice.

You should consider downloading NetBeans from www.netbeans.org, or if you don't like IDE's, at least something like TextPad from www.textpad.com that can call the compiler for you. Especially earlier on in your learning career, NetBeans will be extremely useful for managing packages and error tracing. You have to pay for textpad, but NetBeans is 100% free.

0
 
LVL 37

Expert Comment

by:zzynx
ID: 12419203
>> would it be a permanent solution or would i have to do it everytime?
You have both options available
0
 

Author Comment

by:ryan423
ID: 12421742
All I had to do was set the path variable to something like "C:\j2sdk1.4.2_06\bin". Now it's permanent. Thanks a many zzynx.
0
 
LVL 37

Expert Comment

by:zzynx
ID: 12422038
Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question