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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:49:25+00:00 2026-06-02T07:49:25+00:00

I’m running a java web server as an internal component of another project, and

  • 0

I’m running a java web server as an internal component of another project, and unfortunately java insists on running in server mode (i.e. fast, and huge memory footprint), even when I pass the -client switch.

This is a problem because java takes up so much memory that my whole project is killed by the server.

I’m running java with the command:

java -client -classpath /home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/commons-fileupload-1.2.2.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/fop-20120125.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/xmlgraphics-commons-1.5svn.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/batik-all.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/docx4j-nightly-20120105.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/spark-0.9.9.3-SNAPSHOT.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/slf4j-log4j12-1.6.1.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/slf4j-api-1.6.1.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/jetty-webapp-7.3.0.v20110203.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/servlet-api-3.0.pre4.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/antlr-2.7.7.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/commons-codec-1.6.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/docx4j-2.7.1.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/poi-scratchpad-3.8-beta4.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/xalan-2.7.1.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/antlr-runtime-3.3.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/commons-io-2.1.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/serializer-2.7.1.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/xml-apis-1.3.04.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/avalon-framework-api-4.3.1.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/commons-lang-2.4.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/log4j-1.2.15.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/stringtemplate-3.2.1.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/avalon-framework-impl-4.3.1.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/commons-logging-1.1.1.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/poi-3.8-beta4.jar:/home/marcintustin/webapps/django/oneclickcosvirt/oneclickcos/java/wmf2svg-0.9.0.jar: Transcoder

java -version reports:

java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

As I’m on a shared host, I can’t install 32-bit compatibility libraries, so I can’t use the 32-bit JRE. This turns out to be a problem because as confirmed by @birryree in the comments (thanks!), 64-bit JRE always runs in server mode.

Is there a way to force java to run in normal client mode?

  • 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-02T07:49:27+00:00Added an answer on June 2, 2026 at 7:49 am

    Based on comments received (and testing), it seems that the 64bit JVM ALWAYS runs in server mode, which means that it is VERY profligate with memory.

    The work-arounds are:

    1. Get the 32bit JVM (and appropriate compatibility libraries if on Linux); or
    2. Use the -X options to limit memory to a certain maximum.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am currently running into a problem where an element is coming back from
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have thousands of HTML files to process using Groovy/Java and I need to
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

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.