jclass, jmethodID, and jfieldID scope

549 byte By bryanhilterbrand at 2007-9-26 11:14:16
I've researched a bunch of documentation, and I can't figure out how long these objects stick around. It'sobvious with jobject that you need to use env->NewGlobalRef() to keep it around, but if I useenv->GetObjectClass() on the global reference I've created then is it also global or ...

location of bytecode in memory

331 byte By valox at 2007-9-26 11:15:10
I don't know if this is the right place to ask my question (tell me if it's not)I'd like to know how I could figure out WHERE the bytecode of an executing java program is actually stored in memory...Hint: I'm running Linux Redhat 7.1 kernel 2.4.3-12 on an Intel x686 platform.ThanksVal ...

When does garbage collection occur?

47 byte By fsaidane at 2007-9-26 11:17:15
Answer the question!thanks

what is a UTF formatted file?

15 byte By fsaidane at 2007-9-26 11:17:18
?

Loading Third Party Packages

333 byte By asiriw at 2007-9-26 11:17:19
Hi ALLI have some JAVA methods which internally requires some XML and XQL helper packages(Third Party). The methods work fine if I run using JBuilder... but I get an error when I call FindClass() from C++ code. The FindClass() function won't locate the class I invoke!!!Pls Help...Thank You ...

Relocation Error In Solaris - Symbol 0FI__rtbi_fv not found

1027 byte By sriramj76 at 2007-9-26 11:17:56
Hi!,I get the following error, when i try to load a library using JNI, (jdk 1.3.0_02) in Solaris 2.6 :It cribs about symbol __0FI__rtbi_fv not found.I used nm on the .so and got the following output -[123762]| 0|0|NOTY |GLOB |0|UNDEF |__0FI__rtbi_fvKindly help me in overcoming this problem. Its ...

JVM and loading of classes

430 byte By emilesAC at 2007-9-26 11:20:23
I have a question regarding classes and exactly how to approach something. Am I wrong in assuming once the JVM is started that all classes in the classpath are loaded? For instance, I have a jar file or class that is outdated, I'd like to download a newer version before "running" that class. ...

VB,Java,Fortran or C?

