calling java program from makefile with Xmx2G argument

842 byte By miroslav_simkoa at 2007-11-26 15:18:21
Hello,a have makefile with one target, which runs java program. all:java -Xmx2G -cp ./numerika_java/classes/ numeric.fem.vector.ElementVectorStaticWhen I run the program with -Xmx2G 'manually' from command linejava -Xmx2G -cp ./numerika_java/classes/ ...

Build JDK from sources with precompiled headers under linux ?

425 byte By Passea at 2007-11-26 15:18:23
Hi everyone,I would like to build the latest JDK (1.6) from sources on linux, but I'm experiencing this bug : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6469784Apparently, I have to build hotspot with the precompiled headers. I googled a lot but didn't find anything about precompiled ...

Pls help me to make a JNI project

228 byte By julu01169a at 2007-11-26 15:19:58
Hello all,Please any one tell me How to make a project using JNI. If any one having any small project regarding JNI concept ,pls forward me.and PLs help me how to run the jni project.Thanx julu

JNI general rules

674 byte By frostywintersa at 2007-11-26 15:23:41
Hello there,I am using the JNI to access a library written in c. And i just have two small questions.If i give my JNI method arguments such as a jint do i have to explicitly delete this in the c code?Ok now if my method in c code creates a jintArray do i have to explicitly delete this ...

Variable scope efficiency

1324 byte By bmearns@coe.neu.edua at 2007-11-26 15:24:29
I realize similiar questions have been asked elsewhere in the forums, but all the answers I'm seeing are "I think..." and "I would assume..." and things of this nature. I'm looking for a concrete answer from someone with a solid understanding of how the JVM works. The question is this: If an ...

JNI and static links?

637 byte By Sakraga at 2007-11-26 15:25:47
I am attempting to create a jni library that contains a static link to another library. It compiles correctly and it works fine through any other language however when java attempts to load it I receive a Invalid access to memory location exception upon load. This happens with all jni libraries ...

NewObjectArray--java.lang.OutOfMemoryError: Java heap space

1602 byte By mebberta at 2007-11-26 15:26:12
Hi,I have been working on an application where I need to get data from a C++ object. Thus far I have had java call into the native code to extract it, but found that the design would be better to have C++ send the data to java when it deems appropriate. My problem is that now that I am having ...

Why JVM5 is slower in Linux than in Windows?

1291 byte By dislimita at 2007-11-26 15:26:53
Hi, all:It really surprised me that Java code runs much faster (at least for not so largeprogram) in Windows than in Linux.Recently I tested the speed of part of my learning package, whose task is toparse a 10MB (about 210,000 lines) text file to extrace some figures ,discretize them and put ...

NewDirectByteBuffer() & java.nio.ByteBuffer

882 byte By robyfFa at 2007-11-26 15:28:05
Hi All,I'm developing an application which uses the JNI interface to embed theJVM to a C application. So my problem is, I would like to "map" some C structin the Java VM and that isn't a problem currently since I use the NewDirectByteBuffer() JNI call to allocate a ByteBuffer for a given ...

Problem loading shared-library

3483 byte By JanOrtnera at 2007-11-26 15:29:24
Hi,I wrote a Java GUI using JNI to interface a C++-library. On my primary system -Gentoo 64-bit with an Athlon64 processor- everything works fine. Actually, it should run on a Solaris system. As the C++ library is supposed to run on a 64-bit system, I installed the Java 64-bit edition on the ...

(HelP)got an unsatisfiedlinkerror when using the jni

4139 byte By jasoncuia at 2007-11-26 15:34:06
I am now working on a jni project and get the unsatisfiedlinkerror. But after I browse this forum, I do not get any useful information. my java code://package graphmining.cliquer;public class WClique {/** * @param args */public static void main(String[] args) {// TODO Auto-generated method ...

Error in simple JNI project

356 byte By Isaaka at 2007-11-26 15:34:52
hi,I am new to JNI and I am trying a simple HelloWorld project but I am getting the following exception :Exception in thread "main" java.lang.UnsatisfiedLinkError: displayHelloWorldat HelloWorld.displayHelloWorld(Native Method)at HelloWorld.main(HelloWorld.java) where comes my error ...

