File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java on os x (very beginning)

 
Scott Walker
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone, im tryin to learn java......im at the very beginning, ive been told i have java already on my os x 10.4, but i cant find the SDK. Does anyone know what im looking for? Thanks guys and sorry to post such a newbie queston.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
open a command shell and try "which javac".
Should tell you where the compiler is located.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavRanch.

Bookmark this page. Lots of good information about Java on OS X.
 
Scott Walker
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
by command shell do you mean in terminal? If so, it says usr/bin/javac........but i dont really know what this means.

Any help would be appreciated, i am truly right at the beginning haha.

thanks
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Terminal provides a command line, so, yes, you can use that. There are others, which are -IMHO- better (e.g. iTerm), but Terminal works just fine, so at the beginning you should stick to it.

What that tells you is that all java executables (javac, java, jar, javadoc, ...) are installed and available. You can run "java -version" to find out which version of the JVM you have (on 10.3 it could be 1.3 or 1.4, on 10.4 it might 1.4 or 1.5/5.0).

Another interesting directory is /Library/Java/Extension, where you can place additional jar files so that they are available to all Java programs.

The javadocs are in /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Resources/Documentation/Reference/doc/api on my machine. Depending on which JVM you have it might be in a slightly different directory on your machine.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:

Another interesting directory is /Library/Java/Extension, where you can place additional jar files so that they are available to all Java programs.


I'd not recommend that though. It can quickly lead to very serious problems if you put something there and then a Java application you install requires its own different version of that library and crashes.
Or you forget you put something there, write something that needs it (which now works fine on your machine), and forget to distribute that library to your users.

Better use explicit classpaths to launch your applications, possibly in conjunction with shellscripts so you don't have to type them in all the time.
 
Scott Walker
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i tried following this .....The javadocs are in /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Resources/Documentation/Reference/doc/api ......but i get classes.nib info.nib and objects.nib.......none of which i can open. Will the compiler be labelled java sdk? Sorry to keep bugging you guys with such early problems.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's strange, I have the usual HTML files in that directory. Keep poking around in that directory vicinity, they gotta be there somewhere.

The compiler is called "javac", and is in the directory /usr/bin, as you have established earlier running the "which" command.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scott, I'm wondering why exactly you're looking for the SDK location. Java should be installed and ready to go on the Mac. Are you having problems compiling or running? Have you run a "Hello World" program?

Also, we have a forum specifically for Java on Macs, so I'll move this thread there for you. Please continue this discussion there.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
marc is correct -- you should just be able to bring up a Terminal window and type javac at the command prompt.

What happens when you try that?

If it's not working, you may need to install the Developer's Tools from the Tiger (is that what you are using?) DVD.
 
Scott Walker
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
problem solved.....thanks guys. its nice to see a forum that doesnt stick its nose in the air at newbies. Thanks again.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We love newbies! Welcome to the Ranch!
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
We love newbies! ...

Especially Mac users!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic