Can anyone turn some java text files into a functional program?

There is a small program that a fellow made (open source code) in java. However, I know NIL about java (or programming) for that matter. I've had problems compiling it and I'm hoping some kind hearted soul can turn this into a functional program. Or at least be willing to walk me through it step by step... Thanks!

Best Answer

If the files you have downloaded have a .java extension, then these steps will work for you. If the files have a .class extension, you will have to look fourther down the page to section 'Getting the Command Prompt'.

Getting the Compiler:

You will need to have the java compiler. It is free.
You should read the read me file here

You are advised to read the 'Installation Instructions', available here
or for windows here

The compiler is available from here.
Look down the page until you the the section headed 'JDK 5.0 Update 9' and press the '>> Download' button to the right.

Getting the Command Prompt:

After getting the compiler and installing it, you need to open the command prompt.
This is accessed from the Start Menu, click on the windows 'Start' button.
Click on 'All Programs'.
Look for 'Accessories', and click on it (if needed).
In here should be 'Command Prompt'. Click on this.

Now is perhaps the hard part. You need to navigate through the command prompt to get the to folder you have the java files in.
For simplicity, I will call the file that holds these java files, 'C:\code'
This means, it is a folder on your C drive.
You need to type this into the command prompt, without the quotes.
'cd C:\code'
Then press enter.
You may need to change this, according to where your files are located.

If you do not have to compile the '.java' files as you have the '.class' file, go to 'Running the Program'.
If you need to compile the '.java' files, continue to 'Compiling the Files'.

Compiling the Files:

You should be in the folder that contains the .java files.
For simplicity, I will assume the name of the .java file is ''
Type into the command prompt, again without the quotes
The compiler, named 'javac', should compile the code.
If there are no errors, it should produce a .class file, named 'Example.class'.
If you have errors, hmm, you may have to go back to where you got the file, or ask another question.

Running the Program:

Once you have the .class files, I will call them 'Example.class', you can compile the program into a functioning program.
Type into the command prompt the following line, without the quotes.
'java Example'

This should run the program.

If you have more than one file, you will have to compile each file seperately, as mentioned above in 'Compiling the Files', before you can run the program.

It is the file with the 'public static void main(String[] args)' method that you call from the command prompt with 'java Example'.

30 Related Question Answers Found Date
Microsoft word? 2022-01-19 06:09
Help with html form redirect function - how do you redirect to external site after form submitted? 2022-01-19 06:09
How do i create a Java Library Maintenance System. Any recommended website for me to refer? 2022-01-19 06:04
How do i change the background of my picture using Adobe photoshop? 2022-01-19 06:04
what is RSS( technology) , advantage and disadvantage, funtion or system of RSS? 2022-01-19 05:57
is java programmer is also called java developer?please explain if there is a difference? 2022-01-19 05:38
How do you create a lead capture page by yourself? 2022-01-19 05:33
Can anyone tell me, concisely, the differences between vb, vb6, vbscript, vbnet? 2022-01-19 05:13
What does the suffix .INI in BOOT.INI mean? 2022-01-19 05:12
Is there a free software to to send direct html e-mail? 2022-01-19 04:57
write a program to add two numbers without using arithmetic opereations ( +,-,*,/,%)? 2022-01-19 04:57
Trigger Delete in SQL? 2022-01-19 04:40
???.net it's urgent !? 2022-01-19 04:18
hi frnds, which book is the best for pl sql "brush up" learning with "interview" point of view? 2022-01-19 04:13
can you plz explain me with this? 2022-01-19 04:00
How in C programming,we can assign a float value to a char value? 2022-01-19 03:54
How do I change my windows title bar using dreamweaver? 2022-01-19 03:44
What is the function of 'post slug' when writing a post in WordPress? 2022-01-19 03:43
Question about visual c++? 2022-01-19 03:42
Visual Basic 6 ADO problem? 2022-01-19 03:37
Why do a lot of ERP implementaions fail?javascript:void(0);? 2022-01-19 03:25
hello , plz where i could find a free library"" psd files ""specially landscape images? 2022-01-19 03:24
Where do I get a good tutorial for SAP & ABAP programming online for free? 2022-01-19 03:13
How can I access samba shared folder in the shell(linux)? 2022-01-19 03:13
Any GOOD web page designers you can trust on line? 2022-01-19 03:03
How can I animate my picture? 2022-01-19 02:54
my C programs are compiling with no error in turbo c++ i am not able to see the output???plz help..? 2022-01-19 02:46
phpbb upgrade within php-nuke? 2022-01-19 02:31
how do i get? 2022-01-19 02:23
who composed the theme music you hear when you open windows xp? 2022-01-19 02:21