Search Results

Search found 1197 results on 48 pages for 'jvm'.

Page 38/48 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • java increase xmx dynamically at runtime

    - by Tomer
    Hi, I have a jvm server in my machine, now I want to have 2 apservers of mine sitting in same machine, however I want the standby one to have a really low amount of memory allocated with xmx because its passive, one the main server (active) goes down I want to allocate more memory to my passive server which is already up without restarting it (I have have them both having too much xmx - note they would consume memory at startup and I cant allow possibility of outOfMemory). So I want passive - low xmx once active goes down I want my passive to receive much more xmx. is there a way for me to achieve that. Thanks

    Read the article

  • in java, which is better - three arrays of booleans or 1 array of bytes?

    - by joe_shmoe
    I know the question sounds silly, but consider this: I have an array of items and a labelling algorithm. at any point the item is in one of three states. The current version holds these states in a byte array, where 0, 1 and 2 represent the three states. alternatively, I could have three arrays of boolean - one for each state. which is better (consumes less memory) depends on how jvm (sun's version) stores the arrays - is a boolean represented by 1 bit? (p.s. don't start with all that "this is not the way OO/Java works" - I know, but here performance comes in front. plus the algorithm is simple and perfectly readable even in such form). Thanks a lot

    Read the article

  • Jboss failover testing

    - by Sam
    Hi All, I have a peculiar situation here. I have installed JBoss 5.1.0 as a service in Wintel box. The service will restart itself if the JBoss instance fails. However I could not find a way to test this scenario. I killed the JVM that was running the JBoss, but it did not restart the service. I need to make the JBoss service end abnormally so that I can ensure it is restarts again. In a nutsehll, I need a way to make JBoss end abnormally. Please help.

    Read the article

  • I know the big picture but can't put it in place

    - by Simbilim
    Hi, I'm interested in web development and by that I mean the bigger projects like facebook or twitter. I know the basics of java, css, php and mysql. I know there is a lot more out there. I read about it. But I don't know what the purpose is and how to put in place. Things like: Scribe, thrift, casandra, Unix/Linux, shell/perl/python scripting, PostgreSQL, MongoDB, non-relational NoSQL datastores, JVM, nginx I want to know why they need it, how they use it and what te purpose is. What I need is a book like technical background of facebook for dummies or so. Are there any books or websites that explain this from scratch? Thank you!

    Read the article

  • How to run a jar file in hadoop

    - by Arihant
    I have created a jar file using the java file from this blog using following statements javac -classpath /usr/local/hadoop/hadoop-core-1.0.3.jar -d /home/hduser/dir Dictionary.java /usr/lib/jvm/jdk1.7.0_07/bin/jar cf Dictionary.jar /home/hduser/dir Now i have tried running this jar in hadoop by hit and trial of various commands 1hduser@ubuntu:~$ /usr/local/hadoop/bin/hadoop jar Dictionary.jar Output: Warning: $HADOOP_HOME is deprecated. RunJar jarFile [mainClass] args... 2.hduser@ubuntu:~$ /usr/local/hadoop/bin/hadoop jar Dictionary.jar Dictionary Output: Warning: $HADOOP_HOME is deprecated. Exception in thread "main" java.lang.ClassNotFoundException: Dictionary at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at org.apache.hadoop.util.RunJar.main(RunJar.java:149) How can i run the jar in hadoop? I have the right DFS Locations as per needed by my program.

    Read the article

  • Why is an anonymous inner class containing nothing generated from this code?

    - by Andrew Westberg
    When run through javac on the cmd line Sun JVM 1.6.0_20, this code produces 6 .class files OuterClass.class OuterClass$1.class OuterClass$InnerClass.class OuterClass$InnerClass2.class OuterClass$InnerClass$InnerInnerClass.class OuterClass$PrivateInnerClass.class When run through JDT in eclipse, it produces only 5 classes. OuterClass.class OuterClass$1.class OuterClass$InnerClass.class OuterClass$InnerClass2.class OuterClass$InnerClass$InnerInnerClass.class OuterClass$PrivateInnerClass.class When decompiled, OuterClass$1.class contains nothing. Where is this extra class coming from and why is it created? package com.test; public class OuterClass { public class InnerClass { public class InnerInnerClass { } } public class InnerClass2 { } //this class should not exist in OuterClass after dummifying private class PrivateInnerClass { private String getString() { return "hello PrivateInnerClass"; } } public String getStringFromPrivateInner() { return new PrivateInnerClass().getString(); } }

    Read the article

  • How to synchronize static method in java.

    - by Summer_More_More_Tea
    Hi there: I come up with this question when implementing singleton pattern in Java. Even though the example listed blow is not my real code, yet very similar to the original one. public class ConnectionFactory{ private static ConnectionFactory instance; public static synchronized ConnectionFactory getInstance(){ if( instance == null ){ instance = new ConnectionFactory(); } return instance; } private ConnectionFactory(){ // private constructor implementation } } Because I'm not quite sure about the behavior of a static synchronized method, I get some suggestion from google -- do not have (or as less as possible) multiple static synchronized methods in the same class. I guess when implementing static synchronized method, a lock belongs to Class object is used so that multiple static synchronized methods may degrade performance of the system. Am I right? or JVM use other mechanism to implement static synchronized method? What's the best practice if I have to implement multiple static synchronized methods in a class? Thank you all! Kind regards!

    Read the article

  • coldfusion class path for multiple services - only recognizing first directory

    - by ffc
    Hi, I am trying to use multiple web services on a single CF page. I have entered the stubs directory for each of the web services in the ColdFusion Class Path within administrator server settings java and jvm paths are listed separated by commas: c:\coldfusion9\stubs\ws1,c:\coldfusion9\stubs\ws2 for some reason, only the web service whose stub path is listed first will work. When I try to call the second web service, I get a "web service operation ... cannot be found" but if i switch the order of paths listed in the admin settings and restart the service, the web service listed first now will work. any ideas on how to manage multiple web services and their stubs ? thanks!

    Read the article

  • OpenSSL compatible API for Scala?

    - by pfleidi
    Hello, I'm working on a project with a friend. He's implementing his software in Ruby and I'm doing my stuff in Scala (with Lift). We're using some asynchronous encryption and he is using the ruby OpenSSL bindings for that: key = OpenSSL::PKey::RSA.generate(4096) self.public_key = key.public_key self.private_key = key What I'm looking for is a simple API which is compatible to OpenSSL and runs on the JVM. I need it to create key-pairs and to encrypt and sign our payload. Do you have any suggestions?

    Read the article

  • JNI AttachCurrentThread NULLs the jenv

    - by Damg
    Hello all, I'm currently in the process of adding JNI functionality into a legacy delphi app. In a single-threaded environment everything works fine, but as soon as I move into multi-threaded environment, things start to become hairy. My problem is that calling JavaVM^.AttachCurrentThread( JavaVM, @JEnv, nil ); returns 0, but puts the JEnv pointer to nil. I have no idea why jvm.dll should return a NULL pointer. Is there anything I am missing? Thank you in advance -- damg PS: * Environment: WinXP + JDK 1.6 * Using JNI.pas from http://www.pacifier.com/~mmead/jni/delphi/

    Read the article

  • Template engine recommendations

    - by alex
    I'm looking for a template engine. Requirements: Runs on a JVM. Java is good; Jython, JRuby and the like, too... Can be used outside of servlets (unlike JSP) Is flexible wrt. to where the templates are stored (JSP and a lot of people require the templates to be stored in the FS). It should provide a template loading interface which one can implement or something like that Easy inclusion of parameterized templates- I really like JSP's tag fragments Good docs, nice code, etc., the usual suspects I've looked at JSP- it's nearly perfect except for the servlet and filesystem coupling, Stringtemplate- I love the template syntax, but it fails on the filesystem coupling, the documentation is lacking and template groups and stuff are confusing, GXP, TAL, etc. Ideas, thoughts? Alex

    Read the article

  • Multimap Space Issue: Guava

    - by Arpssss
    In my Java code, I am using Guavas Multimap (com.google.common.collect.Multimap) by using this: Multimap< Integer, Integer Index = HashMultimap.create() Here, Multimap key is some portion of URL and value is another portion of URL (converted into integer). Now, I assign my JVM 2560 Mb (2.5 GB) heap space (by using Xmx and Xms). However, it can only store 9 millions of such (key,value) pairs of integers (approx 10 million). But, theoretically (according to memory occupied by int) it should store more. Can anybody help me, 1) Why is this happening (means Multimap is taking lots of space) ? I checked my code with out inserting pairs in Multimap, it takes only 1/2 MB space. 2) Is there any other way or home-baked solution to solve this space issue ? More clearly, how to solve this memory issue ? Thanks in advance and any idea is perfectly OK for me.

    Read the article

  • Ways to optimize Android App code based on function call stack?

    - by K-RAN
    I've been told that Android OS stores all function calls in a stack. This can lead to many problems and cause the 'hiccups' during runtime, even if a program is functionalized properly, correct? So the question is, how can we prevent this from happening? The obvious solution is to functionalize less, along with other sensible acts such as refraining from excessively/needlessly creating objects, performing static calls to functions that don't access fields, etc... Is there another way though? Or can this only be done through careful code writing on the programmers' part? Does the JVM/JIT automatically optimize the bytecode during compile time to account for this?? Thanks a lot for your responses!!

    Read the article

  • Maven easyb plugin java heap space settings?

    - by vinnu
    Hi, I attempted to change my heap size for maven easyb plugin http://www.easyb.org/maven-easyb-plugin/. In my easyb test I added standard code to print the heap size using the code Runtime.getFreeMemory() and Runtime.getTotalMemory(). I tried setting the MAVEN_OPTS=-Xmx1024m -Xms1024m and also set the maven opts in Maven surefire plugin. Now when I run the same class from the Junit I can see the getTotalMemory() displaying a number close 1Gig but the when the same classes are invoked from easyb plugin they do not reflect the memory size. Shouldn't there be a way of passing JVM opts to maven easyb plugin when it runs these easyb tests? At the very minimum it should atleast pick up the MAVEN_OPTS settings from the environment. Has someone bumped into problems like this? (A search on this group's archive does not reveal much)

    Read the article

  • Best and safest Java Profiler for production use?

    - by Pete
    I'm looking for a Java Profiler for use in a very high demand production environment, either commercial or free, that meets all of the following requirements: Lightweight integration with code (no recompile with special options, no code hooks, etc). Dropping some profiler specific .jars alongside the application code is ok. Should be able to connect/disconnect to the JVM without restarting the application. When profiling is not active, no impact to performance When profiling is active, negligible impact to performance. Very slight degradation is acceptable. Must do all the 'expected' stuff a profiler does - time spent in each method to find hotspots, object allocation/memory profiling, etc. Essentially I need something that can sit dormant in production when everything is fine without anyone knowing or caring that it is there, but then be able to connect to it hassle (and performance degradation) free to pinpoint the hard to find problems like hotspots and synchronization issues.

    Read the article

  • Getter/Setter from separate class file in Java

    - by Crystal
    I'm new to Java and for a HW assignment, we had to create a Person class that has a constructor, getter/setter for the attributes of firstName, lastName, phone. That is in a separate file from an old HW assignment (Person.java). Now we have to use that Person class in our new HW assignment (LoanApplication.java). So if one of the attributes is private Person client do I need to create getter/setters or a constructor again? Otherwise, how does each LoanApplicaiton instance know which Person attribute it is to go with? How does the JVM know that it can use the Person.class even though my LoanApplicaiton.class does not extend Person.class? Thanks.

    Read the article

  • Processing XML file with Huge data

    - by Manish Dhanotiya
    Hi,be m I am working on an application which has below requiements - 1. Download a ZIP file from a server. 2. Uncompress the ZIP file, get the content (which is in XML format) from this file into a String. 3. Pass this content into another method for parsing and further processing. Now, my concerns here is the XML file may be of Huge size say like '100MB', and my JVM has memory of only 512 MB, so how can I get this content into Chunks and pass for Parsing and then insert the data into PL/SQL tables. Since there can be multiple requests running at the same time and considering 512MB of memory what will be the best possible to process this. How I can get the data into Chunks and pass it as Stream for XML parsing. I googled on this, but didnt find any implementation. :( Thanks,

    Read the article

  • runtime/compile time polymorphism

    - by dmadhavaraj
    Hi , In the below code , why b1.subtract() fails . Please explain me the reason ie., what happens in JVM while invoking that method . class Base { public void add() { System.out.println("Base ADD"); } } class Child extends Base { public void add(){ System.out.println("Child ADD"); } public void subtract() { System.out.println("Child Subtract"); } } class MainClass { public static void main(String args[]) { Base b1 = new Base(); Base b2 = new Child(); Child b3 = new Child(); b1.add(); b1.subtract(); // ?????????** b2.add(); b3.subtract(); } }

    Read the article

  • Why is memory management so visible in Java?

    - by Emil
    I'm playing around with writing some simple Spring-based web apps and deploying them to Tomcat. Almost immediately, I run into the need to customize the Tomcat's JVM settings with -XX:MaxPermSize (and -Xmx and -Xms); without this, the server easily runs out of PermGen space. Why is this such an issue for Java compared to other garbage collected languages? Comparing counts of "tune X memory usage" for X in Java, Ruby, Perl and Python, shows that Java has easily an order of magnitude more hits in Google than the other languages combined.

    Read the article

  • How can I disable Java garbage collector ?

    - by Nelson
    Hi, we have a PHP webapp that calls a java binary to produce a pdf report (with jasperreport), the java binary outpus pdf to standart output and exits, the php then send the pdf to browser. This java command lasts about 3 to 6 seconds, I think when it lasts 6 second it's because the GC kicks in, so I would like to disable it because anyway when the command exits all memory is returned.. I would like to know how to disable it for Java 1.4.2 and for Java 1.6.0 because we are currently testing both JVM to see which performs faster.. Thanks

    Read the article

  • How to change code settings in eclipse

    - by Maven
    Sorry if the question title is confusing. Let me explain further. I am building a Java project with Eclipse. In my Java product I have conditionals that determine what code is included in the product and relies on static final constants for dead stripping. class BuildFlags { public static final boolean SOME_FLAG = true; // Need to set this programmatically } class SomeOtherClass { public void someMethod() { if (BuildFlags.SOME_FLAG) { // flag specific code } } } My question is how can I change BuildFlags.SOME_FLAG (above) so that I can run a special build without changing the source? Is there some way I can pass flags to the jvm (from eclipse) which I can then access to set this flag programatically?

    Read the article

  • How are ambigous methods resolved in java ?

    - by Jijoy
    Hi, I have a question. package org.study.algos; public class Study { public static void main(String[] args) { A a = new A(); a.m1(null); } } class A { public void m1(String s) { System.out.println("String"); System.out.println(s); } public void m1(Object obj) { System.out.println("Object"); System.out.println(obj); } } Here, the output is String null Why does the JVM resolve the method to one with a String argument? Thanks in advance J

    Read the article

  • Apache Axis web service clients vs plain SOAP requests.

    - by Andy Pryor
    I'm looking for the best way to consume a Java web service that returns rather large and complex objects. I am currently using Apache Axis clients generated from the wsdl, (using eclipse "generate web service client" tool). We have concerns about performance of this. The service proxy objects are not thread safe, and they are rather heavy to instantiate, 2-3 MB on the JVM. The other alternative is making HTTP connections and building a String SOAP requests. I would have to interpret the response, and build objects from the XML. Would this be a better alternative to the heavy axis objects? I searched for good reading on this, if any one had any links I would greatly appreciate it.

    Read the article

  • How to trigger code on two different servers in a WAS cluster?

    - by Dean J
    I have an administrative page in a web application that resets the cache, but it only resets the cache on the current JVM. The web application is deployed as a cluster to two WAS servers. Any way that I can elegantly have the "clear cache" button on each server trigger the method on both JVMs? Edit: The original developer just wrote a singleton holding a HashMap to be the cache in question. Lightweight and (previously) worked just fine for the requirements. It caches content pulled from six or seven web services for specified amounts of time. Edit: The entire application in question is three pages, so the elegant solution might well be the lightest solution.

    Read the article

  • Application Servers(java) : Should adding RAM to server depend on each domain's -Xmx value?

    - by ring bearer
    We have Glassfish application server running in Linux servers. Each Glassfish installation hosts 3 domains. Each domain has a JVM configuration such as -Xms 1GB and -XmX 2GB. That means if all these three domains are running at max memory, server should be able to allocate total 6GB to the JVMs With that math,each of our server has 8GB RAM (2 GB Buffer) First of all - is this a good approach? I did not think so, because when we analyzed memory utilization on this server over past few months, it was only up to 1GB; Now there are requests to add an additional domain to these servers - does that mean to add additional 2 GB RAM just to be safe or based on trend, continue with whatever memory the server has?

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >