You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by "Christopher C. Lanz" <la...@potsdam.edu.INVALID> on 2020/12/19 22:41:55 UTC

memory allocation for JVM - "file too big to open safely" [netbeans] [java]

Hello,
I am running NetBeans 12 in Ubuntu 14.04. When trying to load a file of text, I get the message "It seems that the file is too big to open safely...etc...". I have changed the netbeans.conf and app.conf files to include

-J-Xms512m -J-Xmx2048m

but I still get the error. I want to try increasing the allocation(s) for the JVM itself, but I can't find instructions to do that when you're using NetBeans, only for times when you're running "javac" and "java" commands in a terminal -- my installation doesn't recognize the "java" command - if it did I'd enter

java -J-Xms512m -J-Xmx2048m

Any suggestions?

Thanks.


Chris Lanz

Department of Computer Science

340 Dunn Hall, SUNY Potsdam

lanzcc@potsdam.edu

315 267 2407

315 268 1547


Nature and nature's laws lay hid in night:
God said, Let Newton be! and all was light. (Pope)

It did not last: the Devil howling "Ho!
Let Einstein be!" restored the status quo. (Squire)


Re: memory allocation for JVM - "file too big to open safely" [netbeans] [java]

Posted by Neil C Smith <ne...@apache.org>.
On Mon, 21 Dec 2020 at 12:51, Oliver Rettig <Ol...@orat.de> wrote:
> It is only a warning that the file maybe is too big. There are lots of configuration possibilities available for experiences users.

There is already
https://bits.netbeans.org/12.2/javadoc/properties.html although this
is not listed there that I can see.  Maybe should be exposed and
documented.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: memory allocation for JVM - "file too big to open safely" [netbeans] [java]

Posted by Oliver Rettig <Ol...@orat.de>.
Hi, 

It is only a warning that the file maybe is too big. There are lots of configuration possibilities 
available for experiences users. 

Maybe a central page in the wiki which collects all the settings/properties would be fine.

Is there such a collection somewhere? Where can it place in the apache netbeans site?

Oliver


I think the software program sucks if the software did not advise user in the error message 
to adjust  the parameter.
 J-Dorg.openide.text.big.file.size=10.
















On Mon, 21 Dec 2020, 08:34 Oliver Rettig, <Oliver.Rettig@orat.de[1]> wrote:


Hi all,
 
Neil is completely right - thanks for the hint.
 
The warning is opened if a configurable maximum file size is reached. The default value for 
this is 1MB and can be increased by by adding system property, e.g.
 
-J-Dorg.openide.text.big.file.size=10
 
I will think about to use this mechanism also for my scientific netbeans platform 
applications, if i open data files to be plotted.
 
best regards
Oliver
> On Sun, 20 Dec 2020 at 16:25, Oliver Rettig <_O...@orat.de_> wrote:
> > I remember also got such messages in the past during opening big text
> > files in my netbeans-platform applications and with increasing heap-size
> > I cauld not get rid of the message. In my cases after closing the dialog
> > all works fine. So I dont have a closer look at this. Maybe there is
> > simple somewhere hardcoded a maximum file size and after reaching this
> > size the dialog is thrown.
> > 
> > I am also interested in, if you can fix this.
> 
> It's probably this?
> https://github.com/apache/netbeans/blob/master/platform/openide.loaders/src/[2]
> org/openide/text/DataEditorSupport.java#L853
> 
> Should be able to set that system properly to a MB value greater than
> 1 by the look of it.
> 
> Best wishes,
> 
> Neil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org[3]
> For additional commands, e-mail: users-help@netbeans.apache.org[4]
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists[5]

Re: memory allocation for JVM - "file too big to open safely" [netbeans] [java]

Posted by Som Lima <so...@gmail.com>.
I think the software program sucks if the software did not advise user in
the error message to adjust  the parameter.
 J-Dorg.openide.text.big.file.size=10.








On Mon, 21 Dec 2020, 08:34 Oliver Rettig, <Ol...@orat.de> wrote:

