![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: May 2009
Posts: 13
OS: VISTA
|
java help
HI EVRYBODY
I am runing vista on my laptop and I have downloaded j2sdk 1.4 , When I type appletviewer example1.html in my command prompt window the response is this:- "appletviewer" is not recognized as internal or external command, operable programme or batch file. Any suggestions anyone? |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,946
OS: Vista, various linux distros
|
Re: java help
Hey, does javac work from the command line? (No path)
Something to try; Go to Start>Computer(Right Click)>Properties(Or CPanel>System), in the workgroup settings section click change settings. Go to the advanced tab, click Environment Variables. In the system variables section find "Path", in the path variable(click edit if you can't see it all, but don't mess it up) you should see the path to Java's bin directory, if that's not there you need to add it (seperating the enties with a semicolon)... If not then go to the bin directory and see if applet viewer is there, then try cd to the bin directory(in the shell) and use it from there, if it still doesn't work post back saying so. Cheers, Jamey
__________________
|
|
|
|
|
|
#6 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,946
OS: Vista, various linux distros
|
Re: java help
Hey again, there should be a JDK entry in the path variable. In explorer, go to the java bin (C:/Program Files/Java/JDK[something more here]/) then shift+right click the folder "bin" and click "Copy as Path". Paste that into notepad or something.
Then open up the path variable again, click edit, go to the end of the entry, add a semicolon and paste the path (without quotes[windows will add quotes when you copy it from the context menu]), Click OK and try using javac/appletviewer again =] Cheers, Jamey
__________________
|
|
|
|
|
|
#8 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,946
OS: Vista, various linux distros
|
Re: java help
Paste your path var here(so we can see what's going on), the whole idea of the path variable is to allow not using the full path to hit an executeable (it's how javac/appletviewer work like that)...
Okay, next idea (to make sure javac etc are actually there and working); - Open command prompt - cd to C:/Program Files/Java/JDK[whatever else]/bin - type "javac" and make sure it returns something like "usage: javac blah blah blah"... If it doesn't then post saying so. Only other suggestion i have is to download the latest version of java and install it (which would of course write to the path variable). Cheers, Jamey
__________________
|
|
|
|
|
|
#9 (permalink) |
|
Registered User
Join Date: May 2009
Posts: 13
OS: VISTA
|
Re: java help
Hi
the problem was that java file which I wanted to compile was in demo folder so I copied it and pasted in bin folder. and it is working properly now, thank you for paying attention to me and giving a good advice cheers Saqr |
|
|
|
|
|
#10 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,946
OS: Vista, various linux distros
|
Re: java help
It's not actually working properly, you CAN get this working in any folder. By adding it to the path variable, if you still want this (trust me it's so much better in the long run, keeps things where they should be) then check these two out: (the second only if you don't get the first)...
1) http://java.sun.com/j2se/1.4.2/insta...dows.html#path 2) http://en.wikipedia.org/wiki/Path_(variable) You do not want to be copying java source files into your bin directory, it is not good practice, nor is it a way to keep anything in order. Java is built around OOP and using seperate packages and compiling in packages is essential, you can't do that from the bin directory. Cheers, Jamey
__________________
|
|
|
|
![]() |
| Thread Tools | |
|
|