User Name
Password
AppleNova Forums » Programmer's Nook »

Compiling & Running Java? (on OS X)


Register Members List Calendar Search FAQ Posting Guidelines
Compiling & Running Java? (on OS X)
Thread Tools
MagSafe
Senior Member
 
Join Date: Apr 2006
 
2006-05-04, 13:28

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
Blue Light Bandit
Member
 
Join Date: May 2004
 
2006-05-04, 13:33

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
colivigan
Veteran Member
 
Join Date: Nov 2005
 
2006-05-04, 13:58

Although I generally despise them, you might want to look at an IDE like Eclipse, especially if you're not terribly comfortable on the command line.
  quote
chucker
 
Join Date: May 2004
Location: near Bremen, Germany
Send a message via ICQ to chucker Send a message via AIM to chucker Send a message via MSN to chucker Send a message via Yahoo to chucker Send a message via Skype™ to chucker 
2006-05-04, 13:59

In TextMate, in a Java class, hit Cmd-B for "Build and Run single file".
  quote
MagSafe
Senior Member
 
Join Date: Apr 2006
 
2006-05-04, 14:06

Quote:
Originally Posted by Blue Light Bandit
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)?
Hi,

...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
bassplayinMacFiend
Banging the Bottom End
 
Join Date: Jun 2004
 
2006-05-04, 14:14

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
MagSafe
Senior Member
 
Join Date: Apr 2006
 
2006-05-06, 09:39

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
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Post Reply

Forum Jump
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


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 08:05.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova