• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

I feel kinda dumb but...

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My Unix/windows2k system totally crashed...well i installed them both and got them both running again on Windows2k....Well i installed jdk1.3.1 and jcreator(the editor i use)....
Here is the problem for u experienced java people....i Can't run "javac or javadoc" from the command line....it says that it is unrecongized batch file....I set the path for java so it is first...PATH=C:jdk1.3.1\bin;C:......blah.....
...Even thought i cant javac, my editor still will compile files...and works flawless...that doesnt make any sense....
I just dont understand because i need my javadoc and javac...I mean there is nothig else to configure is there....
[This message has been edited by toolshed (edited August 27, 2001).]
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes there is, JAVA_HOME c:\jdk1.3 and classpath.
 
toolshed
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do u mean JAVA_HOME....can u explain....
Thanks
------------------
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
toolshed,

Please change your name to be compliant with JavaRanch's naming policy.
Your ID should be 2 separate names with more than 1 letter each. We really want this to be a professional forum and would prefer that you use your REAL name.
Thanks,
Nathan
 
wessel zaalberg
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry, my mistake, JAVA_HOME is the environment variable that your compiler needs, but since it doesnot even start...
I suppose you can see in your W2K settings system/ advanced and environment your path?
If it is not defined there the command line won't have it.
You can also check on the commandline : path or set
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, i did as u said i could not get it to work....man this is crazy...I dont have a clue now....it is like it doesnt even recongize the javac or any of the tools in the bin directory....
[This message has been edited by Shane Bradley (edited August 27, 2001).]
 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your right, this does not make any sense. Usually when something like this happens to me, it is something VERY SIMPLE. I would try invoking javac.exe from the command line, typing in the full path (i.e. c:\jdk1.3.1\bin\javac.exe). If that doesnt work, double-check and triple check your spelling. If that is not the problem, go to the c:\jdk1.3.1\bin directory at the command prompt, and run javac.exe from there.
Good luck.
 
Shane Bradley
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got it to run from the command prompt by doing this:
c:\jdk1.3.1\bin\javac.exe
Now what...
do u have any idea(because i dont) how i am suppose to use javac...
Where is my editor envoking this javac to complie the file, like i said before it compiles fine...I hate computers when they acted like this...but i guess they are only as good as what they are told....
[This message has been edited by Shane Bradley (edited August 27, 2001).]
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So when you type PATH at the command line, what do you see? Are you sure that c:\jdk1.3.1\bin is in it? Check it very very carefully. As far as your Java editor goes, did you have to tell it the location of javac.exe, or did it know on its own?
 
Shane Bradley
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First off....i just want to know why this doesnt work....i think i am going to use Emacs tell i get this ....
THis is what i get when i use path at command line...
Path=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\jdk1.3.1\bin
In user setting for mycpu\props\advance\enviromental variables\user variables :
Name: JAVA_HOME
Value: c:\jdk1.3.1
When I use javac.exe.....I get the options menu(--help)
I dont know man what is up with this...I got to start writing javadoc's this weekend for my program i am writing...i got to get this fixed some how....
I thought this was a self install...and then change two paths and that was it....i have had stuff in Suse easier than this...
BTW thanks for the help so far....we might figure it out...

[This message has been edited by Shane Bradley (edited August 27, 2001).]
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you say you get the help when you get the options menu(--help) do you mean you get this:
C:\jdk1.3.1\bin>javac
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-O Optimize; may hinder debugging or enlarge class fil
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are u
ed
-classpath <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-target <release> Generate class files for specific VM version
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, and by the way Shane, if you were able to make c:\jdk1.3.1\bin\javac.exe work, then c:\jdk1.3.1\bin\javadoc.exe should also work. Just javadoc all your code from the command line if need be. I usually write a batch file for each of my projects to do my javadocs.
Let me recap the current state of affairs here so we are on the same page:
1)You can compile from your JCreator
2)You can compile from the command line using c:\jdk1.3.1\bin\javac.exe
3)You can't compile from the command line just using javac.
If these are the correct facts, you are OK. You should be able to do everything you need to do.
 
Shane Bradley
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes those are the facts, but when i use something i want it to work correct if at all possible....
i wonder why none of ny tools are being refrenced....
javac works i just need a pointer of some sort....
What u think...
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK - Try this: Create a batch file called test.bat that does nothing. Just put a line in it that says pause. Save it in C:\jdk1.3.1 and set c:\jdk1.3.1 in your PATH system variable. Now try to execute test.bat from the c:\ prompt. If this works, move test.bat to the c:\jdk1.3.1\bin directory and make sure c:\jdk1.3.1\bin is in your path. Now try running it again from the c:\ prompt.
I am curious to hear how this works for you.
 
Shane Bradley
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That worked....I created a bat file that paused, then created a the directory listing of the jdk1.3.1 directory...
I threw the test.bat into the jdk1.3.1 directory and went to the command and typed test.bat...and that also worked....
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now stick that .bat file in your bin directory, tehn go to c:\ and try to run it from there.
 
Shane Bradley
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are getting somewhere....it did not work in the jdk1.3.1\bin directory, but worked outside the bin...in just the jdk1.3.1 directory....
So inside bin == no work
...outside bin === work
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK. I feel like we are getting somewhere. Something has got to be wrong with your path. Do you have c:\jdk1.3.1 in your path? You must if you were able to run the .bat file from outside that directory. Can you go to Settings-->Control Panel-->System and copy and paste your PATH variable here?
 
Shane Bradley
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If u ever come to Cullowhee, NC(in the Mountains of NC)...I will buy u drink....

U did it man...congrats to you...Like u said something with the path....After i ran that bat file I started messing with the path...I just changed %path%;C:\jdk1.3.1\bin to %path%;c:\jdk1.3.1;c:\jdk1.3.1\bin....
And that worked...I cant thank u enough....It was starting to tick me off...
Btw one more question...what are the flags you need to run javadoc.
javadoc -flags [filename or path to it]
[This message has been edited by Shane Bradley (edited August 28, 2001).]
 
Ranch Hand
Posts: 1012
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do you mean flags or tags? either way, try this link... i am sure you will find what you need there.
good luck!
 
Shane Bradley
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
example
javadoc -asdf [filename]
What "-asdf" do you need to open the file...search for /**...then display in html windows
[This message has been edited by Shane Bradley (edited August 28, 2001).]
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would go to the link specified above to really take adavantage of javadoc. To answer your question quick and dirty all you have to do is something like:
javadoc.exe -d c:\api c:\src *.*
where your source files are in c:\src and you want your javadocs to be written to c:\api. There are lots of options for doing this better. Go read the link above to find a solution that fits your needs more closely.
Oh and don't thank me too much for figuring out the javac thing -you did the work yourself. Just remember if soemthing isn't working just make the simplest case work and then escalate from there. This applies very much to coding also.
I suspect something is still wrong with your system though, if you already had c:\jdk1.3.1\bin somewhere in your path it should have worked. Im not sure why adding c:\jdk1.3.1;c:\jdk1.3.1\bin to the path would suddenly make the bin directory visible through the path variable. Something strange is still going on.
Did you happen to have JCreator running when you were unsuccessfully trying to invoke javac before?
I would try messing with it some more - try just having c:\jdk1.3.1\bin in your path, and restart your machine, and dont start JCreator, and then try invoking javac. Im thinking that JCreator may have its own compiler and it is doing something to your path variable when you start it. (Just a far-reaching guess)
 
reply
    Bookmark Topic Watch Topic
  • New Topic