java-code returns char-array to c++

669 byte By XMAS1000a at 2007-11-26 15:35:50
Hello,I have a problem with return a char[] from a java method to the native c++-code.The code looks like this://in java public static char[] draw( int j,int i){ char[] myc = new char[100]; ... return myc; }//in c++jmethodID mid;jchar jarr;mid = env->GetStaticMethodID(cls, "draw", ...

Call existing C application from JAVA

383 byte By KarthikRajua at 2007-11-26 15:36:52
Hi,I am having a C Shared Library. This dll is an existing C application thats already developed, tested and produced. I don't have access to the source code. I can't write appropriate JNI functions. I want to call those C functions from JAVA. How can I do it?As I am beginner in JNI, a step ...

Memory Leaks

635 byte By frostywintersa at 2007-11-26 15:37:31
Hey all just another quick question,If i do something like the following in my C code do i have to explicitly free it to stop memory leaks?Here is an example of my code://Create a jintArrayjintArray = sally;int sally_size = 3;sally = (*env) -> NewIntArray(env, sally_size);//Populate my ...

the memory problem

395 byte By jasoncuia at 2007-11-26 15:39:02
Hi All,I am running a jni program, where my program will call a .c file. I see the .c file sets an array "int bit[10000]" and initializes it. I wonder whether this array will be kept in the memory after I called the .so file. Because I will call the .so file thousands of times, if the memory ...

writing wrapper for dll

368 byte By zzsaraa at 2007-11-26 15:42:09
Hi,I try to write the wrapper class for dll using J2Native. I have some problems while writting wrapper for the below dll function.USB_STATUSWINAPIUSB_Initialize(short nWidth, short nHeight, HWND hWnd);1. USB_STATUS 2. WINAPI3. HWNDHow i write the code in java for the above 3 ...

Loading of jars ...during run time for enterprise app.

708 byte By deepinder_ma at 2007-11-26 15:42:30
I apologize for being a bit naive. I have been given the task to come up with a framework where Jar files containing classes have to be compiled and loaded on demand.The jar files will contain code written by third party company. I have to come up with a solution where I load these class into ...

JVM & JProfiler - Help needed urgent

667 byte By Aditya11a at 2007-11-26 15:44:21
Hi,I am a fresher and new to java. I am doing load testing. When i hook up a profler into JVM and run a test for 10 mins with 10 virtual users, i see deadlocks and 200 transactions will be completed in this period.When i take out profiler and run the same test for 10 mins with 10 virtual users ...

Exception

697 byte By Markus1982a at 2007-11-26 15:44:44
Hello togehter!When I run my program I just get the following exception:## An unexpected error has been detected by HotSpot Virtual Machine:## EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c901010, pid=2820, tid=3180## Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode)# ...

Call .dll from Java

893 byte By arvind.m@mgl.coma at 2007-11-26 15:46:53
Hi All,I have .dll file, which does encryption and decryption of a password.This dll was earlier used in .net to encrypt and decrypt the password.But now i am building the same application using J2ME, where i need to call this dll to encrypt and decrypt the password. Now i have already have an ...

Need Help for Intigrationg existing Cpp dlls with Java

204 byte By Srixa at 2007-11-26 15:49:58
Hi ,plz give me some suggetions for converting simple cpp program to dll and the code for wrapper class to integrate that with JAVA.Note: The application using the existing dlls only.

Cause of CodeBuffer memory exhaustion?

26596 byte By pgazdaa at 2007-11-26 15:52:31
We have had a JASIG uPortal application running under Tomcat with JVM 1.5.0_05-b05 for over a year without any JVM crashes. But now, twice within the last 2 weeks, the JVM has crashed because it has run out of CodeBuffer space. There is a bug report on this (6487381), but the bug evaluation ...

why objects are propgated to old instead of aging in from space

6146 byte By anujlal2a at 2007-11-26 15:53:20
I am seeing when eden is 100% and from space is 100% full before GC.After GC from space is only 10-15% full but and most of the objects is propagated to old space rather then allowing aging to happen in newspace.I have question about behavior which we seen today in on eour env.We are in ...

-XX:DefaultMaxRAMFraction=VALUE

