Hi! I'm writing a servlet that uses javax.comm API, my web server is Tomcat 3.3. There is no trouble when I compile my code, but when I try to run it on the browser, I get this message:java.lang.NoClassDefFoundError: javax/comm/CommPortIdentifierPlease help! =)
2566 byte By
ppaulf at 2007-9-26 19:07:20
I've isolated the problem and cut down the code to the minimum. Why do I get a null pointer exception when the start method is called, when the object objJTextField is not null at this point? I'm really stuck here, HELP!(two small java files, save as BasePage.java and ExtendedPage.java and ...
I'm losing my mind here.Has anyone got invoke.c in sun's jni tutorial page to work? I've been trying to compile that program for days.I'm running this on solaris with jdk1.3.Following is my compile line and I also included thoselibrary paths in LD_LIBRARY_PATH.gcc -I/usr/j2se/include ...
9458 byte By
x_havoc at 2007-9-26 19:08:24
Hi, I'm trying to create simple Client/Server Apps in which the Client sends the JButton that was clicked to the server and the server outputs to its JTextField and to the Serial Port, but i keep getting a JVM_Bind error, so i know im not closing the ports right... one other thing, in the ...
Hi, I'd like to write a program which accesses my modem and plays a WAV file. I would need this as an notification System. I've read in the forums it is not big deal to access the modem, but how can I get the WAV file get played ?any help or suggestions welcome !thanksGnter ...
I used javac to complie my java code and used javah to create the .h file at C:\ . But I can't do it, it shown "Error: Class HelloWorld.class could not be found." The HelloWorld.class was at C:\ path...but I don't know why it will show class could not be found.Can someone solve my problem? ...
173 byte By
Manvij at 2007-9-26 19:10:04
Hi i am use JRE 1.3.1_02 is there any option is there to increase the Initial Heap size permamently. How to get the present -Xms and -Xmx values.
Hi,Iwant to catch exception occuring in mynative program code...and want that theexception should be passed back to javalike ic C codeint i;i= 5/0;this exception should be passed back to java if any suggestions plz help!!!Thanx ib advanceSheeba ...
How do i do this? I've written the HelloWorld example from the java tutorial. When it comes to creating the shared library i have no idea what all the syntax means eg. cc -G -I/usr/local/java/include ...etc. I don't have this filepath on my system so what to i need to specify and why and how ...
225 byte By
Donam at 2007-9-26 19:12:01
Hi,I need a Java code which will call a VC++ dll .(similarly the viceversa also.....from vc++ calling a java application)If any one have the code Please send it...Thankx,Donam.
342 byte By
ddankic at 2007-9-26 19:13:08
Hi people,is there anyone who knows how I can create and use JAVA class in C++ code. Example I have one JAVA class which works with database.One of the methods from this class returns XML string that represent result set. How to create instance of this class inside of C++ and have possibility ...
432 byte By
cfrocha at 2007-9-26 19:14:04
Hi, Im trying to call a native method with JNI and the following exception occurs when I try to call the native method setFileName:Exception occurred during event dispatching:java.lang.UnsatisfiedLinkError: setFileNameThe dll where this method is defined is in the directory c:/winnt/system32, ...
432 byte By
cfrocha at 2007-9-26 19:14:05
Hi, Im trying to call a native method with JNI and the following exception occurs when I try to call the native method setFileName:Exception occurred during event dispatching:java.lang.UnsatisfiedLinkError: setFileNameThe dll where this method is defined is in the directory c:/winnt/system32, ...
319 byte By
lucyzz at 2007-9-26 19:14:44
I found that the format of .class files(extracted from rt.jar) in jdk1.3.1 are different from those in jdk1.3.0._02.Can anyone tell me what's the exact difference between them?and Is there any format difference between jdk1.3.1, jdk1.2, and jdk1.02?any answers are appreciated ...
822 byte By
metasim at 2007-9-26 19:15:38
I'm profiling an algorithm, trying to improve it's performance, and the "hot spot" that both OptimizeIt and the built-in profiler have detected has me very puzzled. This algorithm (which determines the relative location of a point to a polygon), has a good 10-20 arithmetic operations in it, ...
Hello all,I've got two solaris machines, one with 2.6 and another with 2.8. Both have several JDKs installed, including the newest 1.4 RC. My programs send and receive asynchronous messages over UDP at rates of 6,000+ messages per second.From everything I've read and heard, Java on 2.8 should ...
Hello world,I have a simple client-server application based on sockets. The client is anapplet that communicates with the server via sockets. (The client connectsvia port 80 to the server, which is running a ServerSocket at port 2112.)The applet establishes connection with the server by ...
I am compiling the HotSpot Client source code on Linux. As mentioned in the README.html, I set the env. var., run make product1, but the following occurred:sh /home/adrian/Java/hotspot2/build/linux/../../build/linux/makefiles/buildATree.sh compiler2 /home/adrian/Java/hotspot2/build/linux/../.. ...
I found out, when you enter a native function from Java side, all parameters are copied to local representatives. If you leave the function these representatives are deleted (of course) .What I need is an update of one or more passed parameters. Such as Release<NativeType>ArrayElements ...
I have two C++ classes that implements some methods. My Java Interface interacts directly with one class. It calls the methods, passes a string to them and expects a string returned. The methods in this first C++ class manipulate the string in various ways. Each character in the string is ...
Have 10 Duke dollars still to allocate from http://forum.java.sun.com/thread.jsp?forum=63&thread=154572Keep the question short, hopefully someone can point me out to some working source code that solves this problem:If I have three classes to load dynamically from a Jar file, say ...
220 byte By
anthello at 2007-9-26 19:22:31
How can I get a handle to a OS process in my java application and then use that handle to kill the process.Note..that i want handle to a process which has not been started from my java application .
Im new to this and I need to develop an application than needs to make a call to a native method... Ive read all the JNI tutorial but I lack of Visula C++ to generate the ".dll" than I need to finally concatenate my whole application. What other ways there are to generate ".dll" files ? How ...
i hav a samll hardware attached to my Parallel/Serial Porteg an LED.Now i want to set it on/off through my JAVA application and see the status of the LED.Plz tell me how should i do it.
863 byte By
malicia at 2007-9-26 19:27:05
Can anyone help me to use recordsets without using the appwizard at the creation of my project?the purpose is to input on the database values from a form without using a database project, so in my MFC project I do the following and then I faced problems :In the class which I use the database I ...
Could any body tell me if i have a small hardware or LEDattached to the Parallel/Serail port .then what will be steps to ON/OF the LED using javax.commThanx
1030 byte By
lqi9854 at 2007-9-26 19:27:46
My system has * One large C++ program exists. I like to use it within the J2EE server or Apache server without much modification. * The client will input some data via GUI or Webpage(JSP). Then the data will be transferred to the Server for process. C++ program on the server will be executed ...
292 byte By
andalam at 2007-9-26 19:29:21
I want to call c function from servlet using JNI . I created the .so file and gave the library path . But when i try to load the library it says "Unsatisfied link error ". I am using tomcat on linux .. any more setting has to be done in order to call native code from servlets ?
I have develloped an application which using JNI. It works well on Windows but I have trouble on Red Hat 7.2. (I use jdk 1.3.1-02 on Red Hat). The library is correctly loaded but when the first native method is called, an error occured :An unexpected exception has been detected in native code ...
Hi,I have Java application based on JDK 1.1.8 and it uses JNI to use libraries developed in C/C++. In the C code, one module tries to open a file and it uses "FileName" assuming the file exists in the current working diretory. When the app runs, the C calls are failing saying couldn't find the ...
720 byte By
rcorbett at 2007-9-26 19:35:32
Hey folks!I'm trying to interface to my DLL throught he JNI interface and I am having a little bit of trouble.It seems there is no way (that I can find) to have a non-JNI function in my DLL access any methods in my Java application. I can make the jobject global and retain its scope, but I ...
906 byte By
herbien at 2007-9-26 19:37:18
Hi,I need to run several swing application with a single JVM. (for performance reasons, especially with memory). This is ok.But swing applications uses only one AWT-Event-Thread that is shared by all applications (Frames).The consequence is, per example, that a modal dialog in one of the ...
1025 byte By
suew2 at 2007-9-26 19:38:13
Hi, I am trying for the first time to use a C++ native interface. I have used swig to create the wrapper classes and methods I need, but I'm having trouble calling these from my Java. Swig has provided me with the following constructor for a C++ class:- public CUTMC_CDB_JAVA(long context) ...
1629 byte By
btsoons at 2007-9-26 19:39:08
I have a native programm written in C++ which returns a HWND. This is the code:" JAWT awt;JAWT_DrawingSurface* ds;JAWT_DrawingSurfaceInfo* dsi;JAWT_Win32DrawingSurfaceInfo* dsi_win;jboolean result;jint lock;// Get the AWTawt.version = JAWT_VERSION_1_3;result = JAWT_GetAWT(env, ...
1277 byte By
fincha at 2007-9-26 19:40:18
Hello,My GUI has one method that calls several methodseach of which calls a JNI method. I have print statements at the beginning and end of the enclosingmethod and printf statements within my JNI methods.A flush method/function is called after every print.It appears that the individual method ...
144 byte By
kanji88 at 2007-9-26 19:40:21
Hi, can anybody tell me how to run a java application as screen saver. By that i mean make the java application into a .scr file.
Hi,I have a JDK 1.1.8 based java app that loads a JNI based dll. When I run the app from DOS prompt it is working fine. When I run the app from my IDE (i.e no access to console stdout/stdin), the app is freezing. So I launched VC++ 6x and attached to the Java app. Found that the JNI code that ...
1290 byte By
rcorbett at 2007-9-26 19:43:02
Hey folks. I'm experiencing some weird results when trying to call a java function from my DLL. After my DLL calls the java function an arbitrary amount of times through my callback, the data array seems to disappear and then I get an java.lang.ArrayIndexOutOfBoundsException.Here's what I'm ...
14216 byte By
Demjan at 2007-9-26 19:45:25
Hello JDC-folks,i have the following problem:I must generate a keyboard-input to a native-application.This input must be correct for different locales installedon the client's computer (it's a global network).This topic is related to the following topics: ...
I have a java application installed on many PCs where it normally runs expect one (with Windows2000, as the other PCs): when I start the application the following error occurs:application error. java.exe has generated errors and will be closed by windows. You will need to restart he program ...
842 byte By
anteo at 2007-9-26 19:47:46
Hi, I try to use NewString() and NewStringUTF() to create a jstring to pass to SetObjectField().I see that these 2 methods don't creany anything!C++ codejstring jstr1=env->NewStringUTF("my test");if (!jstr1) printf("Warning ERROR\n");printf("value of jstr1 is ...
3463 byte By
dfultz63 at 2007-9-26 19:48:03
the following is my java code, c code and output (hints to a core). When returning the byte array, the java side sees the correct "length", but cores when I try to access one of the elements. Looks like a segv, but why? Any Ideas?!?// *** JAVA Program (look familiar?)class HelloWorld {public ...
555 byte By
claybird at 2007-9-26 19:48:15
I added in a JNI call to an existing company application. The C library is loaded ok, and the function is called without problem, however, it appears that the native side code doesn't get executed until I exit the application.It's almost as if the native side code is queued somewhere and ...
565 byte By
nirmalom at 2007-9-26 19:51:06
Hello, I have a simple java application that creates a connection to the database to run a stored procedure to transform large chunk of data stored in the tables. While the program runs, i want to be able to send sytem interrupt by pressing Control C to stop the execution of the program which ...
Can some one please explain the new thread dump information provided in 1.3After some searching I found articals that explained thread dumps.I then went to apply my new found knowledge only to find that the dump is differnt in 1.3In particular I want understand what:- waiting for monitor entry ...
Hello,I did an Java application using Tibco (.jar) which use a .dll. Everything works fine till i tried to run my application as a NT Service. In this case, the application cannot find the dll even if I put it in the system32.Does anybody can give an hint?Does anyone experience something ...
146 byte By
aseb at 2007-9-26 19:53:16
I want to make a .so file (library for linux). How could I compile with gcc to have this output. My input file is in .c.Thanx
737 byte By
ydizet at 2007-9-26 19:54:25
help me please ! :))i'm trying to call (and use, of course!) a win32-DLL from my java application using JNI.the dll-fonction i would like to use is something like that (c++ code) :int name_of_my_fonction(char tab[100]);this fonction change "tab" by replacing each '1' by 'a' (for exemple)so ...
217 byte By
jose_sam at 2007-9-26 19:54:28
Hi all,I want to call an api function exported from a dll using java. For example l like to call a function from kernel.dll (Windows). How can i do this. Do i have to create another dll for this?
Is possible that a function C return a struct to Java ? And Java can pass a hashtable o a struct to C ? How can find documentation for this ? Many thanks.