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 ...

jdk 1.4.2_14 download

167 byte By babaka at 2007-11-26 17:08:45
HiI have a problem with our jvm and according to bug # 2141971it is fixed in jdk1.4.2_14 but cant find it can anyone let me know where can I download it.

"Can't connect to VM"

622 byte By allelopatha at 2007-11-26 17:09:42
Just installed Eclipse 3.2.1. I imported a project and built it with no problems.However, When I attempt to run it, I get this error in a dlg box:Can't connect to VMI am not trying to connect to a VM remotely. I don't think I have a firewall running. No message in the console#java -version ...

Truncated jstring under JRE 1.6 with NewStringUTF

680 byte By swara at 2007-11-26 17:19:01
Hi,I have a JNI app that runs perfectly up to JRE 1.5_07, but crashes on JRE 1.6. After some debugging, I found out the reason for the crash was that the Java UI was received truncated strings from the C++ DLL.Again, when I run the app with JRE 1.5_07 or earlier, the strings are passed in full. ...

Problem in loading Native libraries

587 byte By Amit.Pola at 2007-11-26 17:20:05
While trying to load native libraries I'm getting the following error messagejava.lang.UnsatisfiedLinkError: /XXX/XXX/libMySharedObj.so: ld.so.1: <JAVA_HOME>/bin/sparcv9/java: fatal: libskgxp10.so: open failed: No such file or directoryAt which place the 'libskgxp10.so' file should ...

Regarding the out of meory exception during MDB

2717 byte By AshishGajabia at 2007-11-26 17:22:54
Hi,during the MDB run in the application, we are getting the out of memory exception. when we enabled our GC logs. i have found that during the Full GC only i m getting the out of memory exception.Weblogic 8 sp5JDK 1.4.2_12heap size parameters are like this,-Xms=1024-Xmx=1024-XX:MaxPermSize=384 ...

Making JNIEnv a global reference

747 byte By GirishK_12a at 2007-11-26 17:26:12
Hi All,I have a class A in which I have a method m1() and a static method m2(). From m1() I invoke a native method nm1() passing refernce to the JNIEnv and other parameters. When there is a call to nm1(), the control goes to nm2 another native method. From nm2, I need to make a call back method ...

RegisterNatives: NoSuchMethodFound

3285 byte By Jivlaina at 2007-11-26 17:26:19
I'm just starting to learn JNI at the moment. I had this working fine just using javah to create a header file, but I'm trying to get away from that and use the RegisterNatives method from the JNI_OnLoad method.However, I've been banging away at errors for a while, but now I'm stuck. Any ...

Types of JVM

38 byte By SApbama at 2007-11-26 17:26:26
What are different types of JVM

Connecting Java to C++

214 byte By BrigitAnanyaa at 2007-11-26 17:34:50
Please read my question in the Java Programming Forum about not being able to create the JVM again after destroying it: http://forum.java.sun.com/thread.jspa?threadID=5133663&tstart=0Thanks!

Please help

974 byte By Java_Suna at 2007-11-26 17:38:24
Hi Guys,I am working in a maintanance project. One of our application is showing out of memory error in every 3-5 days and crashes. It is running on tomcat which is set as a service. The current settings for for maximum heap is -Xmx512m, minimum is -Xms256m which sets at ...

too many connections

