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 6855685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:47:21+00:00 2026-05-27T01:47:21+00:00

I have to init a big constant data structure but I get the compiler

  • 0

I have to init a big constant data structure but I get the compiler error message:

The code of constructor MS_XXX(String) is exceeding the 65535 bytes limit

This is how the code may looks like:

   public class MD_XXX {

        public List<String> allElements; 

        public MD_XXX(String language) {
            this.allElements = new ArrayList<String>();


            if (...) {
                /* 0 */    allElements.add("some text0");
                /* 1 */    allElements.add("some text1");
                /* 2 */    allElements.add("some text2");
 .. many more lines here

BUT

I also have much more data structures to initialize, putting this into a DB is a real hassle – and again, this is confidential info.

What is the best way to solve this?
Do I really have to break this up into several class files or read it from a DB?
I really try to avoid the DB way, since this data should be secure to the app.

Many thanks

  • 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-05-27T01:47:22+00:00Added an answer on May 27, 2026 at 1:47 am

    Do I really have to break this up into several class files

    It is probably sufficient to split it into several methods. Add some private methods that you call from that super-long constructor and move parts of the code there. Each method can be 65535 bytes long.

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

Sidebar

Related Questions

I have often seen an init() within the constructor of AS3 classes, sometimes even
I have been a big fan of this site for a long time, but
Hi Sorry for posting a big dump of code but I'm very new at
I have generated code with WSDL2OBJC. I have big problem with request in my
So i have this code, the snippet is given below. list* init(list* list1) {
Suppose I have a big program that consists of hundreds of methods in it.
so I have this HTML table with a bunch of big numbers in it
I have an init method that takes an (id) argument: -(id) initWithObject:(id) obj; I'm
I have several init.d scripts that I'm using to start some daemons. Most of
I have a git-cpan-init of a repo which yielded a different root node from

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.