This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Machine Learning with R: Expert techniques for predictive modeling and have Brett Lantz on-line!
See this thread for details.
Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

classpath for a very beginner on Mac

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i've started java today but have stuck for hours ago.

i'm using Mac OSx 10.4.10 and trying to compile the code with Terminal.
It seems i don't know how to set class path.
please open my world to Java.

thanks.
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"N K.,"

Welcome to JavaRanch!

First, please check your private messages by clicking on My Private Messages. Thanks!

Next, are you certain it's the CLASSPATH you want to set? Generally, this is not the case. What are you trying? And what errors are you getting?

(In the meantime, see this thread for a Mac "Hello World" example.)
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello NK.

It's important for you to know, "where" your Java files are saved.

The easiest way I compile my files is:

1. I save them in one main place (for example: /myusername/javascripts

2. I open the terminal and change into the directory -> cd javascripts

3. I compile my Java file: javac example.java

4. I run my Java file: java example

You can also compile your files from your home directory using the whole path to the file, but I think it�s much quicker and easier to change into the directory and stay there for compiling and executing your Java files.


ne0h
 
Marshal
Posts: 67289
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"ne0H" and "nandak",

Please check your private messages for an important note from me.
 
We're all out of roofs. But we still have tiny ads:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!