Senior Member
Join Date: Apr 2006
|
Hey ,
I've been using Textpad (http://www.textpad.com/) to compile and run Java on my old (and retired) Windows laptop, but since I rarely even switch it on these days I'd like to continue this by starting to compile and run Java on my mac. With Textpad I used to write a java file and press CTRL+1 to compile, then CTRL+2 to run the Java application ... I was wondering if there was a similar way of doing this on a mac? I understand that J2SE is already installed into OS X, I just need a program that will be able to compile and run my java code. I already use BBEdit to type up my html and php code but as far as I can see it doesn't have any way of compiling and running Java applications on it. Thanks for any help given, Steven. Find me on Twitter: @StevenMcLintock |
quote |
Member
Join Date: May 2004
|
From the command line, you compile Java source for Mac OS X just like you do for any other operating system:
javac classname.java And to run it: java classname Is what you're asking if there's a way to make that happen within your editor of choice (BBEdit)? |
quote |
‽
|
In TextMate, in a Java class, hit Cmd-B for "Build and Run single file".
|
quote |
Senior Member
Join Date: Apr 2006
|
Quote:
...I didn't realise you could run it from the terminal actually, like you do with Windows. It would probably be quicker to just run it straight from BBEdit though...If I had a choice, do I? Find me on Twitter: @StevenMcLintock |
|
quote |
Banging the Bottom End
Join Date: Jun 2004
|
You may be able to put together an Automator function or an AppleScript. I don't think BBEdit has this functionality out of the box though. I tried searching on 'Java' on the BBEdit FAQ list and came back with no hits.
|
quote |
Senior Member
Join Date: Apr 2006
|
Just to let you know I've downloaded the 30 day trial of TextMate and it works brilliantly with my Java files
...After the 30 days I will most definetly be buying a full licence Thanks for the help, Steven. Find me on Twitter: @StevenMcLintock |
quote |
Posting Rules | Navigation |
|
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Java 1.5 now on OS X | Jay | Programmer's Nook | 4 | 2005-12-09 07:29 |
Java is messed up! | Mommy8me | Genius Bar | 0 | 2005-11-11 10:42 |
Java Applets not Loading | pmazer | Genius Bar | 2 | 2005-09-27 12:42 |
used up RAM and running fan | hackysackmaster | Genius Bar | 4 | 2005-08-05 14:57 |
Java Compiling? I wish I could. | gnoming | Genius Bar | 10 | 2005-03-02 15:01 |