View Full Version : Java Compiler for OS X?
jamdr
Feb 2, 2004, 07:55 PM
Does OS X come with a Java compiler? If not, does anyone know where can I get a compiler? Thanks.
bousozoku
Feb 2, 2004, 08:02 PM
It's part of the developer tools disc that comes with every copy of Mac OS X or pre-loaded onto new machines.
jamdr
Feb 2, 2004, 08:18 PM
Yeah, thanks. I just realized that it should be on my computer, but I did a custom install and didn't install the Developer Tools. I tried to install them from Restore CD, but it won't let me add something, I would have to erase my current system and install it all over again (or archive it). Is there a way I can just install it on top of my current system?
bousozoku
Feb 2, 2004, 09:37 PM
Are you sure that you don't have an installation folder within the Applications folder? That's where they were on my system from the restore CD-ROMs.
The only other solution I can imagine is that I hav e an extra CD-ROM with tools that ADC just sent me, so if you need the one I got with Panther, you're welcome to it.
jamdr
Feb 3, 2004, 02:00 PM
Thanks for your response. I had reinstalled my system earlier, and so didn't have that install folder, but my friend had it on his iBook so I installed it from there. But now that I have XCode, I can't figure out how to run a simple Java class. I don't want to create an entire application, I just want to test a few lines of code. Is this possible in XCode? I'm not used to Mac programming at all, so I would just like to try some things before I create a project. Is there a way to compile and run just one class?
cubist
Feb 3, 2004, 02:25 PM
1. Put the developer tools disk in and double-click the installer.
2. You don't need to use Xcode to compile a few lines. Just use vi and javac in Terminal, like any normal Unix computer.
MongoTheGeek
Feb 3, 2004, 02:52 PM
Originally posted by cubist
1. Put the developer tools disk in and double-click the installer.
2. You don't need to use Xcode to compile a few lines. Just use vi and javac in Terminal, like any normal Unix computer.
Or TextEdit and javac.
IfI could remember the extension and other java thingies I would test a theory that all you would have to do is write it in TextEdit and double click.
jamdr
Feb 3, 2004, 02:58 PM
Wow, javac, that's obvious. Thanks. I keep forgetting OS X even has a terminal. This is going to take a while to get used to.
Doctor Q
Feb 3, 2004, 03:07 PM
Where is a good tutorial on using Xcode to write HelloWorld in Java?
bousozoku
Feb 3, 2004, 03:18 PM
Originally posted by Doctor Q
Where is a good tutorial on using Xcode to write HelloWorld in Java?
Actually, if you just open Xcode, create a new Java tool project, that should take care of everything, including the "Hello World!" code.
janey
Feb 4, 2004, 02:06 PM
reading this thread, i remembered an email I got from the studentdev mailing list, this guy was asking what a good and free c++ compiler was. :)
It was pretty funny sorta, because I burst out laughing because of the absurd question. Sounds like most people in there don't know what gcc is, they're just saying you can use Xcode/Project Builder to do it.
http://lists.apple.com/mhonarc/studentdev/msg10901.html
bousozoku
Feb 4, 2004, 03:08 PM
Well, really, you could replace gcc with any other compiler and have Xcode call it when compiling code and most developers wouldn't notice on small projects. ;)
Sun's Java compiler can be replaced with IBM's jikes just fine too.
jdb791011
Sep 11, 2009, 01:57 AM
Hey, can someone explain to me how to compile a .java file I have already coded so that it can run as executable on my desktop (or anyone else's desktop for that matter). I coded it in NetBeans, it runs fine. But now I want to make it a .app like the other programs on my OS X. Thanks. Appreciate it.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.