Thomas Darvik
Thomas Darvik

Reputation: 791

Eclipse autofill some invalid tag

I just installed Linux Luna 4.4.1 on Linux Ubuntu 14.10. JDK 8 is installed not that it should matter.

The problem is that when I make a main-function in a class, it inserts some invalid space between the arguments

public static void main(String[] args) {
    // the invalid character is between String[] and args.
}

This gives me a compiler error when I run the program. "Syntax error on token "Invalid character", delete this token."

Has anyone else experienced this? Or maybe you have a fix?
Never had this problem with Windows Eclipse, so I think it's Ubuntu specific. When I remove the invalid character using backspace, and then add space again the error disappear.

Upvotes: 2

Views: 76

Answers (1)

corestruct00
corestruct00

Reputation: 105

I would look at the Eclipse's template for main methods. You can view/edit it here:

  1. Goto Eclipse > Preferences...
  2. Select Java > Editor > Templates
  3. In the template list select "main"
  4. Click "Edit..."

You should should be able to remove the offending character there.

Upvotes: 1

Related Questions