PDA

View Full Version : Beginner Java Programmer Question




Hylekmi
Jan 5, 2012, 07:06 PM
Im very new at this(2nd class) and I have a slight issue. I am currently using TextWrangler and I need to find a VERY easy way to compile. I am in a class that has ALOT of windows users and they use a program where there is a button to compile. It is my understanding that, to compile in text wrangler you need to use a script. Is there any way around that? or is there another program i can use that is easier? Thanks for the Help!

-Mike



KnightWRX
Jan 5, 2012, 07:14 PM
What program are your Windows using collegues using ? Because most likely it's either Netbeans or Eclipse, both of which are available for OS X.

wpotere
Jan 5, 2012, 07:16 PM
Yep, time to dive into an IDE that will let you compile and debug. I prefer Eclipse for Mac but Netbeans is also a great tool as well. Both are free.

Hylekmi
Jan 5, 2012, 07:19 PM
Its like notepad or something that comes stock on a PC. I know they had to download a JDK and that I did not have to because I'm on a MAC. Ill try those suggestions too. Thanks!
-Mike

wpotere
Jan 5, 2012, 07:23 PM
Its like notepad or something that comes stock on a PC. I know they had to download a JDK and that I did not have to because I'm on a MAC. Ill try those suggestions too. Thanks!
-Mike

You can code in them, but you will find it easier in an IDE as it will help you with the coding by pointing out various errors. Another that is fairly decent is JGrasp (they have it for Mac) that is more like Notepad. JGrasp is more powerful than using notepad but less powerful than a full IDE like Eclipse. JGrasp will take a little configuring but they have good help files.

KnightWRX
Jan 5, 2012, 07:56 PM
Its like notepad or something that comes stock on a PC. I know they had to download a JDK and that I did not have to because I'm on a MAC. Ill try those suggestions too. Thanks!
-Mike

Notepad++ with external tools pre-configured ?

Anyway, here's how to replicate it in TextWrangler : http://www.davalign.com/resources/compile-and-run-java-files-with-textwrangler-on-mac.php

2nd link on google with the query "text wrangler compile".

wpotere
Jan 5, 2012, 08:03 PM
Notepad++ with external tools pre-configured ?

Anyway, here's how to replicate it in TextWrangler : http://www.davalign.com/resources/compile-and-run-java-files-with-textwrangler-on-mac.php

2nd link on google with the query "text wrangler compile".

Good to know... Still, I think that using a tool like JGrasp would be a little better as it will at least check syntax.

jared_kipe
Jan 5, 2012, 08:53 PM
Good to know... Still, I think that using a tool like JGrasp would be a little better as it will at least check syntax.

Agreed JGrasp is the way to go. There is a built in debugger that allows you to inspect variable contents and a built in terminal where you can type java commands and see their output, or create new objects and interact with them without compiling a test program.

Hylekmi
Jan 6, 2012, 01:13 PM
Notepad++ with external tools pre-configured ?

Anyway, here's how to replicate it in TextWrangler : http://www.davalign.com/resources/compile-and-run-java-files-with-textwrangler-on-mac.php

2nd link on google with the query "text wrangler compile".

I tried that, but i got to the step where i had to copy and paste it into application support and text wrangler isn't in there.

wpotere
Jan 6, 2012, 01:16 PM
I tried that, but i got to the step where i had to copy and paste it into application support and text wrangler isn't in there.

I think they dropped support for it. Just use the proper tool for the job... Try JGrasp or Eclipse.

naples98
Jan 6, 2012, 01:23 PM
I tried that, but i got to the step where i had to copy and paste it into application support and text wrangler isn't in there.

Make sure you are going to

"Your Hard Drive/Users/Your User Name/Library/Application Support/TextWrangler"

and not

"Your Hard Drive/Library/Application Support"

Hylekmi
Jan 6, 2012, 01:34 PM
positive... maybe its changed because of lion?

naples98
Jan 6, 2012, 01:36 PM
positive... maybe its changed because of lion?

Maybe, I'm using Snow Leopard right now and don't have access to my Lion machine. The directory is there on Snow Leopard though.

jiminaus
Jan 6, 2012, 04:45 PM
positive... maybe its changed because of lion?

On my Lion, it is there. But under Lion, ~/Library became "hidden".

To get to ~/Library in Lion from a Finder window or from a Save As sheet:

Hit Shift+Command+G to bring up the Go to Folder sheet
Type in ~/Library
Click go


You should then be able to navigate to Application Support/TextWrangler/Scripts.

thundersteele
Jan 6, 2012, 05:05 PM
I think they dropped support for it. Just use the proper tool for the job... Try JGrasp or Eclipse.

I would also suggest installing eclipse or something like that. Do it on a weekend, usually it takes a bit to get to know an IDE and to set it up.

It's so long ago that I did my Java course... I don't remember what IDE I used.

Hylekmi
Jan 7, 2012, 01:38 AM
Alright, Im back to TextWrangler. I am going to try to run that script. But after i do how do i compile it? Will it just automatically compile it and then run the program when i go to run program?
Like i said, I'm VERY new at this. So please bear with me

Hylekmi
Jan 7, 2012, 01:51 AM
alright, im back to textwrangler. I am going to try to run that script. But after i do how do i compile it? Will it just automatically compile it and then run the program when i go to run program?
Like i said, i'm very new at this. So please bear with me

got it!

----------

On my Lion, it is there. But under Lion, ~/Library became "hidden".

To get to ~/Library in Lion from a Finder window or from a Save As sheet:

Hit Shift+Command+G to bring up the Go to Folder sheet
Type in ~/Library
Click go


You should then be able to navigate to Application Support/TextWrangler/Scripts.

Worked perfectly! Thanks