wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes After installation, where is log file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "After installation, where is log file?" Watch "After installation, where is log file?" New topic
Author

After installation, where is log file?

Suzie Quinn
Greenhorn

Joined: Feb 09, 2007
Posts: 4
Talk about a newbie, I can't even get past the installation. I just installed Java 1.5.0_07 on my computer, using Windows XP. I had a few problems so wanted to look at the installation log file. First off, does the installation have a log file? If so, where is it? My Java was installed into: C:\Program Files\Java . Thanks.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36486
    
  16
Welcome to the Ranch. I remember last year somebody asked whether there is an ititiation ceremony to Java, and I said there is, setting up the path and classpath.
I don't know whether there is a log file, but I don't think it will help.

You might as well download Java 6, which has been available for about 3 months rather than 1.5.0_07.

Go into the Java tutorial and find the "Hello World" example (for Windows). Also find the Windows installation instructions. Note carefully where your Java download goes, and make sure you install a JDK rather than a JRE. You usually find it goes to c:\Program Files\java\jdk1.5.0_07\bin.

I presume you have managed to install the JDK correctly, and when you go into a command prompt you get an error message on the lines of "java-bad command." Find where you have put the Java installation (see above). It may be a good idea to open the Java folder with Windows Explorer, so you can have the full path to the folder displayed. It should begin with the drive letter (usually C) and end with "bin".

There are now two "environment variables" which need to be set.
There is a very slightly different version of path setting in the installation instructions I quoted above.

Right-click the "my computer" icon, properties, click the advanced tab, then the "environment variables" button. You get a box with two lists of variables.
You need to set where the command line looks for classes, which is the "classpath." Find classpath (or CLASSPATH, I think it is usually in the upper list), and click the edit button. Go through it carefully and find out whether it contains a single dot (full stop or period), between semicolons. If you can't find it, add .; at the end of the present set of classpath variables. You may find it already contains ;.; somewhere, in which case you can just leave it. If it contains several ;.;s, I don't think that matters.
If you can't find classpath anywhere, however carefully you look, create it as a new environment variable with ;.; as its entire text.
The single . means to look in the directory which is open already, ie whichever directory you happen to have the command prompt on at the present.

Classpath is often set up before you start, but the path (or PATH variable, I think in the lower list) will not be set up correctly. The path variable tells the computer where to look for a program to execute.
Find path, click edit, and you will get a list of folders like, "C:\Windows;C:\WinNT;C:\System32;". Add the path for the folder which contains "java.exe," "javac.exe" etc. to the path. The path variable will now read something like:
"C:\Windows;C:\WinNT;C:\System32;C:\Program Files\java\jdk1.5.0_07\bin".
Make sure to spell the path exactly, but I think it is not case-sensitive.
If you have two java folders in the path, the computer will use whichever one is quoted first.
Click every OK button you can see, close your command prompt window and start again.

And don't believe what it says about using notepad, a program totally unsuitable for programming.
Download JCreator: get the free version, and use it as if it were a text editor. It does useful things like automatic indentation and automatically pairs off () and {}, reducing the risks of spending hours worrying about a compiler error caused by unbalanced {}s.

All the best. CR

[Edit]Change some 6s to 5s, and corrected class to path near start of message, and spelling errors corrected.[/edit]
[ February 11, 2007: Message edited by: Campbell Ritchie ]
Suzie Quinn
Greenhorn

Joined: Feb 09, 2007
Posts: 4
Wow!! Thanks for all the great help. You are very thorough. I appreciate that. As I implement all the things you told me about, I might have more questions, but for now, your suggestions will keep me very busy. Actually, I have one question right now. You suggested I use JCreator to write my code. Someone told me I should use NetBeans. Is it ok to use NetBeans instead of JCreator?

Also, I'd really like to see an installation log file, if that's available. Anyone know where the log file is?

Thanks again so much for your help. It is very much appreciated.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13875
    
  10

Someone told me I should use NetBeans. Is it ok to use NetBeans instead of JCreator?

Why would it not be "OK" to use NetBeans? You can use whatever IDE or other tool you like. I use Eclipse, which is another well-known and very good IDE.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36486
    
  16
Only too pleased to be able to help.

Like Jesper Young, I prefer Eclipse, but it is not a case of a good product v a bad product.
Eclipse NetBeans and JCreator are all good reliable products, and when you are more experienced you will doubtless start using one of these IDEs. [IDE=Integrated Development Environment.]

The reason I suggested JCreator is that it is possible to use it as a glorified text editor. You have got more than enough to learn with programming and Java, without having to learn how to work a sophisticated piece of software occupying 100MB of download as well. That is why many people suggest beginners don't use IDEs.

CR
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36486
    
  16
I went through the installation notes for Windows (JDK6) and couldn't find any mention of an installation log. Nor can I find an installation log in my Windows Java installation. Sorry.

Maybe somebody else can help.

CR
Suzie Quinn
Greenhorn

Joined: Feb 09, 2007
Posts: 4
Thanks everyone for telling me about the IDE's & the glorified text editor. I'll give them a look. Also, thanks for looking for the log file. I certainly appreciate your time. If I don't hear from others, I'll assume it doesn't exist.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13875
    
  10

You could also have a look at a text editor such as UltraEdit or TextPad - these are simple but powerful and easy to use programs that you can use to edit Java source code, and that have features like syntax colour highlighting, automatic source code formatting etc.
Suzie Quinn
Greenhorn

Joined: Feb 09, 2007
Posts: 4
Ok. I've noted the text editors you mentioned & will look at those too. It's so great to have such knowledgeable people helping out. I appreciate it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: After installation, where is log file?
 
Similar Threads
apache linux binaries install problem
New to Linux!!!
communication between applet and javascript
Installing Java
Where is Java Set up?