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

  • Home
  • SEARCH
  • 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 6175395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:55:02+00:00 2026-05-23T23:55:02+00:00

I have an application that loads data from a .csv file and shows it

  • 0

I have an application that loads data from a .csv file and shows it in a table. The application works correctly for all files (no matter what size it has) in windows, but it only works with the files that are lower than 8MB on Mac, any other file bigger than that throws me a “java.lang.OutOfMemoryError: Java heap space”. I debugged the application to make sure that it was reading the .csv file and it does, but after a while it jush crashes with that error.

I did some research and try using the -Xmx and -Xms to increase the Java heap size but still get the same error.

The following code is where the application crashes after adding some of the arrays with information to the mainHashtable:

 while(reader.readRecord()){

        ArrayList<CSVEntry> list = new ArrayList<CSVEntry>();
        for(int i = 0; i < colscount; i++){
            CSVEntry entry = new CSVEntry(headerNames[i], reader.get(i));
            list.add(entry);
        }
        mainHashtable.put(recordcount, list);
        recordcount++;
}

Any suggestions that help me solve this issue will be gladly appreciated.

  • 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-23T23:55:03+00:00Added an answer on May 23, 2026 at 11:55 pm

    -Xmx is the correct answer. Java has odd defaults for maximum heap space depending on the platform (sometimes as low as 8MB).

    If your application in bundled in a JAR with a Main-Class INF directive, the following should work for you:

    java -Xmx256m -jar myapp.jar

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

Sidebar

Related Questions

I have a Java-application that loads data from a legacy file format into an
I have a code that loads data from Excel into SQLServer table. It works
I have an application that reads a CSV file with piles of data rows.
I have a jQuery application that loads data from five asynchronous server calls. I
I have a MVC application that reads some data from a database and loads
I have a C++ application that loads lots of data from a database, then
I have an application that loads external SWF files and plays them inside a
I am developing a flex charting web application which gets data from csv files.
I have a WPF (.Net 3.5 sp1) application that loads a bunch of data
I have a SL application that reads some data from the database, which I

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.