> Hi all,
>
>
>
> Neil is completely right - thanks for the hint.
>
>
>
> The warning is opened if a configurable maximum file size is reached. The
> default value for this is 1MB and can be increased by by adding system
> property, e.g.
>
>
>
> -J-Dorg.openide.text.big.file.size=10
>
>
>
> I will think about to use this mechanism also for my scientific netbeans
> platform applications, if i open data files to be plotted.
>
>
>
> best regards
>
> Oliver
>
> > On Sun, 20 Dec 2020 at 16:25, Oliver Rettig <Ol...@orat.de>
> wrote:
>
> > > I remember also got such messages in the past during opening big text
>
> > > files in my netbeans-platform applications and with increasing
> heap-size
>
> > > I cauld not get rid of the message. In my cases after closing the
> dialog
>
> > > all works fine. So I dont have a closer look at this. Maybe there is
>
> > > simple somewhere hardcoded a maximum file size and after reaching this
>
> > > size the dialog is thrown.
>
> > >
>
> > > I am also interested in, if you can fix this.
>
> >
>
> > It's probably this?
>
> >
> https://github.com/apache/netbeans/blob/master/platform/openide.loaders/src/
>
> > org/openide/text/DataEditorSupport.java#L853
>
> >
>
> > Should be able to set that system properly to a MB value greater than
>
> > 1 by the look of it.
>
> >
>
> > Best wishes,
>
> >
>
> > Neil
>
> >
>
> > ---------------------------------------------------------------------
>
> > To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
>
> > For additional commands, e-mail: users-help@netbeans.apache.org
>
> >
>
> > For further information about the NetBeans mailing lists, visit:
>
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>
>

Re: memory allocation for JVM - "file too big to open safely" [netbeans] [java]

Posted by Oliver Rettig <Ol...@orat.de>.
Hi all,

Neil is completely right - thanks for the hint.

The warning is opened if a configurable maximum file size is reached. The default value for 
this is 1MB and can be increased by by adding system property, e.g.

-J-Dorg.openide.text.big.file.size=10

I will think about to use this mechanism also for my scientific netbeans platform 
applications, if i open data files to be plotted.

best regards
Oliver
> On Sun, 20 Dec 2020 at 16:25, Oliver Rettig <Ol...@orat.de> wrote:
> > I remember also got such messages in the past during opening big text
> > files in my netbeans-platform applications and with increasing heap-size
> > I cauld not get rid of the message. In my cases after closing the dialog
> > all works fine. So I dont have a closer look at this. Maybe there is
> > simple somewhere hardcoded a maximum file size and after reaching this
> > size the dialog is thrown.
> > 
> > I am also interested in, if you can fix this.
> 
> It's probably this?
> https://github.com/apache/netbeans/blob/master/platform/openide.loaders/src/
> org/openide/text/DataEditorSupport.java#L853
> 
> Should be able to set that system properly to a MB value greater than
> 1 by the look of it.
> 
> Best wishes,
> 
> Neil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Re: memory allocation for JVM - "file too big to open safely" [netbeans] [java]

Posted by Neil C Smith <ne...@apache.org>.
On Sun, 20 Dec 2020 at 16:25, Oliver Rettig <Ol...@orat.de> wrote:
> I remember also got such messages in the past during opening big text files in my netbeans-platform applications and with increasing heap-size I cauld not get rid of the message. In my cases after closing the dialog all works fine. So I dont have a closer look at this. Maybe there is simple somewhere hardcoded a maximum file size and after reaching this size the dialog is thrown.
>
> I am also interested in, if you can fix this.

It's probably this?
https://github.com/apache/netbeans/blob/master/platform/openide.loaders/src/org/openide/text/DataEditorSupport.java#L853

Should be able to set that system properly to a MB value greater than
1 by the look of it.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: memory allocation for JVM - "file too big to open safely" [netbeans] [java]

Posted by Som Lima <so...@gmail.com>.
Looking at this page

https://stackoverflow.com/questions/13685402/how-to-assign-more-than-1gb-to-netbeans-jvm

I suggest setting this parameter to see if you get the corresponding error
message.

when I set -J-Xmx3024m I obtain these messages:

/opt/netbeans-7.2/bin/netbeans
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.Error: A fatal
exception has occurred. Program will exit

If you do then you know you are in the right place.

This text suggests you can play around with the size.

The message Could not reserve enough space for object heap means that 3024
MB is not available for assignment. Try reducing it


Then you try this as suggested.
 netbeans_default_options="-J-client -J-Xss2m -J-XX:PermSize=512m
