Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-20-2008, 08:39 PM
Member
 
Join Date: Jun 2008
Posts: 3
teamkeff is on a distinguished road
javac file not found
hi, i am getting into java with a comprehensive book/cd.
i have done everything in the book and web-site regarding setting classpath and path, but when i try to compile using javac in ms-dos the file is not found, although i see it in that filepath dir, and have put that filepath in the new classpath and new path - i.e. c:\program files\java\jdk1.6.0_01\bin any clues will be gratefully accepted.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-20-2008, 10:59 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 789
Nicholas Jordan is on a distinguished road
I have problems with classpath, so do others. Be patient as frustration will get nothing done. Since you are on win there is a start menu control that will allow setting several of these things as needed. The nomenclature is occasionally self-referential so you have to exercise patience.

What these are is "name=value" pairs, simple strings as typed on the keyboard as opposed to internal machine format data. This allows the shell to do it's job.

I tried all manner of hacks and found that sometimes the win platform was insisting that everything be in My Documents or some other user directory, it has a lot to do with what editor you are using and so on.

What book do you have? How much progress have you made? Are you stuck?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-21-2008, 01:18 PM
Member
 
Join Date: Jun 2008
Posts: 3
teamkeff is on a distinguished road
hi nicholas and thanks, in answer to your question the book is 'Teach yourself Java 6 in 21 Days'. I haven't got very far because i need to compile the first sample program, but cannot work out why it isn't. I have gone from writing programs in visual Basic 5 express edition and am also not too bad when it comes to ms-dos, so maybe you are right, the win system may fix itself in the near future, i am just trying to discover if there really is something i am doing wrong
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 06-22-2008, 05:25 AM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 527
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
I hope this thread could help you also

If you still cannot set the classpath on environmental variables,
better to compile it on jdk's bin folder....
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 06-22-2008, 09:22 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 789
Nicholas Jordan is on a distinguished road
Who's on first.
The title of this reply is the name of a classic comedy routine. In short, you are doing nothing wrong. The longer version is given a full depth treatment in the classic comedy routine: Who's on First? by Abbott and Costello

This is one point where I disagree with 'do not do people's homework' - but be aware you are not going to do anything in six days - other than getting a compile. I have noted from experience that the error messages the compiler issues are far more telling, and in general you just take one and go read about it in a book...

Try as first thing, putting the entire project either in My Documents or a folder created in that folder, or some folder listed in Documents and Settings - or a subfolder thereof. The next thing is one has to know where the Java stuff was installed by the installation routine. Do not put everything in the Java Virtual Machine directory, go make a directory somewhere else. Do a search for javac.exe from the shell. ( We will define the shell as anything the user can see or point at in the routine use of the computer - there are other definitions that are acceptable ) Do a 'create shortcut', then 'copy' on the shortcut that is created from the dropdown right-click and open notepad and see if it will paste anything. Sometimes this actually does something. Even if it does not you can do a properties on the shortcut that was created and get a properly constructed shortcut to the java compiler, on earlier versions you may be able to open the shortcut with notepad.

At that point, given XP or later, you can probably go to Control Panel / System / Advanced / Environment Variables / New ( I don't know if it's system or user ) and very, very carefully type CLASSPATH or whatever that is as the name and place the copied shortcut, minus a few characters:

C:\Program Files\Java\jdk1.5.0_12\bin\javac.exe

Clipping back to the"... \Java" ( do not use my sample, find yours on your own machine )

..... place the copied shortcut, minus a few characters in the value area that the control gives you. Also, you may try pasting the shortcut that was copied directly in the work folder, sometimes this works. It is supposed to work but often is not picked up by the shell. Read also the other post cited that has the link, I will go read it if you want.

Win will fix nothing, that's how they make their money. You will find that Java will do much more that VB

Post back with a clear, detailed record of what you tried. Do you have an editor?
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 06-23-2008, 12:46 AM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
Hello teamkeff

Quote:
Originally Posted by teamkeff View Post
hi nicholas and thanks, in answer to your question the book is 'Teach yourself Java 6 in 21 Days'. I haven't got very far because i need to compile the first sample program, but cannot work out why it isn't. I have gone from writing programs in visual Basic 5 express edition and am also not too bad when it comes to ms-dos, so maybe you are right, the win system may fix itself in the near future, i am just trying to discover if there really is something i am doing wrong
I have the same book. It's the best book on programming I have ever used. About your Class Path problem, see this thread. Mostly everyone, including me, struggled or struggles with class paths. We forget these things as the IDEs spoil us.

I hope this thread helps. Good luck teamkeff
__________________
If your ship has not come in yet then build a lighthouse.
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 06-24-2008, 12:17 AM
Member
 
Join Date: Jun 2008
Posts: 3
teamkeff is on a distinguished road
thanks Tim yes that worked, very grateful. thanks nicholas too, i am sure i will have more questions, i hope i don't have to go throught that hassle if i want to run a windows program, if infact it alows me to, but i won't get ahead of myself just yet.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
javac? sardare Eclipse 1 06-14-2008 04:06 AM
source code of 'javac'? Pooja Deshpande Advanced Java 2 06-04-2008 01:24 PM
cannot resolve symbol while using javac andi9 New To Java 5 05-14-2008 08:50 AM
javac DOS rdunne New To Java 3 01-01-2008 01:49 PM
Help with javaC Daniel New To Java 2 07-04-2007 04:44 PM


All times are GMT +3. The time now is 11:57 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org