Message from Jon Harrop Most recent post: 10/12/2007 5 authors and 6 replies. I'm relatively new to both the JVM and .NET and am learning Scala and F#. I was under the impression that .NET was essentially a later and greater reimplementation of the JVM in a Windows-specific form. However, I have just discovered some nasty caveats in .NET. Specifically, if you generate and use regular expressions the obvious way then .NET leaks memory because it performs run-time compilation to improve performance but fails to garbage collect the generated code when it is no longer needed. There are workarounds but I have yet to see a solution that can even garbage collect code under .NET properly, let alone an elegant solution. So I'm wondering what the JVM crowd have to say about the relative deficiencies of the JVM and .NET. Does the JVM garbage collect code correctly? Are there glaring flaws in the JVM? I'm aware of the array covariance problem in the JVM. -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com/products/?u read more about JVM vs .NET
Message from Christopher Diggins Most recent post: 9/27/2007 3 authors and 3 replies. Hi All, Quick question about optimizing JVM bytecode. Suppose I have the following JAVA code: public static void main(String[] args) { int a[] = new int[42]; for (int i=0; I < a.length; ++i) a[i] = 1; int sum = 0; for (int i=0; I < a.length; ++i) sum = sum + a[i] ; System.out.println(sum); } wrote in message an optimizer that pre-evaluated the code and just generated byte-code that output the value 42? In other words, didn't even bother allocating the array, if it could avoid it?'d it violate the JAVA virtual machine spec, or the language spec? If it is okay, does anyone know of optimizers that do such a pre- evaluation? Any direction would be much appreciated! Christopher Diggins http://www.cdiggins.com read more about Optimization question
Message from Joshua Cranmer Most recent post: 9/20/2007 2 authors and 5 replies. 1. Why does not the JAVA 6 link to the VM spec include the addendum to the class file format that has all of the stack trace information? The only place I can find it is through the actual JSR... 2. When is the SourceDebugExtension attribute actually used? 3. What is the difference in purpose between invokevirtual and invokeinterface ? Answers'd be much obliged. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth read more about Questions about JAVA VM spec
Message from Joshua Cranmer Most recent post: 9/13/2007 3 authors and 3 replies. I haven'ticed a few times that JAVA implements synchronized blocks thusly: aload 4 dup astore 5 monitorenter [ various instructions ] aload 5 monitorexit Why does it duplicate the variable when running synchronized blocks? -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth read more about Synchronized implementations
Message from Wayne McDermott Most recent post: 9/8/2007 2 authors and 2 replies. Hello, I need to reinstall the JDK but the installer insists the development kit is still installed, when I agree to re-installing it just stays in an endless loop of telling me it is already installed and do I want to reinstall. I have physically deleted all the JAVA directories and last night paid 40 bucks for a registry cleaner that has made no difference. When I try to delete using the uninstall utility in Vista it claims to delete it by the JAVA SE Development Kit Update 2 reference stays there. Does anyone know what I need to do to be able to get it re-installed? Thanks, Wayne read more about Cannot delete Se Development Kit from Vista
Message from nicolas.raoul Most recent post: 7/25/2007 4 authors and 9 replies. The HotSpot JVM was running Tomcat, which hosted our web application in the production environment. It had been restarted 6 days ago and had been running fine since. And the same JVM+application usually work fine, we've used them for months, restarting from time to time, and never had this problem. In the JVM error file, I notice about 5000 threads, could this be a problem ? Is the HotSpot JVM unable to handle many threads ? Should I change the way my application uses threads ? Could it be caused by my web application ? I couldn't find any information on how to prevent this kind of crashes. What can I do so that it doesn't happen again ? Below is the generated hs_err_pid*.log error file, in which I replaced two long boring parts with "..." Any idea/hint/advice appreciated ! :-) Nicolas RAOUL. ----------------------------------------------------------------- # # An unexpected error has been detected by JAVA Runtime Environment: # # SIGSEGV (0xb) at pc=0x064c5d46, pid=30568, tid=1797516208 # # JAVA VM: JAVA HotSpot(TM) Server VM (1.6.0_01-b06 mixed mode) # Problematic frame: # V [libjvm.so+0x4c5d46] # # If you'd like to submit a bug report, please visit: # http://JAVA.sun.com/webapps/bugreport/crash.jsp # --------------- T H R E A D --------------- Current thread (0x080d0000): JAVAThread "Timer-133" daemon [_thread_blocked_trans, id=31497] siginfo:si_signo=11, si_errno=0, si_code=0, si_addr=0x00000000 Registers: EAX read more about HotSpot crashed on Linux
Message from Douwe Most recent post: 7/18/2007 2 authors and 2 replies. I have created a simple test class with one method: public class TestClass { int a = 0; public void test() { synchronized(TestClass.class) { a = 1; } } } After opening the generated class file with Eclipse I got the next result (I have removed the parts that are irrelevant) public void test(); 0 ldc <Class TestClass> [1] 2 dup 3 astore_1 4 monitorenter 5 aload_0 [this] 6 iconst_1 7 putfield TestClass.a : int [12] 10 aload_1 11 monitorexit 12 goto 18 15 aload_1 16 monitorexit 17 athrow 18 return Exception Table: [pc: 5, pc: 12] -> 15 when : any [pc: 15, pc: 17] -> 15 when : any I do understand that after the monitor is entered it is very important that it leaves it again with the instruction monitorexit. In normal case where no exceptions occur it'll call monitorexit at the address 11. But if an exception occurs it has to make sure monitorexit is called and therefore the exception table defines in the first entry that on any exception the VM jumps to address 15. Until here everything is understandable, but what is the second entry in the exception table telling me? if an exception occurs betweern 15 and 17 then jump to 15 ... does not this cause an endless loop? read more about Weird entry in the exception table for monitorenter/monitorexit
Message from Mitchell_Collen Most recent post: 6/15/2007 2 authors and 3 replies. Hello All, I have installed jre1.4.2_14 and I have been trying to get a small "hello world type" program to run. Once I got jre installed, I open my dos window and changed directories to folder on on my local drive that contains the jave program. I then try to run it by typeing JAVAc aus.JAVA. The error message does not recognize the command. However, when I type JAVA the error says that it cannot find Main string in JAVA.lang <-- I do not have full message because I am currently at work away from my computer. Anyway, also when I type JAVA in dos it gives me all the parameters and help that I'll need for using JAVA. I assume that dos does in fact see the JAVA because of that. However, the JAVA virtual machine may or may not be set up correctly. Will you please explain to me how to set a the virtual machine and where source paths should be configured in JCreator LE? Any other suggestions are welcome. I emailed myself this message last night: From JCreator LE: I get the following error message: --------------------Configuration: MyProject2 - <Default> - <Default>--------- ----------- Error : Invalid path, \bin\JAVAc.exe -source 1.5 -classpath "C:\Program Files\ JAVA\j2re1.4.2_14\bin" -d C:\Program" "Files\JAVA\j2re1.4.2_14\bin @xxxxxxxxxxx" Process completed. -- Message posted via JAVAKB.com http://www.JAVAkb.com/Uwe/Forums.aspx/JAVA-jvm/200706/1 read more about JAVA virtual machine - help me please?
Message from Yao Qi Most recent post: 6/15/2007 3 authors and 4 replies. I am reading the book "In side the JVM", and very interested in the internals of JVM. I want to find a simple JVM to read the code. Is there any good JVM for research? I have looked at kaffe, but not sure it is suitable for research or not. -- Yao Qi <qiyaoltc@xxxxxxxxxxx> GNU/Linux Developer http://duewayqi.googlepages.com/ read more about JVM for research
Message from parmindersk Most recent post: 6/11/2007 4 authors and 7 replies. I used JProf to see that my Swing app has 40 megs of heap allocated to it. However, over time VM size of the JAVA.exe process keeps on rising and at times hits 300 megs. I understand that the JVM may be using this memory for internal purposes. But is there a way to limit the size to which the VM grows? In short if I need to tell my customers that when they run my app the VM size won't grow higher than some limit. Are there any VM parameters I can use to ensure this. read more about Heap and Memory Footprint
Message from Eric Bodden Most recent post: 6/2/2007 2 authors and 3 replies. This here came up on the Soot mailing list... (see http://www.sable.mcgill.ca/pipermail/soot-list/2007-June/001238.html). It'd be great if you could comment on the problem if you know of anything that could be helpful. I have a problem with inner classes, in particular the way JAVAc generates them. Assume you've the following small JAVA source example: ======== public class SootProblem { public SootProblem() { if (false) { Runnable myRunnable = new Runnable() { public void run() {} }; } new SootProblemInner(); } private class SootProblemInner { int foo; } } ======== The bytecode JAVAc generates for the inner class looks as follows: ======== { int foo; final SootProblem this$0; private SootProblem$SootProblemInner(SootProblem); Code: Stack=2, Locals=2, Args_size=2 0: aload_0 1: aload_1 2: putfield #2; //Field this$0:LSootProblem; 5: aload_0 6: invokespecial #3; //Method JAVA/lang/Object."<init>":()V 9: return LineNumberTable: line 18: 0 SootProblem$SootProblemInner(SootProblem, SootProblem$1); Code: Stack=2, Locals=3, Args_size=3 0: aload_0 1: aload_1 2: invokespecial #1; //Method "<init>":(LSootProblem;)V 5: return LineNumberTable: line 18: 0 } ======== So far so good. Apparently read more about JAVAc generates bytecode using an inner class but doesn't generate the code for that class?
Message from aloha.kakuikanu Most recent post: 5/31/2007 5 authors and 5 replies. I'm getting: "The code of method mTokens() is exceeding the 65535 bytes limit" The method is antlr generated, so I struggle to find any workaround. Perhaps I'm missing some magic JVM parameter setting? Are not 16 bit integers relics of the past century? read more about 65535 bytes method code limit?
Message from Yao Qi Most recent post: 5/28/2007 2 authors and 2 replies. We are doing byte code instrumentation, and at one moment (before call a method, o.f(long);), the stack layout of our program thread is shown as follows, top--> +--------+ | long | +--------+ | Object | +--------+ | ... | we want to transform this stack layout to this, shown as follows, top--> +--------+ | Object | +--------+ | long | +--------+ | Object | +--------+ | Object | +--------+ | ... | I read the JVM spec on byte code instructions from http://JAVA.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc3.html but I still couldn't find a byte code sequence to transform stack layout in this way. Could anybody here give some advice on this problem? Thanks. -- Yao Qi <qiyaoltc@xxxxxxxxxxx> GNU/Linux Developer http://duewayqi.googlepages.com/ Yevtushenko has... an ego that can crack crystal at a distance of twenty feet. -- John Cheever read more about Manipulate JAVA thread stack in this way
Message from senuxjava Most recent post: 4/27/2007 2 authors and 2 replies. hi every body I need help to make a program in JAVA programming language to make TF- IDF algorithm which is one algorithm for rank pages please help me read more about TF-IDF algorithm in JAVA
Message from Christopher Diggins Most recent post: 4/11/2007 2 authors and 5 replies. I was wondering if there has been any research into adding higher- order instruction to the JAVA bytecode? In other words instructions that either push or pop instructions on the evaluation stack. There are only a few core instructions that'd be neccessary to build others : - constantly : pop a value, push an instruction on the stack that returns that value - compose : pop two instructions, push a new instruction that evaluates the first function, then the second. - eval : pop an instruction and evaluate This functionality'd make it easier for me to compile functional languages to the CIL, and make them much more efficient. We've been discussing the topic on Lambda-the-Ultimate ( http://lambda-the-ultimate.org/node/2177 ). The first response from many people is that they believe that this functionality has a huge performance hit, and loses the effect of statically verifiable type safety. This is untrue. I have developed a type-system for stack-based languages with higher- order functions and written a paper about it at : http://www.cat-language.com/paper.html. I believe the work to be novel, and I'd be interested in discussing it further. Cheers, Christopher Diggins http://www.cdiggins.com read more about Higher Order Byte-Code Instructions
Message from Christian Stapfer Most recent post: 4/3/2007 4 authors and 11 replies. I've written a distributed presentation/whiteboarding application (JAVA2/Swing) for online-tutoring. Currently I use a graphics tablet to draw and write on the whiteboard. Now I'd like to switch from using a separate graphics tablet to using the stylus of a Tablet PC. However, my JAVA application seems to drop a great many mouse drag events, which results in hardly legible handwriting (not so with native Tablet PC applications like Windows Journal). http://www.freesoft.org/software/tablet-JAVA/ suggests patching the JAVA runtime to solve this problem - an idea from which I instinctively recoil in horror. (I'd rather rewrite the whole thing in C#, which I even might consider a good occasion to finally learn a reasonable amount of C# - although, sadly, JAVA's level of platform independence'd be lost in the process.) Does anyone of you know another (less hackish) way to get more mouse-path information in a JAVA2/Swing application? Regards, Christian read more about How do I get smooth handwriting on a Tablet PC using JAVA2/Swing?
Message from Moritz Hammer Most recent post: 3/29/2007 3 authors and 3 replies. Hello, I am trying to use JVMTI to instrument the bytecode of all classes up to JAVA.lang.Object. I need this so I can have a plain constructor (with some special signature) that doesn't do anything besides calling a superclass constructor that also doesn'thing (I want to simulate the effect of the actual constructor later). Right now, that doesn't sound too complicated to me: add another <init> method in the constant pool and a method block later. However, before I start, I wanted to ask people who know whether it can really be done: adding another constructor to JAVA.lang.Object (or, at least, any direct subclass). Any pitfalls I am currently heading to? Is there any framework I can use (I don't want to permanently instrument all JAVA classes, so unless I am mistaken, I need to do it with JVMTI and implement it in C to get a grasp on JAVA.lang.Object). Any hints are greatly appreciated, Moritz read more about Adding constructor by bytecode instrumentation
Message from danwichs Most recent post: 3/26/2007 3 authors and 8 replies. Hi, I'm trying to modify JAVA.lang.String.JAVA and add the modified String.class to rt.jar [THIS IS FOR MYSELF ONLY AND won't BE DEPLOYED]. I cannot add "private final boolean tainted[] = new boolean[5];" to String.JAVA. If I do, it still compiles and I can add it to rt.jar and compile a test program against it. However, the JVM crashes with a strange message: JAVA.lang.IllegalArgumentException: name can not be empty at JAVA.security.BasicPermission.init(Unknown Source) at JAVA.security.BasicPermission.<init>(Unknown Source) at JAVA.lang.RuntimePermission.<init>(Unknown Source) at JAVA.lang.Thread.<clinit>(Unknown Source) I tried various ways of rewriting the above such as adding "private final boolean tainted[];" and initializing it in each constructor. Nothing works.I can add methods to String.JAVA and even the member variable "private boolean isTainted;" and it works just fine. Do you've any ideas for why adding a boolean array doesn't work (or better yet how to get around this issue)?Thank you, Daniel read more about modifying JAVA.lang.String.JAVA
Message from hunkgym Most recent post: 3/16/2007 3 authors and 3 replies. Good Day! Would be appreciate to know any suggestion on the following coding problem: Originally, I've a JAVA application. Now, I've developed a JAVA login form which is name as Login.JAVA Would be appreciate to know how to compose the code to link to the JAVA application after the user successful login. Both JAVA source files (including the JAVA application) are stored at http://tech.groups.yahoo.com/group/JAVAlogin/ Please refer the source file and suggest. Thanks for any HELP! Danke! read more about Connect to JAVA application from JAVA login form
Message from Kevin Most recent post: 2/19/2007 3 authors and 4 replies. I use WebLogic 8.1 on a Solaris 9 box with 8 processors. I've JDK 1.4.2_05 installed and due to long pauses with the default collector, I tried out the Concurrent garbage collector. However, once I do that, the system runs out of file handles within minutes of starting the load test. Solaris is setup with 8192 as the top limit for file handles. I tried various options within Concurrent garbage collector (like ParNewGC, CMSParallelRemark) but all lead to system running out of file handles. Any inputs ? Thanks, Kevin. read more about JDK 1.4.2_05
Message from vicky7909 Most recent post: 2/19/2007 4 authors and 6 replies. Hi, I am getting the following error when I execute the a particular query that returns 34 records. However, each row has lots of columns. If I reduce the number of rows or the number of columns the error goes away. I don't get this error on Windows XP, even when I do not reduce the number of rows/columns. (JAVA version "1.5.0_09") JAVA(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01) JAVA HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode) Only on Linux.(1.5.0_06-b05) Linux <machine-name> 2.6.9-34.ELsmp #1 SMP I researched a little. At least one page was said that this could be a JVM bug. Any help is appreciated. Thanks, vk79 # # An unexpected error has been detected by HotSpot Virtual Machine: # # SIGSEGV (0xb) at pc=0xb79dfcd1, pid=18422, tid=766794672 # # JAVA VM: JAVA HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode) # Problematic frame: # V [libjvm.so+0x3c9cd1] # # An error report file with more information is saved as hs_err_pid18422.log # # If you'd like to submit a bug report, please visit: # http://JAVA.sun.com/webapps/bugreport/crash.jsp # --------------- T H R E A D --------------- Current thread (0x0812a510): JAVAThread "CompilerThread1" daemon [_thread_in_native, id=18435] siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000000 Registers: EAX=0x00000000, EBX=0xb7bc17f0, ECX=0x2db43e50, EDX=0x1e5d0150 ESP=0x2db43dc4, EBP=0x2db43de8, ESI=0x1e57b998, EDI=0x2db43e50 read more about JVM errors
Message from giugy Most recent post: 1/17/2007 2 authors and 9 replies. Hi,sorry for my english but I do not speak it very well.... Someone knows where I can find the Keyword Extractor source code written in JAVA? A software that analyzes a text and extract the keyword of the text (the most present words in the text....for example the word "hello" is present forty times,the word "thanks" is present thirty times....). I need to see the software's source code written in JAVA in order to understand as it works.... Thaks,bye read more about Keyword extractor's source code....where I can find it???
Message from onkar Most recent post: 12/14/2006 2 authors and 2 replies. Can anyone suggest me a good project idea on jvm, garbage collection , etc I've knowledge of - (1) C/C++ , lex,yacc (2) x86 assembly (3) Linux memory management (4) jvm architecture thank you, read more about jvm/garbage collection project idea
Message from Fabian Wolf Most recent post: 11/28/2006 2 authors and 3 replies. Hi all, at our university we are working on a project to implement a Mobile-AdHoc-Network-Router on PocketPCs running WindowsCE. We'd prefer to use JAVA for our development, however we were unable to find a suitable VM for that platform. We don't need fancy things like UI-toolkits, no need for Swing, AWT, SWT,... It'd be nice though if we could've a decent and solid J2SE VM (preferably >= 1.4). Any hints are really appreciated - no matter if it's a commercial or free VM.Thank you very much! Regards, Fabian read more about JAVA VM for WindowsCE (Pocket PC)
Message from santiago538 Most recent post: 11/23/2006 2 authors and 4 replies. I've written an application in JAVA and C on the Solaris 10 (x86) platform using the JDK 1.5.0_09. The JAVA code calls a native method "startButtonWatcher," which then forks, the parent process returning, and the child process initiating an event loop that calls a static method, "sendButtonEvent," on a JAVA class "ButtonWatcher." The problem is that on the 65 invocation, the CallStaticVoidMethod will hang. There is no core file or pid log file produced. (it'll also hang for CallVoidMethod as well if I remove the static declaration in ButtonWatcher.) I've also added a main() function to the C code so that it can be compiled and run as an executable rather than a library file loaded from JAVA, and the the same loop will be fine, the Call*Method call being exected forever (or over a million times at least). The only difference in the code is the JVM--in the sharable library, it uses the JVM of the class that calls the native method, and the standalone has to create its own. What could be the problem? Thanks! read more about JNI CallStaticVoidMethod fails after N calls
Message from aa Most recent post: 11/22/2006 3 authors and 4 replies. Hello, I try to create a JAVA virtual machine in a C++ application (Windows XP). I've installed jdk1.5.0_08 and I am sure, that my application loads the appropriate jvm.dll. Here is my simple code, I receive always -1: ... JAVAVMOption options[2]; options[0].optionString = "-DJAVA.compiler=NONE"; options[1].optionString = "-DJAVA.class.path=."; JAVAVMInitArgs args; args.version = JNI_VERSION_1_4; args.nOptions = 2; args.options = options; args.ignoreUnrecognized = JNI_FALSE; ... response = JNI_CreateJAVAVM(&mJvm, (void**)&mEnv, &args); ... Can you please say me what is wrong?! Thanks, Anahita read more about JNI_CreateJAVAVM() fails
Message from aa Most recent post: 11/22/2006 2 authors and 2 replies. Hello, I try to start a JAVA virtual machine from a C++ application (Windows XP). I've 'jdk1.5.0_08' installed and I am sure, that my application loads the appropriate jvm.dll. Here is my simple code, I receive always -1: ... JAVAVMOption options[2]; options[0].optionString = "-DJAVA.compiler=NONE"; options[1].optionString = "-DJAVA.class.path=."; JAVAVMInitArgs args; args.version = JNI_VERSION_1_4; args.nOptions = 2; args.options = options; args.ignoreUnrecognized = JNI_FALSE; ... response = JNI_CreateJAVAVM(&mJvm, (void**)&mEnv, &args); ... Can anybody say me what is wrong?! Thanks, Anahita read more about JNI_GetCreatedJAVAVMs() fails
Message from Master Programmer Most recent post: 11/21/2006 8 authors and 11 replies. Hi I was thinking about learning the JAVA programing language. I asked a friend his views and he told me not to bother - as JAVA is a slow piece of shit ! Is that true, is it really a goofy outdated language that doesnt run quickly like other languages? (from the horses month). Thanks read more about JAVA slow?
Message from tangent Most recent post: 11/11/2006 2 authors and 2 replies. I am having problem while building app. For some reason it stopped working. I had a pretty bad crash and lost a lot of stuff. Since then, borland jbuilder doesn't want to properly compile. I am getting this error message: "Application1.JAVA": Error #: 750 : initialization error: com.borland.compiler.symtab.LoadError: neither class nor source found for JAVA.lang.Object Any help'd be appreciated. read more about Error building app
Message from Maciej Most recent post: 10/27/2006 2 authors and 2 replies. Hi all, I delevoped multi-threaded application and I'd like to test it on: - machine with 2-cored processor - machine with 2 processors Is there possibility to push JVM to use only one core / one processor of hosting machine ? Just for comparision of efficiency ? Regards, Maciej read more about Testing single core / processor in JAVA
Message from Rohan Beckles Most recent post: 10/26/2006 2 authors and 2 replies. Hello -- I recently installed IBM's WEME J2ME CDC implementation, version 6.1, on a Motorola Q. When I tried to run the GolfScoreTracker application, I got an OutOfMemoryError. I fixed this by adding the parameter "Xmx64m" to the link file. Now when I run the app, the error I get is NoClassDefFound, except that when it appears in the J9 Console it says "NoClassD". I can not scroll the console window across to see which class it can not find. Does anyone one know how to make the text area part of the J9 Console active, and able to scroll? Thanks for any help, Rohan Beckles rohan.beckles@xxxxxxxxxxx read more about IBM WEME J2ME CDC on Motorola Q
Message from dkurak Most recent post: 9/26/2006 2 authors and 2 replies. I am running Jboss 4.0.1sp1 with the 1.4.2_10 JVM on a Windows 2003 Server with 5GB RAM. I'd like to run multiple instances of Jboss, giving each 2GB available RAM to work with leaving the remaining 1GB for the OS. Is the above scenario fairly standard? Do I need to do any special configuration to allow this to happen? Can you point me to a reference link with some documentation around server memory with multiple instances? Thanks in advance... read more about Maximizing Server Memory Windows 2003 Server 5GB RAM JVM 1.4.2_10
Message from apiccirilli Most recent post: 9/20/2006 3 authors and 4 replies. Hi all - I have scoured the internet for this and can not find any helpful information. Is there any way for the JVM to display the default maximum heap size on a system? I can not seem to figure out what it is using as its maximum value, if I do not manually override it with -Xmx. Any help'd be really appreciated. Thanks - Aaron read more about Display Default Heap Size
Message from Martinez Most recent post: 9/16/2006 3 authors and 3 replies. as in title any links, docs, contacts regards Martin read more about Exist JAVA for ARM microprocessors
Message from ramdas.hegde Most recent post: 8/30/2006 2 authors and 2 replies. I get the following error when running my application using JDK 1.4.2_07 on a Debian Linux box. Exception in thread "CompilerThread0" JAVA.lang.OutOfMemoryError: requested 1634084 bytes for Chunk::new. Out of swap space? The JVM has been allocated a max of 1.5GB of heap and the system itself has 3GB of physical memory. The JVM crashes randomly and the system seems to have enouugh physical memory and swap space when this happens. Some of the other params that are relevant here are : number of threads running within the JVM is around 520 and the stack size is set to 512 Looks like this error has been reported as a bug against some VMs in Sun's bug db but there is no definite fix that is specified. It also seems to be happening across many different JVM versions. Any clues on how to debug this? Thanks read more about Exception in thread "CompilerThread0" JAVA.lang.OutOfMemoryError
Message from inathaniel Most recent post: 8/28/2006 2 authors and 2 replies. Hi, I've created a forum and a website that isn't completely done but free. The forum is basicly JAVA people helping each other and the website is geared towards having contests created by the users and job recruiters. thanks join forum discussJAVA.com/forum read more about join forum discussJAVA.com/forum
Message from Toby Kim Most recent post: 8/22/2006 3 authors and 3 replies. Hi. While I'm writing codes on call graph construction of JAVA programs, I have got a question. I'm wondering how the class name in the argument of invokevirtual is determined. Is it the name of a class containing the method definition? The code snippet (1) is compiled into the bytecode (2). Neither printStackTrace() nor equals() aren't defined in the AWTException. But the class name of the first invokevirtual is AWTException, whereas the class name of the second invokevirtual is Object. Why is that? I'd appreciate it if you'd let me know how the class name of invokevirtual is determined. (1) JAVA.awt.AWTException e1 = new JAVA.awt.AWTException("1"); JAVA.awt.AWTException e2 = new JAVA.awt.AWTException("2"); e1.printStackTrace(); e1.equals(e2); (2) aload_1 invokevirtual #6; //Method JAVA/awt/AWTException.printStackTrace:()V aload_1 aload_2 invokevirtual #7; //Method JAVA/lang/Object.equals:(LJAVA/lang/Object;)ZThanks. Regards, Toby Kim read more about argument of invokevirtual
Message from GNS Most recent post: 8/19/2006 3 authors and 3 replies. I've a JAVA web application running on Sun Solaris 10 platform, the JAVA version is 1.5.0. Recently I found when I used TOP command to get the memory used by my application it was over 1.5GB and kept increasing. However when using the JAVA.lang.Runtime.totalMemory() and freeMemory() methods from my code the memory usage was way lower than the size reported by TOP. From totalMemory() and freeMemory() method calls I could see that there didn't seem to have a memory leak in my code and the GC was working properly however memory use reported by TOP never decreased meaning that the GC never got kicked off??? Thanks, Richard. read more about JAVA VM Question
Message from Dmitry Marienko Most recent post: 7/27/2006 2 authors and 2 replies. Hi All ! Can anybody point me on the good documentation about common principies and keys aspects of realisation of JIT compilers ? -- dima read more about JIT compiler's docs
Message from toton Most recent post: 7/25/2006 4 authors and 6 replies. Hi everyone, I need to have alarge array of small class'es (in c# sense struct). For premitive types, as the ArrayList stores value types, hence it is possible to use apache common primitives library to save memory & cache overflow. However, for array of classes, which are small enough, I want to store them as value, so that they occupy contiguous memory space, rether than heving them referenced from list. This is just to decrease cache overflow error & speedup things. Is there a possible way to do it?. In general, is there a possible way to locate the class in local stack, rather than heap or free store? Some common base class or weak reference type? abir read more about JAVA collection problem
Message from Spuuf Cool Most recent post: 7/25/2006 2 authors and 2 replies. We're using the Sun 1.5.0_06 JVM on RedHat (AS). The box has 4 CPUs, they're all available and get some load (i. e. OS recognized them and they work). But al our JVM max out by just "digesting" a single CPU, i. e. any JVM maxes out at 25% of the system load. Using a simple CPU-eater program that runs multiple thread I was able to: - "digest" 2 cores on Win XP - "digest" 2 cores on Max OS X (Intel) - still only 1 (!) CU on the Linux server Where's the problem? Anyone else having the same issue? There is just one particularity to the Lunix installation, the Xeon CPUs are 64bit but we're using the 32bit version of the OS (and JV; and all other stuff). Anyone seein the same problem. For testing purposes this is the code I used (will digest up to 3 CPU cores for max 30 secs.): package test; public class CpuBound { public static void main(String[] args) throws InterruptedException { Thread th1 = new Thread(new Eater()); Thread th2 = new Thread(new Eater()); Thread th3 = new Thread(new Eater()); th1.start(); th2.start(); th3.start(); int joinTime = 10*1000; System.out.println("Joining " + th1); th1.join(joinTime); System.out.println("Joining " + th2); th2.join(joinTime); System.out.println("Joining " + th3); th3.join(joinTime); System.out.println("End"); System.exit(-1); } static class Eater implements Runnable { public void run() { Thread.yield(); for( long l = Long.MIN_VALUE; l < read more about JVM fails to use more than one CPU/core on RH Linux?
Message from toton Most recent post: 7/19/2006 4 authors and 5 replies. Is there any alternative to JVM exists as research product, like a 2 address or 3 address instruction set VM ? Ofcourse it won't be able to compile class file, but can run JAVA program with help of a different compiler, which will compile JAVA to a 2-address / 3-address instruction code based class. I am specially interested if some compiler compiles JAVA to DLX processor... I am not looking for a commercial product, even any research implementation or a IEEE/ ACM paper will help me ... Thanks in advance. read more about Alternative to JVM
Message from priya_das7 Most recent post: 7/14/2006 2 authors and 2 replies. Hi Friends, Do not missout on these articles on design techniques: Polymorphism in JAVA: http://JAVAlive.com/modules/articles/article.php?id=19 The Factory Design Pattern: http://JAVAlive.com/modules/articles/article.php?id=18 Effective use of Interfaces and Abstract Classes: http://JAVAlive.com/modules/articles/article.php?id=17 Why ORM Tools aren't Recommended: http://JAVAlive.com/modules/articles/article.php?id=16 How to Estimate Project Deadlines: http://JAVAlive.com/modules/articles/article.php?id=14 Regards, Priya read more about Polymorphism in JAVA
Message from Sasi Most recent post: 7/6/2006 2 authors and 2 replies. My applet works correctly for most users but some users are complaining that on certain machines it takes about 90 seconds to loads whereas normally it takes only about 2-3 seconds. What could be causing this behavior? I do not have access to those machines to examine since they have confidential data. read more about Strange applet behavior
Message from anon Most recent post: 6/25/2006 2 authors and 3 replies. --- 0 1 2 3 4 5 6 7 Comment 0 nop call jmp ret jz jnz jc jnc destination in rest of instruction nop exec goto ret gz gnz gc gnc for slot 3 8 xor com and or + +c *+ /- 10 A!+ A@xxxxxxxxxxx+ X@xxxxxxxxxxx+ ext1 >X >Y Y!- lit A! A@xxxxxxxxxxx X ext2 X> Y> Y!+ lit for slot 1 18 nip drop over dup >r >a r> a --- read more about Bernd Paysan's B16, VLIW protocol experiment
Message from wizofaus Most recent post: 6/21/2006 14 authors and 31 replies. Are there any up-to-date statistics available that give a good idea of what JAVA version most web users have installed on their machines? I'm developing a JAVA applet as part of a web site, and I'd like to know that most users will be able to view it without any issues - as it is, if I compile it to target JDK 1.5, all the machines other than my own that I have tested it on won't load the applet, and worse still, do not give any sensible user feedback as to why. I accept there will also be a percentage of users with an exceptionally old JAVA version installed (or worse still, none at all), but I'd like to keep this to a minimum without sacrificing too many features that come with the later JAVA versions. read more about Which JAVA version to target?
Message from OtisUsenet Most recent post: 6/21/2006 3 authors and 4 replies. Hi, I'm looking for a 64-bit JVM for Linux on Intel, but it looks like Sun does not offer one. Am I just missing it, or are there really no 64-bit JVMs for Linux on Intel? Are there free alternatives? Thanks. read more about 64-bit JVM for Linux on Intel?