2272 byte By sbflynn376@yahoo.coma at 2007-11-26 15:54:58
Sun's 1.5 JVM has some heap size configuration parameters that are not available in their 1.4 and earlier JVMs. For Sun's 1.5 JVM (not 1.4), there is the following documentation on sun's website: http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html#0.0.0.0.%20Heap%20Size%7CoutlineIf not ...

Classloader issue

700 byte By Alex_55_1a at 2007-11-26 15:57:07
Hi guys,I have small test program in Java. When I run it by Sun's Java launcher, it shows both instances created and are the same (sun.misc.Launcher$AppClassLoader), the code:System.out.println("this.getClass.getClassLoader = " + ...

Invocation: Returning a string

2248 byte By caffeinea at 2007-11-26 16:00:12
Suppose I have a function that:1. Takes an input string.2. Uses Java (via Invocation) to calculate a jstring.3. Converts the jstring to a a UTF string.4. Returns the UTF string.Like this (a JNIRef is a structure with references to classes and methods):char *f( JNIEnv *env, JNIRef *j, char ...

Reliability of protected void finalize() for freeing native dynamic memory

2364 byte By holzenspa at 2007-11-26 16:00:49
In different places, I've been reading different things about the specification of garbage collection in Java. From what I've found so far, it is pretty clear that if the garbage collector of the VM used decides to reclaim object X, then X.finalize() is called. However, opinions vary on ...

Defining inherited classes in JNI

316 byte By heavymachineguna at 2007-11-26 16:03:17
I have to use JNI in order to inherit a concrete class from an abstract one (java.util.TimerTask) and, then, instantiate it.I have to re-define the abstract method "run" of "TimerTask". In Java it's a trivial problem but I have to do it in C++!I hope I explained my problem. How do I work ...

JNI + Solaris : LD_LIBRARY_PATH / java.library.path initialisation

2527 byte By SMougenota at 2007-11-26 16:03:21
Hello.Some JNI tools have been built to run on both windows and Solaris.For the windows part, The PATH has been modified to add the DLL in order to be able to load the library into the JVM.After some hard time to get the DLL build process doing his job, finally every thing worked.But in ...

example of passing String Array from java to C using JNI

288 byte By dollyna at 2007-11-26 16:03:32
hi alli searched net for passing string array from java to C but i dont get anything relevent i have class stu{ int rollnostring nameString [] sub} i want to pass all as String array from java to C and access it C side

How to Create a JVM wtih Visual Basic

214 byte By caffeinea at 2007-11-26 16:08:31
I'd like to use Visual Basic to:1. Create a JVM.2. Create references to classes and methods.3. Call static and non-static methods.Is this possible? If so, how?Many thanks!

Reading The Title bar of any active window in windows Xp by java code

193 byte By v_m_007a at 2007-11-26 16:15:29
hi how can i Read The Title bar of any active window(like notepad ,mirosoft word ,internet explorer and so on......)who is runnningin windows Xpand close that window by java code

JVM errors

4672 byte By vk79a at 2007-11-26 16:16:06
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 do not get this error on Windows XP, even when I don't reduce the number of ...

Classpath length and performance - how long is too long?

217 byte By daffinma at 2007-11-26 16:22:48
Folks,Can anyone point me at some information about the releationship between classpath length and jvm performance? Does a long classpath matter? Is there a maximum length?Many thanks,Miles

+useConcMarkSweepGC vs. -useConcMarkWweepGC

234 byte By _dnoyeBa at 2007-11-26 16:26:16
I have seen two options in various places, but I have not been able to understand the difference between the two. Can someone help me here+useconcmarksweepgc-useconcmarksweepgcWhy is there a + and also a -?

by pure java code not with the help of any programming language

245 byte By v_m_007a at 2007-11-26 16:29:57
hi how can i Read The Title bar of any active window(like notepad ,mirosoft word ,internet explorer and so on......)who is runnning in windows Xp and close that window by pure java code not with the help of any programming language

JVM crashes occasionally with EXCEPTION_FLT_STACK_CHECK

11128 byte By d-s-t-ga at 2007-11-26 16:33:25
Occasionally my Java application crashes with EXCEPTION_FLT_STACK_CHECK at ~SafepointBlob always in the same method. This method is called hundreds of times without any problems. The problem is not reproducible. This is my logfile:# EXCEPTION_FLT_STACK_CHECK (0xc0000092) at pc=0x01210c58, ...

HELP: java.lang.UnsatisfiedLinkError: no ... in java.library.path

3031 byte By zhynxna at 2007-11-26 16:35:56
am the beginner of JNI. I write a test program to use C code in JAVA.[yxz155@lionxo JAVAaC]$ lsAClassWithNativeMethods.java theNativeMethod.c[yxz155@lionxo JAVAaC]$ javac AClassWithNativeMethods.java[yxz155@lionxo JAVAaC]$ javah -jni AClassWithNativeMethods[yxz155@lionxo JAVAaC]$ ...

java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space

501 byte By Alex_55_1a at 2007-11-26 16:41:04
Hi guys,I experience "java.lang.RuntimeException: java.lang.OutOfMemoryError: Java heap space" exception while my Java code is executed under my JNI code.I'm stuck on the problem, what I have found - "Tenured Gen" reises all the time and that's why I have OOME. However within native java ...

Memory Allocation 32bit client JVM

1019 byte By driving_me_nutsa at 2007-11-26 16:41:15
I am trying to understand space usage by the hotspot JVM (build 1.5.0_07-b03). I'm using windows XP and so I'm using the 32 bit JVM. An int takes up 32 bits and a long takes up 64 bits. However my test program below always gives the same memory usage even when I change the Test object to ...

JNI - Tablemodel

383 byte By fritzala at 2007-11-26 16:41:41
Hello!I made a Tablemodel in Java with native methods (getValueAt, ...)which are implemented in C/C++.My question is:How can I return a Integer, Double or Boolean object in the getValueAtmethod in C/C++, if the return type is a jobject?JNIEXPORT jobject JNICALL Java_JNITableModel_getValueAt ...

using C++ classes in Java

93 byte By citymodela at 2007-11-26 16:47:06
I need links, ebooks or other resources of using C++ in Java using JNI.regards!

compatibility check

374 byte By pcpitcher1a at 2007-11-26 16:53:15
I was wanting to know if sun offers a tool that you can download and run to check the compatibility of your system and it's components for an switch over to solaris 10. i am currenlty running windows xp and was wanting to make the switch, and wondered if there was a tool for that or if i ...

EXCEPTION_ACCESS_VIOLATION

9965 byte By Pralhada at 2007-11-26 16:54:55
Can any body help?I am having the same problem. I am usingWindows XP Build 2600 Service Pack 2. It gives me following error msg.I am using native mathod in my application. This happens only on XP , with windows 2000 it works fine. I checked this lot of times. Can any body help?Thanks in ...

native code to capture all keyboard and mouse event on the system

94 byte By Mkarattua at 2007-11-26 16:55:01
Can anybody provide native code to capture all keyboard and mouse event on the system ?

Dyanmic loading of methods with HotSpot

694 byte By RayOfThoughtsa at 2007-11-26 16:55:55
Hi,I was working on some application and used dynamically method loading using java.lan.reflect.Method package.But later on when i was going through this page (below is the link) http://java.sun.com/products/hotspot/docs/whitepaper/Java_Hotspot_v1.4.1/Java_HSpot_WP_v1.4.1_1002_4.htmlBottom of ...

Increasing Heap size....

337 byte By b.thirupathi.reddya at 2007-11-26 16:56:19
Hi all,Im getting OutofMemory error in one of my applications.please can any one tell me how to increase the size of JVM Heap size programatically.waiting for ur response...Thanx in Advance... ...

How to call C++ function like this...

173 byte By mawmawmawa at 2007-11-26 17:04:21
hi!everyone!i have a C++ function like this:java_call_c::test()how do i write codes in java in order to call the function ?thanksa lot !!!

error: parse error before '.' & number of arguments doesn't match

1559 byte By radonea at 2007-11-26 17:06:05
Compiling my simple source code reports error error: parse error before '.' . But in fact there is not any "." token on this line. At my guess it has something to do with JNI C macros but I really have no idea how to find that bug// ##net_java_dev_jssm_MulticastSSM.h: line 55JNIEXPORT void ...