3459 byte By gregbeekman at 2007-9-26 11:20:47
HiI did a very simple loop in all these languages in order to test which was fastest. The i-loop contained:i=1 to 500,000,000(that's 5e8) x=x+i y=x/i z=i^30next iNot a particularly brilliant test, but I couldn't find any benchmarking programs on the web, and I only really know VB and Java. ...

Memory leak in JVM 1.3.1

800 byte By vedhan at 2007-9-26 11:21:29
Hi, I'm using the following set upOS: Redhat linux 7.1Kernel: 2.4.2-1glibc-2.1.x for i386other set up: ulimit -s 2048, JDK 1.3.1_01 app: Jboss app serverI'm running my application in Jboss 2.2.1 which is a I/O intensive. This is a distributed system using visigenic corba 4.5.The problem: If I ...

NewStringUTF not working with ISO8859-13 (latvian)

524 byte By rivera at 2007-9-26 11:21:36
We have this small test that takes a string which is on Latvian and it prints just fine on the C side. Once we pass this string to the Java side using NewStringUTF it just prints question characters instead (?). After researching this matter we have seen that some people are sugesting to use ...

FindClass Error!!! (very STRANGE)

477 byte By yijianwu at 2007-9-26 11:21:39
I wrote a C program to invoke a java application. The program worked perfectly before. But when I try to run the program today, the env->FindClass function somehow does not work correctly. It can find java/slang/String. But it can not find classes in my own package (like soap.jar). The real ...

display the name

257 byte By goub at 2007-9-26 11:23:14
hello everybody,i am undergoing a project on CHAT SERVER project. There the user authentication is being done by using a database but i am unable to display the USER NAME in the CHAT APPLET.can somebody help me out?

no getHeight() ( MS Java VM issue )

1107 byte By timesup at 2007-9-26 11:23:53
Hello.I know that this problem is not related to SUN Java VM, but there is no "support" page on the MS, so.. I'd like to ask you, folks.I wrote an applet. It uses simple getHeight() function of Applet class. Well, it's very basic function.But when I invoke the applet using <Applet > tag ...

Problem running app from exe by invocation

1029 byte By dewangs at 2007-9-26 11:24:35
Hi,I have a Java app that runs perfectly when I run it from the command line.I got C code from the developerWorks site that allows one to launch the app by an exe file. This exe uses Invocation to load the JVM, and supplies the class to run.The app starts, but then it reaches a certain point ...

how to get a specific object reference from VirtualMachine

462 byte By yinghui77 at 2007-9-26 11:24:42
Currently, I am working with making a automatic test application to test our business application This automatic test app should use JDI(java debug interface) to fulfil the purpose. My question is how to get a specific object reference from the virtulmachine where I launch the business app. The ...

JVM Launcher error - help

302 byte By beelu at 2007-9-26 11:29:17
I am using win98, and I have associated jar files with javaw.exe located in jdk1.3.1_01/bin. When I double clicked the .jar files in demo (comes with jdk), a message comes up saying "Could not find the main class. Programs will exit". What should I do to solve this problem. ...

More free memory?

1483 byte By cheung_sy1 at 2007-9-26 11:32:12
I have a simple test in which I allocate big long array and then I free that array and call JVM garabage collector. But I find out I have more free memory afterward (using the runtime.freeMemory() call) Did I do something wrong? Or could some one please tell me why?Thanks.Sam-The ...

Calling JNI from within a ejb

499 byte By Dkiran at 2007-9-26 11:38:27
Hi,I'm trying to call a native method from a EJBean class,using iPlanet App Server, after deployment, when i run, I'm getting the following error,"com.netscape.server.eb.UncheckedException: java.lang.Error thrown by impl nextgensecurity.NgtnSecurityBean@1ade762, err = ...

How to handle thread in JNI

1317 byte By anneff at 2007-9-26 11:39:19
Hi, I have a big problem in JNI and thread.I use JNI to send the data to C++ application (MFC DLL), the code att->setAtt(num) call the C++ Application. It use thread and socket.I can run this code in VC Console. But when I put it in JNI (as below), it crashed, the debug showed ? the thread ...

pls. help me on can not open libhpi.so error

244 byte By yindc at 2007-9-26 11:39:46
I use command of java on jdk1.2.2/jre/bin/i386/native_threads under Linux 6.2,. system always indicate error in loading shared libraries: libhpi.so: cannot open shared object file: No such file or directory.Pls. help

MissingResourceException

1399 byte By brettgoodman at 2007-9-26 11:42:29
I'm having a problem that apparently many others have had. I'm new to Java. I've created a Swing Applet and can't get it to run in a browser (IE). It works fine in AppletViewer, but the debug output below is printed in the output window. I've looked and looked for the answer through all of ...

Stack size

507 byte By toddobryan92103 at 2007-9-26 11:42:54
How do I set a larger stack size in the HotSpot client?I've programmed a really simple recursive program, but it only gets through about 5500 recursions. I'm working on an algorithms project, so I need to be able to call a procedure recursively tens of thousands of times without the Stack ...

Performance problem JVM for NT vs Sun

436 byte By gabrielnitulescu at 2007-9-26 11:43:23
I install Oracle Components for Java (OC4J) on Win NT for developers and on Sun Solaris for performance test and production.The NT server it is as very small PC with 320 MB RAM, PIII/500 and Sun machine it is entreprise config with 4 GB RAM and 4 procs but OC4J work better on NT with the same ...

Effects of changing the Stack Size?

266 byte By Marchioni at 2007-9-26 11:44:03
Hi all,I'm interested to know what could change if I set a different stack size, with -Xss option ?The Threads I'll create will be lighter in memory usage?(so I could create more)or what else ?ThanksFrancesco

How to use native methods

203 byte By cghcgh at 2007-9-26 11:46:18
suppose i wan to create a program that does tracking of internet connection. how do i do it? how to execute a program using java.? and how to check whether there is internet connecftion?...

How to handle multiple DLL?

360 byte By anneff at 2007-9-26 11:48:37
I am using JNI to talk between Java and C++.The JNI and test.dll work fine for testing. But in real world, my test.dll need call other 10 dlls. So I just need to use System.loadLibrary() load all of them or I need change something.My envrioment is VisualAge3.5 profession, Websphere and VC++6.0, ...

JVM on MIPS platform?

334 byte By cop4587 at 2007-9-26 11:49:43
Hi! all,Please get me out of the hot water: I am in bad need of a JVM which can run on the MIPS platform, except Kaffe--I have had it but not satisfied with it, or any info on this field! It's Urgent!I would be appriciate if any info mailed to:mabo@intec.iscas.ac.cn Thanx in advance. ...

calling a C-exe from java code

434 byte By bsms at 2007-9-26 11:51:04
I have an executable in C which would be located on a server while my java code resides on many clients. I have to call and execute the C code on the server. For this I need to send some input to the C code and receive output back (as strings) to java on the client. (I cannot use JNI since C ...

In JNI how to call Java methods from native language methods

1554 byte By yuanjava at 2007-9-26 11:51:49
I just build the example of java tutorial on http://java.sun.com/docs/books/tutorial/native1.1/implementing/method.htmlbut when I excute, it says:Callbacks.c:1:syntax error before 'void'Callbacks.c:2:parse error before '*'Callbacks.c:In function ...

about the upgrade...

74 byte By LeonardoVilela at 2007-9-26 11:52:00
the Jre 1.2 executes all classes writed with JDK 1.1?

Sun JDK 1.3.1 calling a Microsoft COM object?

2141 byte By DarrickWhite at 2007-9-26 11:53:02
My question, which inevitably in my eyes has been deemed impossible to answer, is as follows: How can one incorporate MS VM to connect to an MS COM object using Suns JDK 1.3.1? I ve tried the following: I ran the simple example of a COM object with a client interfacing with that COM object that ...

comunnication between java and other languages, like clipper?

226 byte By vibeman at 2007-9-26 11:53:42
can I easily communicate and send information from a java-applet to another program, written in clipper (dos)(and vice-versa)?Is it possible to do this with native programming?how?thanx,bart

how the indexof method is realy implemented

253 byte By suren685 at 2007-9-26 11:54:01
Can please sombody please help me Iam a student of nottingham university and would like know how the java method indexof(String ) wich searches for a given substring in a string is accually implemented.Well at least how the algorithm works

1.3.1 Classic VM

317 byte By boerkel at 2007-9-26 11:54:29
HI!I tried the -classic switch of the 1.3.1_01 JDK and it does not work. It finds the DLL, but I get this exception:Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/agent/AgentCould not create the Java virtual machine.Anyone any ideas?Thomas ...

How to call Java method in multi-threaded C++ application?

1025 byte By wangshuanhu at 2007-9-26 11:55:18
I have a Multi-threaded C++ application that needs to call Java methods in different threads. I first load JVM in one thread, then my code looks like this:jclass cls = m_env->FindClass(chartEngineClass);jmethodID mid = m_env->GetMethodID(cls, NOI18N("<init>"), NOI18N("()V"));jobject ...

About "descriptor"......

138 byte By s88 at 2007-9-26 11:58:17
I am confused in the numbers of descrptors used in the method's parameter....what's meaning of the restrict of 255 words?

HotSpot Virtual Machine Error !

1527 byte By jdaguet at 2007-9-26 12:02:22
Well I tried to instanciate a very simple Context :All parameter are OK.public boolean authenticate(String user, String password) {Hashtable env2 = new Hashtable();env2.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);env2.put(Context.PROVIDER_URL, ...

An HotSpot Virtual Machine Error !

1527 byte By jdaguet at 2007-9-26 12:02:24
Well I tried to instanciate a very simple Context :All parameter are OK.public boolean authenticate(String user, String password) {Hashtable env2 = new Hashtable();env2.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);env2.put(Context.PROVIDER_URL, ...

Are DLL methods called as instance or static methods from Java ?

537 byte By brcard at 2007-9-26 12:08:54
Hi,I have only a small question.When I call a C++ DLL method from Java using JNI, do I instantiate it like an object method or is it called as a static method ?I am asking you this because I will use servlets (Java 1.2.2) to call a DLL. These servlets may run concurrently in any moment, and I ...

JVM Memory Setting on Applet

265 byte By shrimalashish at 2007-9-26 12:08:55
I want to set my clients JVM memory usage. The client uses an applet and I cannot reach physically to the clients machine. My application uses 120-150 MB and is highly sophiticated on UI, Can anyone suggest some idea,Thanks,Ashish

is there a max length for a prepared statement

538 byte By WandererT at 2007-9-26 12:09:35
Hi,I am trying to pass a SQL statement to an oracle database using the connection.prepareStatement. It is a fairly long string (many single row functions and a union). I am getting an error message ora 908 missing null keyword.There is no missing null keyword and the select works in sqlplus. So ...

eating and eating memory

657 byte By lupien1 at 2007-9-26 12:09:46
checking the used memory on my NT task manager, i see an increment between 20K and 40K of memory each time a simple servlet is call from a client workstation. I simplified my java code servlet to use variable as less as possible and no getParameter. The simplified servlet now look like ...

JVM Loads classes as needed, does it unloads too

167 byte By shrimalashish at 2007-9-26 12:13:45
JVM is smart enough to load classes as needed, but if I don't need to class further does it unloads too or can I explicitly unload the unwanted classes.

can two JVM, communicate between each other.

129 byte By shrimalashish at 2007-9-26 12:13:51
can two JVM, communicate between each other.on a single machine or on a network.regards,ashish

Netscape crash when close window with applet

335 byte By isab895 at 2007-9-26 12:14:37
I am using JDK1.1 and swingall for load JApplets in Netscape without plugin. Sometimes when I close the window where the applet is, netscape crashes.I read that could be a problem of memory when the destroy method is called. Can be other reasons, and if it is a problem of memory how can I avoid ...

VM Heap Memory

458 byte By drewlane at 2007-9-26 12:15:07
Forgive my ignorance, but why is it that we have to manually set the amount of memory we want to allocate to the VM with the -Xmx command?Why can't the VM allocate more memory when it needs to?When trying to work with Java imaging programs that require large amounts of memory this is really a ...

Different DLL names- same interface

2176 byte By 320625759 at 2007-9-26 12:17:13
Hi all! I have two wrapper classes for native functions with exactly the same signatures. I compiled two DLL, now how can i be sure, that appropriate implementation is executing ? public final class Test1{ public Test1(){}; public native int doIt(int,String); public native String ...

How to refresh windows after editing registry?

440 byte By greenPea at 2007-9-26 12:19:33
Hi!I am able to write to the windows registry using JNIRegistry. The problem now is that even though the new value (for colour scheme) has been written, the desired effect does not take place unless i manually go to 'display properties' and select 'refresh', or if i reboot the system. Is ...

JNI and reflection

688 byte By peeveen at 2007-9-26 12:21:09
Hi all,I have some C++ code which invokes a Java VM, then makes a call (via JNI) to Class.forName.This works fine for classes in the JDK, but it can't find my own classes.The java.class.path property I am setting in the JVM initialisation arguments is definitely correct.I can call the JNI ...

Calling JVM from C native code

1056 byte By NACHOV at 2007-9-26 12:21:38
I'd like to call JVM from C native call.I work in W2000 enviroment using GCC Cygnus compiler.I followed JNI instructions. I read in this forum there was a change in JDK, and instead of attaching javai.dll, jvm.dll must be attached.Then I made a test using invoke.c example from JDK.I built ...