I'm trying to run a jar within a java program and capture its stdout. I want to do this to avoid the JVM startup cost every time the jar is run. What is the simplest way to do this?
I started by modifying Java's JarClassLoader and adding a SecurityManager subclass to that to prevent system exits. The JarClassLoader is a subclass of URL...
Recent JVM's have a lot of XX parameters for garbage collection (see here for example), but what are the options which can make a client side Swing application really perform better?
I should note that one of the things that really annoys me on client side java applications is the large delay in stop-the-world garbage collection. In Int...
Running Eclipse 3.5.1, JDK 1.6.0_17 on WinXP SP3 32Bit with 3.5 gigs of RAM.
I'm aware of the known Eclipse best practices, still trying to figure out eclipse.ini.
This will launch: -Xmx588m and this won't: -Xmx589m.
Same with -XX:MaxPermSize. Anything above -XX:MaxPermSize=140m won't launch.
The screen of death is simlar to this (tak...
Parrot is the virtual machine originally designed for Perl 6.
What technical capabilities does the Parrot VM offer that competing virtual machines such as the Java Virtual Machine (JVM)/Hotspot VM and Common Language Runtime (CLR) lack?
...
I found the JVM flags here. Is there a more detailed explaination of what exactly they do?
...
We're seeing ConnectException with message "Connection refused" sporadically appearing at times when connecting to our Tomcat server. Could these be caused by long GC cycles?
(We're activating up the relevant JVM flags to get more log messages on GC cycles, but I thought to ask this here anyways)
...
Can someone come up with a disassembled machine code assembler listing?
I mean there must be some overhead compared to the normal function call in C.
The VM needs to track calls to find hotspots and when it uses compiled code it needs to provid ways to change the compiled method on fly if a new loaded class requires a recompilation.
I...
An Eclipse RCP aplication running on Mac OS X 10 is crashing with java exit code 10. What does this mean, and what might be a possible cause?
Additional information:
eclipse.buildId=unknown
java.version=1.5.0_20
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=carbon, NL=fi_FI
Command-line arguments: -os macosx -ws ...
Sun's JVM comes in two flavors: -client and -server, where the Server VM is supposed to be optimized for long running processes, and is recommended for server applications.
When I run java with no parameters, it displays the usage options, which includes the following text:
The default VM is server,
because you are running o...
I have a 6.5GB Hprof file that was dumped by a 64-bit JVM using the -XX:-HeapDumpOnOutOfMemoryError option. I have it sitting on a 16GB 64-bit machine, and am trying to get it into jhat, but it keeps running out of memory. I have tried passing in jvm args for minimum settings, but it rejects any minimum, and seems to run out of memory be...
Forgive me if this is an ignorant question, I'm not exactly an expert programmer just curious. Is it possible to read the working memory, say for an instance of a class, from inside a running program?
I know you can do something like println(theInstance.getClass()); and it will give you the memory address of the instance (I'm assuming ...
This is a an interview question.
...
Regarding first-class functions in Scala, it is written in the book Programming by Scala:
A function literal is compiled into a
class that when instantiated at
run-time is a function value.
When there will be many first-class functions used in a program, will this affect the JVM's PermGen space? because instead of simple functi...
Using websphere application server 6.0.1.23 on aix 5.3
In applications (Lotus connections), working on an application server (WAS). Entries that make application users are recorded with the wrong date, not one that grants the date command. Has anyone encountered a similar situation?
...
I encountered a strange problem today: i had a method that took two Date objects as arguments. The calling method passed reference to the very same object as both of them (the method in question was EqualsBuilder.append). The first parameter got passed fine, but the second one not. It was a new Date object that was different from the fir...
JSR-133 FAQ says:
But there is more to synchronization
than mutual exclusion. Synchronization
ensures that memory writes by a thread
before or during a synchronized block
are made visible in a predictable
manner to other threads which
synchronize on the same monitor. After
we exit a synchronized block, we
release the ...
What books can you recommend for learning Java for a C++ programmer?
Also what do you recommend to read for learning JVM features for using JVM-based languages effectively?
...
I have a Java app to deploy and want to deploy the JVM along with it (to simplify install). I want to have the JVM stripped down to only include the pieces the app needs to keep the distributable small. How can I strip down the JVM to bring the size down? Can this be done with the Java Kernel or is there some alternative to the Sun JVM t...
I'm trying to infer the number of bytecodes that the JVM "interprets"; In quotes because surely they are also compiled. Is there any way or JVMTI/JVMPI interface or instrumentation which can provide some sort of inferred metric on this?
...
I am trying to bundle java as a part of a java product that should be installed silently with a single click and are having some issues:
My installation has the following requirements:
Has no be silent and require no user input or action excpect a doubleclick on the installation file (no configuration and post install steps)
Has to setu...