Is anyone here familiar with BBEdit 9?


Recommended Posts

A while ago I made a topic about wanting to compile and run Java programs with a text editor. I was using TextMate for a while, but ending up switching to BBEdit. It does the job, but I can't figure out how to compile and run the Java programs I write. This is what I get:

post-119000-1258763868.png

I'm not sure what a "shebang" is.

http://en.wikipedia.org/wiki/Shebang_%28Unix%29

It looks like it's trying to invoke some kind of bash script which is lacking a line like

#!/bin/bash

or similar.

Hmm... All I'm testing is a basic Java program...

#!/bin/bash

public class Hello {
	public static void main(String[] args) {
		System.out.println("Hello World!");
	}
}

This will let me run the Terminal, but then I get this:

post-119000-1258764778_thumb.png

I don't think BBEdit will do a compile and run for Java. It just tries to run it like a shell script (and never compiling it), which is why it thinks it needs a shebang.

Edit: Found this: http://nanotux.com/blog/bbedit-java-compiler/. Might help.

Hmm... All I'm testing is a basic Java program...

#!/bin/bash

public class Hello {
	public static void main(String[] args) {
		System.out.println("Hello World!");
	}
}

This will let me run the Terminal, but then I get this:

I've never seen a java program start with #!/bin/bash...... that's for bash scripts...

I've never seen a java program start with #!/bin/bash...... that's for bash scripts...

Yea, a Java program would never need the shebang. It's just that BBEdit's "Run" command just tries to run whatever you've made as a shell script and not use the specific method of whatever language you're writing in.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

  • Recent Achievements

    • One Year In
      Console General earned a badge
      One Year In
    • One Year In
      Twozo Technologies earned a badge
      One Year In
    • One Month Later
      Twozo Technologies earned a badge
      One Month Later
    • Week One Done
      Twozo Technologies earned a badge
      Week One Done
    • Veteran
      branfont went up a rank
      Veteran
  • Popular Contributors

    1. 1
      +primortal
      510
    2. 2
      +Edouard
      200
    3. 3
      PsYcHoKiLLa
      131
    4. 4
      Steven P.
      89
    5. 5
      neufuse
      74
  • Tell a friend

    Love Neowin? Tell a friend!