-J-XX:MaxPermSize=512m -J-Dapple.laf.useScreenMenuBar=true
-J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true
-J-Dsun.zip.disableMemoryMapping=true -J-Xms2148m -J-Xmx2148m
-J-XX:+UseParallelGC"





On Sun, 20 Dec 2020, 16:25 Oliver Rettig, <Ol...@orat.de> wrote:

> Hi,
>
>
>
> I remember also got such messages in the past during opening big text
> files in my netbeans-platform applications and with increasing heap-size I
> cauld not get rid of the message. In my cases after closing the dialog all
> works fine. So I dont have a closer look at this. Maybe there is simple
> somewhere hardcoded a maximum file size and after reaching this size the
> dialog is thrown.
>
>
>
> I am also interested in, if you can fix this.
>
>
>
> best regards
>
> Oliver
>
> Hello,
>
> I am running NetBeans 12 in Ubuntu 14.04. When trying to load a file of
> text, I get the message "It seems that the file is too big to open
> safely...etc...". I have changed the netbeans.conf and app.conf files to
> include
>
>
> -J-Xms512m -J-Xmx2048m
>
>
> but I still get the error. I want to try increasing the allocation(s) for
> the JVM itself, but I can't find instructions to do that when you're using
> NetBeans, only for times when you're running "javac" and "java" commands in
> a terminal -- my installation doesn't recognize the "java" command - if it
> did I'd enter
>
>
> java -J-Xms512m -J-Xmx2048m
>
>
> Any suggestions?
>
>
> Thanks.
>
>
> Chris Lanz
>
> Department of Computer Science
>
> 340 Dunn Hall, SUNY Potsdam
>
> lanzcc@potsdam.edu
>
> 315 267 2407
>
> 315 268 1547
>
>
> Nature and nature's laws lay hid in night:
> God said, Let Newton be! and all was light. (Pope)
>
> It did not last: the Devil howling "Ho!
> Let Einstein be!" restored the status quo. (Squire)
>
>
>
>
>

Re: memory allocation for JVM - "file too big to open safely" [netbeans] [java]

Posted by Oliver Rettig <Ol...@orat.de>.
Hi,

I remember also got such messages in the past during opening big text files in my netbeans-
platform applications and with increasing heap-size I cauld not get rid of the message. In my 
cases after closing the dialog all works fine. So I dont have a closer look at this. Maybe there 
is simple somewhere hardcoded a maximum file size and after reaching this size the dialog 
is thrown. 

I am also interested in, if you can fix this.

best regards
Oliver


Hello,
I am running NetBeans 12 in Ubuntu 14.04. When trying to load a file of text, I get the 
message "It seems that the file is too big to open safely...etc...". I have changed the 
netbeans.conf and app.conf files to include


-J-Xms512m -J-Xmx2048m


but I still get the error. I want to try increasing the allocation(s) for the JVM itself, but I can't 
find instructions to do that when you're using NetBeans, only for times when you're running 
"javac" and "java" commands in a terminal -- my installation doesn't recognize the "java" 
command - if it did I'd enter




java -J-Xms512m -J-Xmx2048m 




Any suggestions?


Thanks.




Chris Lanz
Department of Computer Science
340 Dunn Hall, SUNY Potsdam
lanzcc@potsdam.edu
315 267 2407
315 268 1547


Nature and nature's laws lay hid in night:God said, /Let Newton be!/ and all was light. (Pope)

It did not last: the Devil howling "Ho!Let Einstein be!" restored the status quo. (Squire)







Re: memory allocation for JVM - "file too big to open safely" [netbeans] [java]

Posted by Peter Hull <pe...@gmail.com>.
On Sat, 19 Dec 2020 at 22:42, Christopher C. Lanz
<la...@potsdam.edu.invalid> wrote:
>
>  I have changed the netbeans.conf and app.conf files to include
>
> -J-Xms512m -J-Xmx2048m

As far as I know, that's the right way to increase Netbeans heap. Maybe
check in the IDE log (just after the line that starts "Input arguments:")
to see if those options have truly been applied.
Maybe NB has another limit that causes it to print that message,
independent of the heap size. Hopefully someone who knows can answer that.
Whenever I get that warning I just ignore it to be honest!