Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

enviornment variable set up problem

Posted on 2003-11-19
14
Medium Priority
?
421 Views
Last Modified: 2010-03-31

hi , is there anybody who run java programs in SciTE editor. i have downloaded this from http://www.scintilla.org/SciTEDownload.html. somebody suggested this in this forum and also suggested how to run java programs in this editor.but when i tried to compile ...i got message "javac squareroot.java (of course ,this is my source file) file cannot found".

forum suggestion was to set up the correct path(enviornment variable). but unfortunately i am not able to do that. i went to the control panel>system>advance>.....>path. and clicked edit and got a small window which contained

variable name : path
variable value: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem

what should i do now??? let me tell u also my java compiler is in c:\
i.e c:\java\bin .......so i tried like below..

variable name : path
variable value: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem ;c:\java\bin

then clicked ok. i saved my squareroot.java in f:.then i compiled but got the same message.... plzzzz help to fix this...

this editor is interesting. generally i run my program from command line by going to bin directory writing on a notepad. i have sun java 1.4.1 and win-xp system.

thanks
0
Comment
Question by:sanko50
[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
  • 5
  • 4
  • 3
  • +1
14 Comments
 
LVL 92

Accepted Solution

by:
objects earned 105 total points
ID: 9777106
did u restart the editor after changing the PATH.
0
 
LVL 35

Expert Comment

by:girionis
ID: 9777153
 If you are running your editor using command lien I think you need to restart your cmd window.
0
 
LVL 14

Expert Comment

by:StillUnAware
ID: 9777507
This problem may be caused by your editor. For example UltraEdit32 supports many programming language text highlighting and many other things including running commands, such as javac.
  First I set up the system variable - PATH (you already done this)
  Then set the command line I would like to use: javac -deprecation %P%n.java
( two variables have their meanings: %P - currently edited file path (DOS format), %n - file name (Windows format)
  And it works fine.

This was only an example, I also had such a problem. I don't use SciTE editor, but I think you should read about parameter passing and internal command running in editors help more aqurately
0
The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

 

Author Comment

by:sanko50
ID: 9777559

is this setting correct??

 variable name : path
variable value: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem ;c:\java\bin


plz note...my java is in C:\java\bin   and source code is in  F:\

i  DID NOT RESTART the editor.... i will check this

i simply clicked on the compile menu  after writing the source code....and saw a vertical window to come up where it says " javac squareroot.java (of course ,this is my source file) file cannot found".
0
 
LVL 35

Expert Comment

by:girionis
ID: 9777579
> is this setting correct??

  It seems correct given that you have installed java in the c:\java folder.

> where it says " javac squareroot.java (of course ,this is my source file) file cannot found".

  It should say: "javac f:\squareroot.javafile"

  Is there any way to tell your editor explicitly where to find the source files?
0
 
LVL 35

Expert Comment

by:girionis
ID: 9777585
>  It should say: "javac f:\squareroot.javafile"

  should be

 It should say: "javac f:\squareroot.java"

  gievn that your source code is in the root of F
0
 
LVL 14

Expert Comment

by:StillUnAware
ID: 9777632
http://www.scintilla.org/ScintillaDoc.html

I liked this editor, I only noe tried, it's pretty good, but still I didn't found the solution to your problem, try the link, maybe you'll find
0
 
LVL 92

Expert Comment

by:objects
ID: 9778016
> i  DID NOT RESTART the editor

you'll need to restart the editor to pick up the PATH changes.
0
 

Author Comment

by:sanko50
ID: 9778462

yes at last it is running....i am getting output.  i RESTARTED the editor and its working irrespective of where i am putting my source file.
all i did is i clicked compile in tool menu and then i clicked Go. i am getting the output...


>javac Squareroot.java //after clicking compile
>Exit code: 0
>java Squareroot //after clicking Go
y=2.23606797749979
>Exit code: 0

(1)what is this " Exit code: 0 "....its automatically coming in the output?????

(2) what actually this enviornment varialbe  path set up means????

thanks


0
 
LVL 92

Expert Comment

by:objects
ID: 9778580
(1)what is this " Exit code: 0 "....its automatically coming in the output?????

Thats normal, just telling you it exitted normally.

(2) what actually this enviornment varialbe  path set up means????

It tells the OS where to search for programs, in your case javac.
0
 

Author Comment

by:sanko50
ID: 9779929


" It tells the OS where to search for programs, in your case javac"
...............plz  explain more.
0
 
LVL 92

Expert Comment

by:objects
ID: 9781920
When you type javac (or any command), the OS searches the directories in the PATH to locate where the javac executable is on your file system.
0
 

Author Comment

by:sanko50
ID: 9782367
thanks
0
 
LVL 92

Expert Comment

by:objects
ID: 9782388
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

715 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