Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8879321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:55:30+00:00 2026-06-14T19:55:30+00:00

Hi I have a set of java classes which worked very fine when I

  • 0

Hi I have a set of java classes which worked very fine when I compile them with javac command:

javac -g -nowarn -classpath /usr/class/cs143/cool/lib:.:/usr/java/lib/rt.jar ASTConstants.java ASTParser.java cool-tree.java 

I installed groovy on the same machine and tried to execute the following:

groovyc  -classpath /usr/class/cs143/cool/lib:.:/usr/java/lib/rt.jar ASTConstants.java ASTParser.java cool-tree.java 

It seems that groovy doesn’t able to understand the java file and its throwing error like:

ASTParser.java: 21: unexpected token: protected @ line 21, column 3.
     protected static final short _production_table[][] = 
 ^

I’m bit confused. Does that all java programs are valid groovy code? Only the viceversa isn’t true right?

Where I’m making the mistake?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:55:31+00:00Added an answer on June 14, 2026 at 7:55 pm

    There are some quirks. Used to be some issues with inner classes (may be resolved by now in 2.x), and you may have to watch what’s in your String literals (stray dollar signs, for e.g,). Using a literal for an array definition can be a problem (e.g., int [] ary = {}; won’t fly in groovy). Also, doesn’t come up often, but scope braces used by themselves confuse groovy.

    In your particular case, just change the short _production_table [][] to be short [][] _production_table. I believe that should clear your issue up.

    BTW, some other “gotchas” here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What I have is a set of Java classes (close to 25) representing message
Hi I have requirement to create ,compile and load java classes run time. Using
Actually I have two java classes of which one is an activity class. Now
I have a web tool which when queried returns generated Java classes based upon
I have a arraylist(eg.CustInfo) which contains a collection of objects(Cust_details,Cust_Auth) for java classes, which
I have set my java min/max heap size to be the same as outlined
I have set the eclipse java formatter to wrap lines that exceed 120 characters
I have a set of Java 5 source files with old-style Doclet tags, comments
I have set up a remote Mercurial (Hg) repository that holds a large Java
I have a set of source folders. I use a Java class to build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.