This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Mac OS and the fly likes classpath for a very beginner on Mac Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "classpath for a very beginner on Mac" Watch "classpath for a very beginner on Mac" New topic
Author

classpath for a very beginner on Mac

nanda does
Greenhorn

Joined: Oct 17, 2007
Posts: 1
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.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

"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.)


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
ekanebuh atnedonez
Greenhorn

Joined: Oct 19, 2007
Posts: 1
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
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

"ne0H" and "nandak",

Please check your private messages for an important note from me.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: classpath for a very beginner on Mac
 
Similar Threads
open default OS file manager to a specific folder
WA #1.....word association
Mac and different JREs
Java 1.5 for OS X 10.3 (Panther)?
java for mac os 10.4.10