i am trying to write infixToPostfix, this is the algorithm, but there are some problems is anyone can check it for me..thanks public String infixToPostfix(String exp){ Stack shunt = new Stack(a); String pofix = ""; for ( int i=0;i<exp.length();i++){ switch (exp.charAt(i)){ case '(': ...
I get an unhandled native exception when trying to create a JFrame from C via JNI.The error message is unhelpful and untraceable even on Google.Here is the Java line it claims to bomb on:JFrame frame = new JFrame("test frame");Here is the result:JavaAWT: NSException not handled by native ...
Hi.I have created a dll using jni with c. I want to call a certain function, say int func1(char *s[], int * iptr, long * lptr). In my main, I am passing arguments to int func1() as....char c1;int i1;long lp1;result = func1(&c1, &i1, &lp1);printf("c1 = %s\n", c1);printf("i1 = %i\n", ...
14629 byte By
umainaa at 2007-10-2 14:50:12
Hi,I am using JNI to access a API in the dll(which is C program). Below is the java code that I use.-MY JAVA CODE --package com.mot.api123;import java.io.*;import java.util.*;import java.text.*;/** * A class that handles the details of a virtual connection. * Holds the state of the connection. ...
Hello together,I have the following problem. I have to decryp a password in JAVA using a C++ method. I have a dll and the headerfile. It is impossible to change anything at the C++ source. The method is:long encrypt(unsigned char * puchClearText,unsigned char * puchKey,unsigned char * ...
422 byte By
pengjia at 2007-10-2 14:51:18
Hi, everybody.My problem is when the program call the exit or halt method then the JVM how to release system resource(Ex:socket,file handle,native memory)?EX:I write one class that is JDBC Connection pool,it holds lots of Connection(Maybe Oracle OCI or thin Connection),after the program start ...
299 byte By
sievma at 2007-10-2 14:53:03
I am trying to locate any information which tells me about the impact of setting either the -server or -client JVM arguments.I know that it seems to impact garbage collection and would like to understand the differences when using either of these
java code:public native int f1(byte[] buffer);jni code:JNIEXPORT void JNICALL Java_UseObjects_f1 (JNIEnv *jenv, jobject jthisObj, jbyteArray jary){//here, how to new a byte array and we can use it at java code}
i have a class as this:public floatNumber{public int integer;public int fraction;}it uses default constructor, how can i get the jmethodID in JNI and new a object in it?thanks in ...
Hi,I have a J2EE app with many message beans performing long running tasks. If I use JRockit 1.5.0, all the CPUs on my Win Server 2003 x64 are consumed. But if I use the Hotspot JVM, only 50% of the CPU's are consumed. Is there a way to get HotSpot to utilize all the available CPUs? It's a ...
I have created a dll file and i have stored an image file in it. I want to extract it i mean i want to use it in my program now what should i do to extract that image file from dll.
Hello there, I have a simple java class that uses an Oracle database and I'm having problem with numeric fields that contain decimals... I want to use a dot instead of a coma. But when I do, I obtain the following error:java.sql.SQLException: ORA-01722: Nombre non valideat ...
207 byte By
RickyLea at 2007-10-2 14:57:45
i am writting a program that can manage internet room.so i want to clock client screen .The set of CTRl+Alt +Del can not display task manager function . please show me how to do it.Thank you very much
i am trying to read java classfile and display it in my notepad ,but can not get the anticipative result . who can tell me why and give mea hand please...
407 byte By
bcakaa at 2007-10-2 14:58:58
Assume that you are operating a theatre. The ticket prices are 10 YTL fornormal tickets, 0.5 YTL for retired, and 0.1 YTL for students. For a givennight, your total revenue becomes 100 YTL when the total number of tickets sold is 100. Find the number of tickets sold as N (normal), S (student), ...
470 byte By
bcakaa at 2007-10-2 14:59:00
Can you help me please?My program should contain single"System.out.print("*");","System.out.print("+");","System.out.print(".\n");" statements. That means, I'm only allowed to use them once and not allowed to use any other print ...
1832 byte By
JOKea at 2007-10-2 14:59:11
Hello i am asking here because i don`t know where else to ask. So i want to ask whether i can manualy edit a Java class. For example i have this class: package simple;import java.io.BufferedReader;import java.io.InputStreamReader;import java.io.IOException;public class SimpleC{ public static ...
Hi,I want to access a Windows Application (using its COM component) from java.After searching through the net I found JaWin is suitable for my needs.By using the Stub generator(Type Browser) I can create java stub classes directly.But the problem is that I don't know while file is used as the ...
255 byte By
Ahza at 2007-10-2 15:00:00
We're using some pretty old JVMs at my company. I fear they are so old they are unsupported by Sun. To get modernized, I need to let someone know this.If someone could direct me to a resource where I could determine this I'd appreciate it.
4326 byte By
vuilleea at 2007-10-2 15:00:48
Sometimes after a full GC I get an OutOfMemoryError. What can cause such an error, knowing that there's plenty of memory after the full GC, and what can I do to fix it?My server is running jdk1.5.0_06 on Weblogic8.1 on Linux. The machine has physically 2GB of RAM.This error doesn't occur with ...
what is the usage of calling garbage collector explicitly in our application,I know that it will frees the memory,Even though we did'nt call the System.gc(); the Jvm will do this.So what is the purpose of calling System.gc() and when should we go for this.Thanks in ...
With large VMs, CMS greatly reduced GC pause times for our application, making them more scalable. I am experimenting with ways to improve the overall performance of GC.Is there any effect of using LargePages on the efficiency of CMS? The VM sizes that we are using are ~20GB. What about other ...
78 byte By
Desireea at 2007-10-2 15:04:56
Hello, does anybody know how to convert a date to a julian date?
Given a file path, How to identify is it is on local system or over the network using some native Java API's , if not please suggest another way?
Hi,I'm using a native method to read the master boot record (first 512 bytes) of a hard disk. Im trying to return a byte array to the calling java method but it doesnt seem to work for one reason of another, most likely my inexperience with the JNI. It keeps seg-faulting!here is my ...
In one of our automated test scenarios following a CMS-concurrent-reset, young GC times dramatically increased. For instance, prior to the CMS reset, average young GC times average 0.15 seconds; after the CMS reset, times would spike to as high as 40 seconds. With our high-load scenario this ...
I have seen this error message all over the place but no resolution. I am running Windows XP Pro. I am able to view sites with Javascript such as www.target.com and the dropdown menus work fine. However, when I am using my very very simple Javascript menus (from Project VII) The javascript ...
353 byte By
sunisia at 2007-10-2 15:08:21
can anybody explain how jar files get authenticated....if the html file is authenticated by the browser can we make the jvm to take the same password username and all from the browser it self so that we can avoid JVM popinng up a window for jar files if the password is already given by a ...
1308 byte By
Sanaza at 2007-10-2 15:08:24
Hello,All I want to do in java is to read the data saved in a buffer( a lot of numbers and characters seperated by semicolons) and organize it into columns of data saved in an outfile!!!! To this end each number or character seperated by a " ; " from the other has a special meaning and I need ...
1065 byte By
who_geta at 2007-10-2 15:09:49
Hi All,I have a problem when i run SQL database application via odbc. And i have got the message like the following message, any suggestion to fix this problem...thanks before :) # Java VM: Java HotSpot(TM) Client VM (1.4.2_01-b06 mixed mode)## Error ID: 43113F32554E54494D45110E4350500308## ...
How many JVM's can run in a system
Hi All,Any body, Is it possible to work with 2 jvms on the same machine? If yes, Working with Windows, how can we work with 2 java versions installed on same processor?THANKSNagesh
Hello,I am having a problem on my Tomcat server , I am receiving an OutOfMemory exception.I tried to increase the memory by setting the paramaters -Xmx and -Xms to 258m from the command line (I am using JBuilderX and Tomcat 4.1) and it is working, but know I must sets the parameters to my ...
5743 byte By
pbarvea at 2007-10-2 15:11:25
Hi,I have created a simple OCX with to public functions. I see that when I created proxy for OCX, using IBM Bridge2Java, these functions are exposed in the form methods in corresponding classes.When I created instance of control and tried to call the methods, I get following error.An unexpected ...
655 byte By
EDemcha at 2007-10-2 15:11:41
Hi all, I've encountered a strange problem while trying to unzip a big file (~100MB):I have to work with it in memory so I load it into byte array - this never caused any troubles until I tried to unpack a file of such big size - more detailed investigation showed that just a line like ...
i am develop a JVM using Java thus i want to refer to some source code of JVMwhere and how can i get it?
hi allim abignner in java plzzz can you give me a source to be in the roadplzzz helpill take amajor next week so i want your help plzzzzthanks
If you suppose to have more then one java program running on your PC, Is there any way too check in the JVM how many and/or which java applications that抯 currently is running?Best Regards\Micke
380 byte By
mikeg1za at 2007-10-2 15:14:54
Hi,I have a piece of code in which C is calling Java and return a value. It works fine as long as the Java method is static.When it's not static, and I call env->GetMethodID(), verses env->GetStaticMethodID, it does not work and I get some opage exception.Are there any other differences ...
Hi,Is PermGen memory space a part of the heap? I read in the GC performance tuning docs [1] that:The different parts of the heap (permanent generation, tenured generation, and young generation) can grow to the limit of the virtual space as needed.but I notice in jconsole that the total memory ...
I am creating a C application, that uses a Java GUI.I need to listen to button events on the C side, without Java load.loadlibrary.The C app currently creates the JVM, and creates the GUI the way I want.How can I have the button listeners in Java, notify C functions?
356 byte By
Tommasoa at 2007-10-2 15:18:35
I have a simple question, that might have a complicated answer.How do you input a picute in java? Is there some pre-written function included in java that will automatically convert a picture of any common format into an 3 dimensional array that represents the RGB colors? If not, what "image ...
681 byte By
homer72a at 2007-10-2 15:18:52
I am a long time java developer but have never had this happen. I can compile my java files using javac no problem but when trying to run them all the sudden java requires I add -classpath . telling to to look in the current directory. When I don't specify the classpath it can't find the ...
Hi,if I only set the -Xmsn option and do not set -Xmxn option when I launch my Java application, how does java.exe behave? Does the heap will automatically grow like what Bea's JRockit does when my application requires more memory?I use JDK 5.0.Thanks for your help!
Hi Folks,To run my codebase I need to load 30/40 different jars, and providing these jars in the classpath does not work at times, probably due to the length of the classpath variable.I want to know whether there is a limitation to the length of the java.class.path variable, or do i need to ...
Wat is the command to create a shared library(.dylib) in MAC OS.Please reply soon. I want it immediatly for my project.
HiI want to write a 'C' PRogram which will recognize the newely connected USB port .Please Suggest me the header files required for the C Program. and Where they are.Then I have to Call the 'C' Function From a java Program.I want the Process for this entire scenario. Thanks ...
I introduce the testing program on linux. At first, it launches a control java instance.(java -Dgid=rbecontroller -server -classpath......), then it launches four rbe processes on different separate JVM, (/j2sdk1.4.2_07/jre/bin/java -Xmn256m -XX:PermSize=128m -XX:MaxPermSize=128m ...
Hello all,I'm into the 2nd hour of my JNI experiance & I've already got a simple C program called from Java. :-)My question...Can I only make call's to DLL's? or can I also call methods inside an C++ exe file?ThanksJeff
i don't really know if this is a problem with the native method but i think so. i've written a native socket implementation. the connect method calls the native method with an integer declared as a field in the class.public boolean connect(String addr,int port){try{host = ...