• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Sorry again after so much time - Path problems

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey folks, long time since i've been here. I've got the same problem as the last time i've posted here.
This time it's because i am still on a XP machine (yeah i know, i shouldn't use it, but it's not my PC it's my parents).
I have no user specific variable but i have a CLASSPATH, Path and the JAVA_HOME variable in system.

I go to the cmd get in the directory where i have the typical first "MooseGreetings.java" uncompiled and when i write : javac MooseGreetings.java, i get: it's written false and/or not to be found -,- i'd really could use some hel again!

Thanks a lot in advance!
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is your CLASSPATH set to?
What package is your MooseGreetings class in or is it in the default package?
 
holger alberty
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey there Tony.

My CLASSPATH has the following value:

CLASSPATH C:\Programme\Java\jre7\bin
JAVA_HOME C:\Programme\Java\jre7\bin

And no user defined variabel.

Greets Holger
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have the path to the bin directory of your JDK (not JRE) in your PATH (not CLASSPATH) environment variable ?
And what's the exact error message you are getting ? Don't paraphrase it - copy and paste it.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

holger alberty wrote:My CLASSPATH has the following value:

CLASSPATH C:\Programme\Java\jre7\bin
JAVA_HOME C:\Programme\Java\jre7\bin


First of all, to be able to compile Java source code, you need to install the JDK (Java Development Kit), not the JRE (Java Runtime Environment). Did you install the JDK, or did you install only the JRE? If you don't have the JDK, then you have to download and install it first.

Second, your CLASSPATH should not point to the 'bin' directory of the JDK or JRE installation. In fact, it is better to not set the CLASSPATH environment variable at all. If it is not set, Java will take the current directory as the classpath.

You don't need to set JAVA_HOME at all. It is not used by the Java compiler or Java app launcher itself. Some third-party software needs it, but it is not necessary for compiling and running Java programs.

What you have to do after installing the JDK is set the PATH environment variable, as described in the installation instructions.
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic