Search Results

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

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

  • FOP Encoding issue

    - by Ravi chandra
    Hi Guys, I have a similar issue.. I have HTML stored in DB clob. I am retrieving that and converting to XHTML using TIDY.jar. Once i got XHTML then using FOP i am converting to XSL-FO. Finally XSL-FO is rendering in PDF. Previously everything is working fine with Linux-WAS5-java1.4. Recently we migrated the apps to Linux-WAS6-Java1.5. Now XHTML to XSL-FO is messing up everything. XSL-FO contains ???(Question marks) in the place of Euro, spase(nbsp), Agrave, egrave ..etc. I tried changing the JVM encoding to UTF-8 and also i have modified my servlet request and response to support UTF-8. I am helfless and unable to figure where exactly the issue is coming out. Can someone please check this and suggest me some solution. Thanks in advance

    Read the article

  • Java singleton VO class implementing serializable, having default values using getter methods

    - by user309281
    Hi All I have a J2SE application having user threads running in a separate JVM outside JBOSS server. During startup, J2SE invokes a EJB inside jboss, by passing a new object(singleton) of simple JAVA VO class having getter/setter methods. {The VO class is a singleton and implements serialiable(as mandated by EJB)}. EJB receives the object, reads all db configuration and uses the setter methods of new object to set all the values. It then returns back this updated object back to J2SE in the same remote call. After J2SE receives the object(singleton/serializable), if i invoke getter methods, I could see only default values set during object creation before EJB call, and not the values set by the EJB. Kindly throw some light on, why the received object from EJB does not see any updated values and how to rectify this. I believe it got to do with object initialization during deserialization. And i tried overriding readResolve() in the VO class, but of no help. With Regards, Krishna

    Read the article

  • In Java, is there a way to obtain the command line parameters even if main() didn't save them?

    - by Uri
    We have a program with a main() that parses certain CLPs but does not save them anywhere. I then have my own plug-in code that needs access to the original CLPs (so I can transmit more parameters) for it. However, I cannot change main() I saw that there is apparently a way to do this in C#, I'm looking for an equivalent Java solution on Linux. UPDATE: Obviously, I'm aware of how main() works. Unfortunately, I cannot change the existing application or the way it is invoked (except for CLPs). I can only access via a sandboxed plugin code. My question is whether there is a way to get the command line (rather then the environment variables with -D) that the JVM was invoked with.

    Read the article

  • search paths where one native library depends on another

    - by carneades
    I'm using JNA and Java but I think this question affects any native-to-nonnative bridge. I have a Java application which relies on lib1.dylib, and lib1.dylib relies on lib2.dylib. I want to put everything inside of my .app file on Mac. I can easily put lib1.dylib inside and set java.classpath (or NativeLibrary.addSearchPath()) to tell the JVM where to find lib1.dylib. The trouble is, I don't know how to communicate that lib1.dylib's dependencies are also in the location I provided. The result is that lib1 is loaded fine, but then lib2 can't be found since it's not in the operating system's library path. Anyone know how I can overcome this problem? I imagine it must come up plenty in big projects with large numbers of shared libraries.

    Read the article

  • Wicket app in embedded Jetty causes UnsupportedClassVersionError

    - by Ondra Žižka
    I've tried to run a Wicket app in an embedded Jetty, using this code: public static void main( String[] args ){ Server server = new Server(8080); Context root = new Context( server, "/", Context.SESSIONS ); FilterHolder filterHolder = new FilterHolder( new WicketFilter() ); filterHolder.getInitParameters().put("applicationClassName", cz.dw.test.WicketApplication.class.getName() ); root.addFilter( filterHolder, "/*" , Handler.ALL ); try { server.start(); } catch (Exception ex) { ex.printStackTrace(); } } But I got java.lang.UnsupportedClassVersionError: Bad version number in .class file. Switching the target class version for my app (1.6 - 1.5) did not help. I use Sun JDK 1.6.0_17, Wicket 1.4.8, Jetty 6.1.24. I tried to debug, but the JRE classes have no debug data. The stacktrace is of no use as it happens when loading the classes into JVM. Any ideas what could be wrong? How can I find which class is causing this? Thanks, Ondra

    Read the article

  • Why do Java/C# edge out C++ as the recommended language to learn OOP on S.O?

    - by viksit
    I noticed after reading the answers/discussion to this question (What is the best language to learn OOP on?) - that more and more people are recommending C# or Java over C++ to learn OOP on. A simple term search on that answer page results in 10 hits for C++, 21 for C# and 27 for Java. Now, I understand that these 2 languages fix a lot of quirks and issues with C++, and looked up these resources that relate mostly to performance, JVM vs native implementation, systems focus vs applications, manual memory management vs automated et al. My question is - are there any fundamental differences in the OO capabilities of Java/C# vs C++? Or are the former recommended purely due to their generic ease of use/improvements over the latter? Thanks. PS, I'm aware of Java interface inheritance vs C++ multiple inheritance as a difference. I would consider that an implementational one rather than functional.

    Read the article

  • Debugging stack data not assigned to a named variable

    - by gibbss
    Is there a way to view stack elements like un-assigned return values or exceptions that not assigned to a local variable? (e.g. throw new ...) For example, suppose I have code along the lines of: public String foo(InputStream in) throws IOException { NastyObj obj = null; try { obj = new NastyObj(in); return (obj.read()); } finally { if (obj != null) obj.close(); } } Is there any way to view the return or exception value without stepping to a higher level frame where it is assigned? This is particularly relevant with exceptions because you often have to step back up through a number of frames to find an actual handler. I usually use the Eclipse debugging environment, but any answer is appreciated. Also, if this cannot be done, can you explain why? (JVM, JPDA limitation?)

    Read the article

  • Set Java Application's virtual machine max memory without access to VM parameters because of custom

    - by Tom
    I'm using a Java application which allows you to import custom files. On import, these files are loaded into memory. The problem is that the files I want to import are very big, this causes an OutOfMemory exception. The crash log also informs me that the VM was started with the java parameter "-Xmx512m", I want to alter this to "-Xmx1024m" so that I got double the memory available. The problem is that this application is using it's own JRE folder and that there's a launcher written in C which is calling the jvm.dll file. In any way, java.exe or javaw.exe are never called and thus I cannot set these parameters myself (if I delete these executables it doesn't matter, can still run the application - this is not the case with the dll). So, my question is, can I set this VM parameter in an other way? I'm even willing to alter the JRE files if there is no other way.

    Read the article

  • ANTLR - Embedding Java code, evaluate before or after?

    - by wvd
    Hello all, I'm writing a simple scripting language on top of Java/JVM, where you can also embed Java code using the {} brackets. The problem is, how do I parse this in the grammar? I have two options: 1] Allow everything to be in it, such as: [a-z|a-Z|0-9|_|$], and go on 2] Get an extra java grammar and use that grammar to parse that small code (is it actually possible and efficient?) Since option 2] is basically a double-check since when evaluating java code it's also being checked. Now my last question is -- is way that can dynamically execute java code also with objects which have been created at runtime? Thanks, William van Doorn

    Read the article

  • Using javax.script or Rhino to run javascript in Java with browser context (e.g. envjs)?

    - by Shane
    I am trying to run Protovis javascript from a Java program using javax.script: ScriptEngineManager factory = new ScriptEngineManager(); ScriptEngine engine = factory.getEngineByName("JavaScript"); engine.eval(new java.io.FileReader("protovis-d3.1.js")); In order to run this, the JavaScript engine needs to have all the context of a web browser. The best option for this seems to be envjs. Unfortunately it seems that the version of Rhino included in the JVM isn't up to date and doesn't include everything that's necessary for envjs. Has anyone had any success working with a browser context from javax.script, or am I missing something? This is related to this question: "Can I create a ‘window’ object for javascript running in the Java6 Rhino Script Engine".

    Read the article

  • Java - Could not find the main class?

    - by asmo
    I'm having a hard-time with a Java error. I'm getting this when double-clicking on my compiled project Jar file in order to run it: Could not find the main class: testPackage.testFrame. Program will exit. However, my main class is cleary defined in the project properties. Furthermore, everything works fine when I run the project directly from NetBeans. I'm using the ip2c.jar third-party library to determine countries from IP addresses. If I comment the class that is using the ip2c.jar file, I don't get the error. How can a third-party library be preventing the JVM from finding my main class?

    Read the article

  • For what purpose does java have a float primitive type?

    - by Roman
    I heard plenty times different claims about float type in java. The most popular issues typicaly regard to converting float value to double and vice versa. I read (rather long time ago and not sure that it's actual now with new JVM) that float gives much worse performance then double. And it's also not recommended to use float in scientific applications which should have certain accuracy. I also remember that when I worked with AWT and Swing I had some problems with using float or double (like using Point2D.Float or Point2D.Double). So, I see only 2 advantages of float over double: it needs only 4 bytes while double needs 8 bytes JMM garantees that assignment operation is atomic with float variables while it's not atomic with double's. Are there any other cases where float is better then double? Do you use float's in your applications? It seems to me that the only valuable reason java has float is backward compatibility.

    Read the article

  • Why does Java force user-agent through simple Socket IO?

    - by Zombies
    I am using nothing but raw Socket IO. There isn't one HttpURLConnection nor any http client libs in my project. When I run it through wireshark I see somethign very revealing: GET / HTTP/1.1 User-Agent: Java/1.6.0_15 Host: www.google.com Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 Connection: keep-alive Here is the crazy part, I never put ANY of that in my original request. My original request was: "GET http://www.google.com/ HTTP/1.1\r\n" + "Host: www.google.com\r\n" + "User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8\r\n" + "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n" + "Accept-Language: en-us,en;q=0.5\r\n" + "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n" + "Keep-Alive: 300\r\n" + "\r\n"; I am using the default Sun JVM.

    Read the article

  • How can I use my multiple cored dedicated server to run my java application?

    - by Delta
    I have a game built in a java environment and I use JVM. I have 4 cores @ 2.4Ghz and my server is only using one of those cores... I've tried and searched and I still have no guides to setup multiple cores to run the game like, say 1 core for running the character saving + loading, and 1 core for the server itself, and 1 core for a helper to help other cores that need more power. I don't even know if this is possible but this is all in java the operating machine is windows server 2003 and I've tried so hard I just don't know what to do. May someone please help me! Thank you so much!

    Read the article

  • Java - Array's length property

    - by The New Idiot
    We can determine the length of an ArrayList<E> using its public method size() , like ArrayList<Integer> arr = new ArrayList(10); int size = arr.size(); Similarly we can determine the length of an Array object using the length property String[] str = new String[10]; int size = str.length; Whereas the size() method of ArrayList is defined inside the ArrayList class , where is this length property of Array defined ? Is it implemented by JVM or does it reside in any Java API class file ?

    Read the article

  • How do I enable automatic reloading of view files in development mode in JRuby on Rails?

    - by thekingoftruth
    I am developing an app in JRuby on Rails. For some reason, when I edit the view files, the development JRuby Mongrel server doesn't reload them. The perplexing thing is that after editing the controller files, the server reloads them just fine on the next request. This would be annoying even when using MRI Ruby, however starting up JRuby Mongrel after every view edit is much slower, and much more annoying. (Note that once it starts up it's quite fast, the only issue is startup--the JVM has to load up every time I start JRuby Mongrel.) I'm running JRuby 1.5.0, Rails 2.3.5, and Java 6.

    Read the article

  • how much concurrent http request can erlang handle

    - by user209123
    I am developing a application for benchmarking purposes, for which I require to create large number of http connection in a short time, I created a program in java to test how much threads is java able to create, it turns out in my 2GB single core machine, the limit is variable between 5000 and 6000 with 1 GB of memory given to JVM after which it hits outofmemoryerror with heap limit reached. It is suggested around that erlang will be able to generate much more concurrent processes, I am willing to learn erlang if it is capable of solving the problem , although I am interested in knowing can erlang be able to say generate somewhere around 100000 processes which are essentially http requests waiting for responses, in a matter of few seconds without reaching any limit like memory error etc.,

    Read the article

  • Do I need to enable DRS to use Dynacache in Websphere Application Server Cluster

    - by rabs
    We are running a websphere commerce application with several websphere application servers configured in a cluster. We are using dynacache, so each server in the cluster will have its own cached objects in its own JVM. We are using CACHEIVL with database triggers for all cache invalidations. I was reading http://www.ibm.com/developerworks/websphere/library/techarticles/0603_crick/0603_crick.html and found an interesting sentence: "Furthermore, cache replication is necessary to ensure that invalidation messages are shared between the servers in a cluster." After thinking about this it would make sense that for the invalidation to work it would need to be triggered on all the servers in the cluster, but I couldn't find confirmation of this in the mountains of IBM doco. Does anyone know if you can use trigger based cache invalidation (through CACHEIVL) when you have several application servers clustered each with their own cache without DRS turned on? or do I need to use DRS for this to work?

    Read the article

  • Hibernate: how to maintain insertion order

    - by jwaddell
    I have a list of entities where creation order is important, but they do not contain a timestamp to use for sorting. Entities are added to the end of the list as they are created so they will be ordered correctly in the list itself. After persisting the list using Hibernate the entities appear in the database table in the order that they were created. However when retrieving the list using a new Hibernate session the list is now in reverse order of insertion/creation. Is this expected behaviour? Is there any way to retrieve the list in the same order as it appears in the table? The primary key is a UUID, and the list of entities should always have been created on the same IP address and JVM. This mean sorting by UUID is a possibility but I'd rather not make assumptions. Another possibility is if the list is guaranteed to always come out in reverse order I could always just work through it backwards.

    Read the article

  • Primary reasons why programming language runtimes use stacks?

    - by manuel aldana
    Many programming language runtime environments use stacks as their primary storage structure (e.g. see JVM bytecode to runtime example). Quickly recalling I see following advantages: Simple structure (pop/push), trivial to implement Most processors are anyway optimized for stack operations, so it is very fast Less problems with memory fragmentation, it is always about moving memory-pointer up and down for allocation and freeing complete blocks of memory by resetting the pointer to the last entry offset. Is the list complete or did I miss something? Are there programming language runtime environments which are not using stacks for storage at all?

    Read the article

  • Java: How to test methods that call System.exit()?

    - by Chris Conway
    I've got a few methods that should call System.exit() on certain inputs. Unfortunately, testing these cases causes JUnit to terminate! Putting the method calls in a new Thread doesn't seem to help, since System.exit() terminates the JVM, not just the current thread. Are there any common patterns for dealing with this? For example, can I subsitute a stub for System.exit()? [EDIT] The class in question is actually a command-line tool which I'm attempting to test inside JUnit. Maybe JUnit is simply not the right tool for the job? Suggestions for complementary regression testing tools are welcome (preferably something that integrates well with JUnit and EclEmma).

    Read the article

  • Why is run() not immediately called when start() called on a thread object in java

    - by pi
    Or is it? I have a thread object from: Thread myThread = new Thread(pObject); Where pObject is an object of a class implementing the Runnable interface and then I have the start method called on the thread object like so: myThread.start(); Now, my understanding is that when start() is called, the JVM implicitly (and immediately) calls the run() method which may be overridden (as it is in my case) However, in my case, it appears that the start() method is not called immediately (as desired) but until the other statements/methods are completed from the calling block i.e. if I had a method after the start() call like so: myThread.start(); doSomethingElse(); doSomthingElse() gets executed before the run() method is run at all. Perhaps I am wrong with the initial premise that run() is always called right after the start() is called. Please help! The desired again is making executing run() right after start(). Thanks.

    Read the article

  • Is it possible to find out what FlashBuilder is doing during compilation?

    - by justkevin
    I've found that Flash Builder 4 (formerly Flex Builder) has trouble working with large projects. After a certain point, builds seem to take longer and longer. I've tried many different ways of improving build time including: Moving embedded resources into externally linked projects. Using -incremental. Tweaking the .ini jvm settings including memory and -server. Turning off automatic build (I'd prefer not to have to do this, because one of the main reasons for using an IDE is to be told about errors as you make them). Deleting the project and re-checking out from the repository. While some of these may help a bit, the performance is still annoyingly slow. I feel if I knew what was taking so long I could refactor my projects to build faster. Is there some setting that tells FlashBuilder to let me see what parts of the build process take so much time?

    Read the article

  • Java application failing on special characters.

    - by Scottm
    An application I am working on reads information from files to populate a database. Some of the characters in the files are non-English, for example accented French characters. The application is working fine in Windows but on our Solaris machine it is failing to recognise the special characters and is throwing an exception. For example when it encounters the accented e in "Gérer" it says :- Encountered: "\u0161" (353), after : "\'G\u00c3\u00a9rer les mod\u00c3" (an exception which is thrown from our application) I suspect that in order to stop this from happening I need to change the file.encoding property of the JVM. I tried to do this via System.setProperty() but it has not stopped the error from occurring. Are there any suggestions for what I could do? I was thinking about setting the basic locale of the solaris platform in /etc/default/init to be UTF-8. Does anyone think this might help? Any thoughts are much appreciated.

    Read the article

  • Generics Type issue

    - by JohnJohnGa
    ArrayList<Integer> arrI = new ArrayList<Integer>(); ArrayList arrO = arrI; // Warning /* It is ok to add a String as it is an ArrayList of Objects but the JVM will know the real type, arrO is an arrayList of Integer... */ arrO.add("Hello"); /* How I can get a String in an ArrayList<Integer> ?? Even if the compiler told me that I will get an Integer! */ System.out.println(arrI.get(0)); Anybody can explain what's happening here?

    Read the article

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