| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
| List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
| List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
| Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
| Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
| Message-ID: | <387C50EC.6907003@repas-aeg.de> |
| Date: | Wed, 12 Jan 2000 11:01:16 +0100 |
| From: | "Dr. Schroeder, Klaus" <schroeder AT repas-aeg DOT de> |
| Organization: | repas AEG Software |
| X-Mailer: | Mozilla 4.51 [en] (X11; I; Linux 2.2.5 i586) |
| X-Accept-Language: | en |
| MIME-Version: | 1.0 |
| To: | cygwin AT sourceware DOT cygnus DOT com |
| Subject: | Problem with Java and stdout in newest snapshot |
| X-MIME-Autoconverted: | from 8bit to quoted-printable by tux.astberlin.de id LAA19053 |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id EAA07730 |
Hi ,
Using the newest snapshot cygwin1-20000108.dll in my Java JNI
application solved my problem with segmentation faults in function
ioctl.
But now I'm running into a new problem:As soon, as the jni-dll is loaded
from my Java-Program, the Java standard output (System.out.println) does
no longer work. This bug does not appear with the originalB20.1
cygwin.dll.
To demonstrate the bug I changed the Java code from the java-jni c++
example:
Main.java
========
class Main {
public static void main(String[] args) {
System.out.println("*** main START ***"); // !!!
new HelloWorld().displayHelloWorld();
System.out.println("*** main END ***"); // !!!
}
}
HelloWorld.java
============
class HelloWorld {
public native void displayHelloWorld();
static {
System.out.println("*** load hello.dll ***"); // !!!
System.loadLibrary("hello");
System.out.println("*** hello.dll loaded ***"); // !!!
}
}
Running this with the original cygwin1.dll gives the following correct
output:
*** main START ***
*** load hello.dll ***
#1 LocalFoo created.
*** hello.dll loaded ***
HelloWorld::displayHelloWorld: Entering.
#2 LocalFoo created.
#3 LocalFoo created.
#3 LocalFoo destroyed.
HelloWorld::displayHelloWorld: Leaving..
#2 LocalFoo destroyed.
*** main END ***
#1 LocalFoo destroyed.
Running the same program with cygwin1-20000108.dll:
*** main START ***
*** load hello.dll ***
#1 LocalFoo created.
HelloWorld::displayHelloWorld: Entering.
#2 LocalFoo created.
#3 LocalFoo created.
#3 LocalFoo destroyed.
HelloWorld::displayHelloWorld: Leaving..
#2 LocalFoo destroyed.
#1 LocalFoo destroyed.
The lines *** hello.dll loaded *** and *** main END *** are missing.
Any help would be greatly appreciated.
Klaus Schröder
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |