I'm hearing frequently this question when discussing with a Java developer. They (java devs) always ask if your lang of choise have security and I don't know what to respond to that.
Could anyone please tell me what Java security means ?
Thanks.
...
HI,
I like to know can I increase the memory of the JVM depending on my application.If yes how can I increase the JVM memory?
And how can I know the size of JVM?
...
We have recently been migrating a number of applications from running under RedHat linux JDK1.6.0_03 to Solaris 10u8 JDK1.6.0_16 (much higher spec machines) and we have noticed what seems to be a rather pressing problem: under certain loads our JVMs get themselves into a "Death Spiral" and eventually go out of memory. Things to note:
...
EDIT: This reproducible SIGSEGV happens on a Linux machine with more than one proc and more than 2GB of mem, so Java is defaulting to the -server mode. Interestingly enough if I force "-client" there's no crash anymore... (I'm still not too sure what to do with my reproducible SIGSEGV but it's interesting nonetheless).
First note that t...
Destroying threads is deprecated in Java (and not implemented according to javadoc), and interrupting it is only a suggestion which upon the thread is expected to quit, but might not do so. (Not to provide any way to kill a thread inside the J*VM* is a disturbing design, but my question is not design related.)
How do Java application se...
Hi Java gurus,
I got a question: Is it possible to get a list of currently instantiated objects from the VM?
I am using a framework and try to implement an event handler (Hibernate, Interceptor). My problem now is that I need a Properties file during the execution of this handler. I cannot pass a reference to the Interceptor class, be...
I'm using the program to send data from database to the Excel file .
It works fine at the beginning and then becomes more and more slowly,finally it run out of the memory and the following error ocurrs: "java.lang.OutOfMemoryError: Java heap space...".
The problem can be resolved by adding the jvm heap sapce.But the question is that it...
EDIT I don't want to use Java Web Start
I've got a Java application that I'd like to run with different VM parameters depending on the amount of memory the system it is launched on has.
For example if the machine has 1 GB of memory or less I'd like to pass "-Xmx200m" and "-Xmx400m" if it has 2 GB and "-Xmx800m" if it has 8 GB (these ar...
We want to compare general performance (CPU, I/O, network, ...) of different JVMs for the same Java version (1.5) in different environments (Windows, Solaris, ...).
Do you know of any JVM benchmarking application which can be used to compare results from different JVMs?
Thank you very much.
...
Anybody knows a good book or two (or resources) for JVM Tuning?
I am struggling to find any. I stumbled upon Apress Java EE 5 Performance Management and Optimization, but there was not much in there.
...
I'm really puzzled why it keeps dying with java.lang.OutOfMemoryError during indexing even though it has a few GBs of memory.
Is there a fundamental reason why it needs manual tweaking of config files / jvm parameters instead of it just figuring out how much memory is available and limiting itself to that? No other programs except Solr ...
We have a tomcat application that started crashing every 10-15 minutes after we upgraded the OS ("aptitude dist-upgrade" of the system, which is a 32-bit Debian Lenny). java didn't get upgraded.
A Full thread dump is generated in catalina.out when jvm crashes. But there is no error/exception showing in any of the threads. Does anyone k...
I have a java JAR file that is triggered by a SQL server job. It's been running successfully for months. The process pulls in a structured flat file to a staging database then pushes that data into an XML file.
However yesterday the process was triggered twice at the same time. I can tell from a log file that gets created, it looks lik...
Examining bytecode, I've noticed javac seems to duplicate checkcast instructions when casting to array types.
Cast.java:
class Cast {
void test(Object a) {
Object[] b = (Object[])b;
}
}
javap disassembly of the javac compiled version
void test(java.lang.Object);
Code:
0: aload_1
1: checkcast #2; //class "[Ljava/...
In the Java runtime, if my application frees memory, does the runtime release the memory back to the OS? Or just back to my process?
...
Hey all,
I've started developing Android apps a couple of months ago, and have a few under my belt. While I can tolerate Java enough to keep developing, I was wondering what success the community has had getting other languages to run.
I've done some investigation as to how other JVM languages work, and it appears Dalvik messes them u...
I have code which needs to do something like this
There is a list of classes each with some method (lets say execute()). I need to invoke that method on each class and there is a fixed timeOut for each invocation. Now, one of the class's execute method is badly written and results in a timeout due to which the jvm does not exit. I am ru...
What is a use case for a soft reference in Java? Would it be useful to garbage collect non-critical items when a JVM has run out of memory in order to free up enough resources to perhaps dump critical information before shutting down the JVM?
Are they called soft-references in they they are soft and break when "put under stress" ie:the...
What's the fastest way to draw a Hello World on the screen as a GUI in Java,
1- by using the minimum number of classes.
2- with the least byte code executed
2- the JVM tweaks
so when I double click on the Jar file in Windows, the Hello World appears in no time (assuming the Runtime is not already loaded).
...
I will try to answer both, please correct me if I am wrong:
Where:
If a static method is being called using Classname.method() or using reflection then it doesn’t matter even if you change the return type of the calling method, the same method will still be called.
So JVM probably checks this in one of the native methods of jvm.cpp
...