1515 byte By johnvaja at 2007-11-26 17:39:38
We have an application written some years ago. The hosters, moving to a 2003 server found that the app times out while it's building a lookup table.According to them its the following bit of code that's responsible.Recordset donorIDs = null;try { donorIDs = objConn.execute("SELECT DonorID ...

Jvm 1.4,1.5 default memory usage in Ram in different operating systems

506 byte By sumanattetia at 2007-11-26 17:40:08
Hi ,Can anyone help me with the default memory occupied by Jvm in different operating systems ? I have practically seen that jdk1.4,jdk1.5,jdk1.3 has around 64 Mb as thedefault size on 32 bit machines .I am in need of the similar data for jvms on Solaris,Unix and Linux machines . Also much ...

Xmx Memory allocation

363 byte By _mruettia at 2007-11-26 17:44:14
Hi,I'm wondering how the xmx memory is allocated on Windows systems. Does anyone know?I have the problem that using the JNI interface I can access a driver dll only when the xmx value is below ~200M, otherwise the driver produces an error. Now I will make a C++ application to test if I can ...

getting java.lang.outOfMemory Java Heap Space when loading Applets

250 byte By qrious_about_javaa at 2007-11-26 17:44:47
We moved our environment to linux(Weblogic) from solaris, from then onwards we were not able to get the applet loaded,JRE version 1.5.0._07, Can anyone give a solution to avoid this problemMessage was edited by: qrious_about_java

[Full GC] halts my application for 25 seconds

1579 byte By driving_me_nutsa at 2007-11-26 17:53:16
Hello, I need to avoid this happening. I have tried using-XX:+UseParallelGC and-XX:+UseConcMarkSweepGC .....with slightly differing results but at some point within the first 5 minutes of the application running, a 25 second full GC takes place that virtually halts the application.I am using a ...

failed to unload classloader once loaded dll.

568 byte By mstanika at 2007-11-26 17:54:06
This is yet another 'unload dll' topic.I badly need unload a dll. As adviced by many threads, i created custom classloader - once it is gc-ed it should unload it's native libs.Classloader works fine and is gc-ed fine - as long i do not call a method from dll.Once a dll method is called, the ...

java heap issues

318 byte By hsv2007a at 2007-11-26 17:57:53
With jdk 1.4.2_12, and maximum heap set to 2048M, I see the following message when the used heap exceeds 1024M :Exception java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space?Any ideas as to what causes this ? Our solaris server has over 60GB of swap ...

Calling throwNew 2 times cause hotspot to crash

3790 byte By jim.marshalla at 2007-11-26 17:58:33
I've been running into a problem in my program where it would crash if wehappened to call throwNew 2 times in a row (from different invocations ofa native method). I have been able to reproduce this in a very simple test case.basically I have code which does the following in Java:for (int i = ...

Linker problem in Visual C++ 2005 Express Edition

921 byte By torch_2a at 2007-11-26 18:02:18
Hi all,I've a problem with building my native code in the free VC++ Express Edition. The build process ends up with the line:win32dirwatcher.obj : error LNK2001: Nicht aufgel鰏tes externes Symbol ""extern "C" long __stdcall JNI_GetCreatedJavaVMs(struct JavaVM_ * *,long,long *)" ...

Windows Vista "java.lang.ClassNotFoundException: loader.class" error.

3465 byte By UbiquitousUKa at 2007-11-26 18:03:07
Hello,Whenever I try to visit websites that have a java applet I get a dialogue with the following error:java.lang.ClassNotFoundException: loader.class.I have tried uninstalling/reinstalling java, and also adding the -xmx and -xms parameters for java applet runtime setting in control panel with ...

Virtaul Machine Hangs

1605 byte By Tomer-Cohena at 2007-11-26 18:05:39
Hi,Our application is basically http proxy which is running in the jboss enviroment, from time to time, the java process cpu usage spikes to 99%, when this happen the application stops accepting any new connections, it is usually not possible to ask for a thread dump, and when it is possible it ...

Runtime.exec() : Memory management

490 byte By mdvoxa at 2007-11-26 18:10:15
Hello, I tried to search during hours, without success, to know how the memory is shared(or not) between a current Process and a process created with Runtime.exec().My real question is "Does the memory used in the subprocess is the same as the one used by the father process or does a new memory ...

Saving an image from a Canvas

1102 byte By neztola at 2007-11-26 18:12:30
Hello,I'm a beginner. I've created an application wich uses a native procedure, myFunc(), wich paints an image over a Canvas.But now I want to create an Image from each frame that is painted over this Canvas. The paint method is like this one:public void paint(Graphics g) {Rectangle r = ...

Unloading dll files

399 byte By avaj_rocksa at 2007-11-26 18:13:55
Hello people.I have a C++ dll file that is made of many different class. Am stuck at how to arrive at an instance of every class. In other words am not able to strip the dll file into classes that it is comprised of.Am using jniwrapper-3.5 and winpack-3.5. So am not really worried about writing ...

Help with an error

1690 byte By cardiomana at 2007-11-26 18:14:03
I am taking a intro to programming class and the teacher is not very helpful. I have asked him this same question, but it has been about 3 weeks and still no answer! So, maybe someone from here could help.The computers in our classroom have no problem with running the programs that I write. ...

JVM core dump - JNI code

4088 byte By tanzeem_omera at 2007-11-26 18:15:15
I am using JNI in my Java application , 12 hours after running my test case get a JVM crash -1) These are the parameters with which i invoke my Java programjava -d64 -Xcheck:jni -Xmx2560M -Xms2560M -Xss256k RunQueries2) The Heap output at the time of the core shows "from space" as 100% used , ...

Why does this code crash?

1470 byte By Crispsa at 2007-11-26 18:21:05
I have the following codeJavaVM*m_pJVM;/* denotes a Java VM */JNIEnv*m_pEnv;/* pointer to native method interface */JavaVMInitArgsm_VMArgs;JavaVMOptionm_VMOptions;m_VMOptions.optionString = "-Djava.class.path=.;D:\\Program Files\\Java\\jre1.5.0_06\\lib\\ext\\QTJava.zip;";m_VMArgs.version = ...

Help, ramki_at_jdc!!! Sudden jump in heap and 2 GC threads ate most cpu...

5673 byte By flyingducka at 2007-11-26 18:23:09
JDK 1.4.2_12HW: Sun V240 2X 1GHz cpu + 8GMemMEM_ARGS=" -Xms1500m -Xmx1500m -XX:PermSize=270m -XX:MaxPermSize=300m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC \-XX:+PrintCompilation \-XX:+CMSParallelRemarkEnabled -XX:ParallelGCThreads=2 -XX:NewSize=64M -XX:MaxNewSize=64M -XX:SurvivorRatio=4 ...

jpcap - IPPacket rsv_tos

643 byte By spirusa at 2007-11-26 18:24:20
Hello thereDoes anyone has any idea regarding the rsv_tos option for the jpcap.packet.IPPacket class of the jpcap lib.....Specifically I try to view the TOS field of a Packet (which, by the way, is marked) using the following sc.if(packetr instanceof IPPacket){jpcap.packet.IPPacket ...

memory leak

607 byte By sowmyama at 2007-11-26 18:26:36
i have a java program declaring class A..now in the jni, part i have another C++ program declaring object 'a' of class A. Is 'a" considered a C++ or java object?Also, in the C++ program i haveA *a =new A();a=b->somemethod();return a;now, somemethod also allocates memory for 'a'.A* ...

Java 1.5 JNI and C++ exception

923 byte By kostik78a at 2007-11-26 18:28:22
Hello, AllI've troubles with handling C++ exceptions using JNI and shared library. I'm using Java 1.5_06, RedHat 7.3 and JBoss 4.0.5From Java class I call JNI a method in my shared library(libx.so) which calls a method in other shared library(liby.so). Liby.so uses Xerces library. During ...

stop native call from java

3095 byte By CIIT_JAVA_Applicationa at 2007-11-26 18:28:25
I know there are topics related to timeout, stop or kill native call but it seems there is no good answer for me.I have a java class as the caller to call a native C function with double arrays as input. The C function perform some kind of computation using 3rd party FORTRAN functions. If we ...

Easy JNI Question

524 byte By ddanooa at 2007-11-26 18:28:26
Hi,I am new to using the JNI, and am in the process of implementing it for my C++ app... I can't find any information, however, on what to do with the jint, jfloat, etc. variables. For example, if I receive a jint with a value of 56, and I want to save that in a regular c++ int in my program - ...

final methods and invokespecial

213 byte By gosviga at 2007-11-26 18:29:06
Why does the JVM use/specify the invokevirtual bytecode for final methods, and not the invokespecial?Final methods should have the same behavior/semantics as private methods and <init> methods.

regarding java memory consumption

1254 byte By angeshwara at 2007-11-26 18:34:59
hello all,i am developing a multi threaded java application. the application will run as a service. the application sends/receives sms. the application stores the data in the momory as objects and there is a maintainance orhouse-keeping phase in the application which runs at every 6 ...

java.lang.UnsatisfiedLinkError

936 byte By m_ludwiga at 2007-11-26 18:35:42
Okay, I've read all about these errors and I know what they mean and what to do when the error message is something helpful, like "no <whatever> in library path" or some such.I'm trying to load the Odejava native library for Mac on a computer that is part of a lab, and thus uses remote ...