Domain Discussion Board

Go Back   Domain Discussion Board > General > Tutorials

 
Reply
 
LinkBack Thread Tools Display Modes
Setting up enviroment variables
Old
  (#1 (permalink))
Kabraxis
 
Status:
Posts: n/a
Points: 0
Bank: 0
Total Points: 0
Donate
Setting up enviroment variables - 09-10-2006, 12:51 AM

This is only useful for if you know Java, and want to compile a Java script
I will begin with bringing the word compiler into context. The function of the compiler is to convert .JAVA text files that are scripts into .class files that contain recognizable java commands.
The first thing you will need is the Java Runtime Environment (JRE), the latest version can be found easily at www.java.sun.com, and downloading JRE 1.5.0 that comes with JDK 1.5.0. You should select an installation folder for this to be installed in, and it is easy to stick it into a Program Files folder, entitled Java, and this is the EXAMPLE I will be using during the remainder of this tutorial. If you cant find where to download it, just search google for somthing like "jdk 1.5.0 download"
Once it is installed, you should see the folders 'jdk1.5.0' and 'jre1.5.0', the important one here is 'jdk1.5.0', because inside of it is what we will be using, the file entitled 'javac' The files are usually located in C:\Program Files\Java
Now technically if you had the java, you could skip all of the above and come down to this point, as in, this is the most important part of this tutorial.
To configure your compiler, you need to set a system path. Thus, for most windows versions, you can use Start>Control Panel>System, as this is the area which you need to reach.
If you want to do it an easier way without going into your control panel, follow the instructions below
1. Right click on My Computer
2. Go down to Properties
3. Click Properties
4. On the right side of the properties of My Computer, you should see somthing like this:
http://img120.exs.cx/img120/3285/sys1.jpg
5.Now click Advanced
6. Now click on Eviromental settings
7. Now Im going to show you a picture how I have my compiler set up on my computer (yes i had trouble setting it up when is started java aswell so i tried whole buch of different ways untill i got it working )
http://img129.echo.cx/my.php?image=java6ka.gif
**most important part of my tutroral
9. Now click on New (when you in envimomental settings) - if not go back to step 1
10. like i was saying, click on New, and type in these variables.. (dont know which one, but one of these is bound to work since it did for my computer
when you click on New, you will see somthing like this:
Variable name:
Variable value:

So for Variable name: enter this "JAVAC"
and for Variable value: enter C:\Program Files\Java\jdk1.5.0_03\bin (assuming that is where ur java it is located)
Then press OK
Now go back, and do it again
(assuming you know how to do it from pervious steps)
Variable name:PATH
Variable Value:C:\Program Files\Java\jdk1.5.0_03\bin
************************************************** ******
There you have it set up. (if you have java installed in that folder!)
Now i will tell you how to compile
get a .bat file (or make one, or ask me..) and right click on it and go to edit
and type in the following code
Code:
@echo off
javac MYFILE.java
pause
MYFILE = the files name you are compiling!
Now go to file go down, and go to save

Now click on it, if you see it say "press any key to continue" with nothing else, you have succefully compiled it. and look in your folder to see the .class file
Few tips:
Always compile a file where the source is located
Java is case senistive, so if you type in..
Code:
@echo off
javac myfile.java
pause
and your files name was Myfile.java
Then it will not compile correctly.
Anyways, post back if this helped
& if you still need help, pm me or post back explaining what your problem is
~ Kabraxis
   
Reply With Quote
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

Points Per Thread View: 1.0
Points Per Thread: 15.0
Points Per Reply: 5.0


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up a domain name Ottica Domain Name Discussion 4 06-06-2006 10:46 PM
Setting up my domain Hydro Domain Name Discussion 1 06-01-2006 12:56 PM


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 ©2007, Crawlability, Inc.