This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

javac compiler installation  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have downloaded and installed jdk-7u10-windows-i586 in C:\Java\jdk1.7.0_10 directory and then under windows XP at system property>advanced>environmental variables>system variables I added a new variable JAVA_HOME with value C:\Java\jdk1.7.0_10 and also added %JAVA_HOME%\bin; to the beginning of path.
Now at command prompt when I type javac -version it says "javac is not recognized as internal or external command " but when I type java -version it comes back wit "1.7.0_10'
Checking that your JDK is configured properly at "://www.coderanch.com/how-to/java/how-to-create-java-program " is telling me javac -version should return the version, why when I type javac it's not recognized???, it does not compile either.
trying to compile with java at C:\java\src>java MooseGreetings.java gives error "could not find or load class MooseGreetings.java" , I have made sure the file " MooseGreetings.java" exists under java/src , I created this sample program with a text editor that does not append extra extensions to file name. So I have 2 problems to start:
1. Javac is not recognized
2. sample program can not be found
Could anyone help me to start???
 
Ranch Hand
Posts: 42
Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All I did was add "C:\Java\jdk1.7.0_10\bin" to my path. Works like a charm.
 
Kvon Arya
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, it worked, javac ran , compiled the sample program and created the *.class file.
 
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch, Kvon Arya!
 
Rancher
Posts: 1020
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Marjorie Gyles wrote:All I did was add "C:\Java\jdk1.7.0_10\bin" to my path.



I do not fiddle around with PATH but put wrapping starting scripts (javac15, java15, javac16, java16, javac17, java17 etc.) which set the PATH locally and temporarily. So several versions of Java can coexist on the same box.
 
Marshal
Posts: 62172
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can write things like export PATH=~/java/jdk1.2.2_03/bin:$PATH (*nix) or set PATH="c:\Program Files\java\jdk1.2.2_03\bin;%PATH% (Windows®).
You ought to check the syntax because I am unsure about both instructions. Those will alter the path temporarily
 
What's gotten into you? Could it be this tiny ad?
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!