Re: Regarding JMF and capturing

2001-03-21 Thread Peter Schuller

> Now that JMF-2.1.1 is out, do you have any information on when a Linux
> version will be available?

A beta version is already out. 2.1.1 beta 2 is the one I downloaded.

   
ftp://metalab.unc.edu/pub/linux/devel/lang/java/blackdown.org/JMF/2.1.1/i386/beta2/jmf-2.1.1-beta2-linux-i386.tar.bz2

(or choose an appropriate mirror site on blackdown.org)

-- 
/ Peter Schuller, InfiDyne Technologies HB

PGP userID: 0x5584BD98 or 'Peter Schuller <[EMAIL PROTECTED]>'
Key retrival: Send an E-Mail to [EMAIL PROTECTED]
E-Mail: [EMAIL PROTECTED] Web: http://scode.infidyne.com


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Java & Multithread

2001-03-21 Thread Valerio Ferrucci

Hi,
I'm building a C application (MultiThreaded) using Java Invocation API
to call Java from C.
I use pthread_create to launch a thread and pthread_mutexlock and
pthread_mutexunlock to syncronize them and link my app with "native
threads".
Then I splat my application launching multiple threads
contemporaneously.
If I don't call Java all is ok. If I call Java (my simple "Hello Word"
Java class) the application exits with "segmentation fault" after some
seconds of splatting.

1) Is there something I'm missing in this scenario?
2) Is there some useful documentation about using Java Invocation API in
C pthreads?
3) Has the "Hello Word" class to be built in some particular way to live
in a multithreaded system?

Thanks for help

==
Valerio FerrucciTabasoft Sas
[EMAIL PROTECTED]  http://tabasoft.ancitel.it
[EMAIL PROTECTED]



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Regarding JMF and capturing

2001-03-21 Thread Peter Schuller

> Yes, it's a Linux specific problem.  It will get better to some extent
> with the next JMF-2.1.1 release which has its own JavaSound
> implementation.

Great! And once again, a big thanks for the work you guys are doing for Java
on Linux.

> The JMF Programmer's Guide has an "Writing Captured Audio Data to a
> File" example:
> http://java.sun.com/products/java-media/jmf/2.1.1/guide/JMFCapturing.html#93821

Yeah, that's the one I'm going by. I'll figure it out eventually though.

Thanks!

-- 
/ Peter Schuller, InfiDyne Technologies HB

PGP userID: 0x5584BD98 or 'Peter Schuller <[EMAIL PROTECTED]>'
Key retrival: Send an E-Mail to [EMAIL PROTECTED]
E-Mail: [EMAIL PROTECTED] Web: http://scode.infidyne.com


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Regarding JMF and capturing

2001-03-21 Thread Viktor Sigurd Wold Eide

"Peter Schuller" <[EMAIL PROTECTED]> writes:

> A beta version is already out. 2.1.1 beta 2 is the one I downloaded.
> 
>
>ftp://metalab.unc.edu/pub/linux/devel/lang/java/blackdown.org/JMF/2.1.1/i386/beta2/jmf-2.1.1-beta2-linux-i386.tar.bz2
> 
> (or choose an appropriate mirror site on blackdown.org)
> 
> -- 
> / Peter Schuller, InfiDyne Technologies HB
> 
> PGP userID: 0x5584BD98 or 'Peter Schuller <[EMAIL PROTECTED]>'
> Key retrival: Send an E-Mail to [EMAIL PROTECTED]
> E-Mail: [EMAIL PROTECTED] Web: http://scode.infidyne.com


I know, but 2.1.1 beta 2 is from November last year and I think Sun
has made improvements and bug fixes to JMF since then. I could have
been more explicit in my previous posting, asking for information
about when a new port will be available.

Viktor S. Wold Eide


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Java & Multithread

2001-03-21 Thread Peter Schuller

> If I don't call Java all is ok. If I call Java (my simple "Hello Word"
> Java class) the application exits with "segmentation fault" after some
> seconds of splatting.

I'm sure someone who knows more will respond; but could it be a signaling
handling conflict? I don't know about pthreads specifically, but I do know
there's at least one threading lib out there that uses SIGUSR1/SIGUSR2
(that's the name of them, right?) internally.

Take the above with a grain of salt though. I wouldn't be surprised if
there's some completely unrealted quick fix...

-- 
/ Peter Schuller, InfiDyne Technologies HB

PGP userID: 0x5584BD98 or 'Peter Schuller <[EMAIL PROTECTED]>'
Key retrival: Send an E-Mail to [EMAIL PROTECTED]
E-Mail: [EMAIL PROTECTED] Web: http://scode.infidyne.com


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




readInt() & byte order

2001-03-21 Thread Joaquin Rapela

Hello,

I have a binary file containing short integers. I wrote a C program to read
the file and it works as expected. I wrote a java program to read the file
using a DataInputStream and its readInt() method and it is reading the short
integers in inverted order Instead of a 2175 (1111) I get a 32520
(1111000). To read the integers I read the following code:

File inputFile = new File(filename);
in = new DataInputStream(new FileInputStream(filename));
short current = -1;
current = in.readShort();

Is there something wrong with this? Shall I use another method?

Thanks in advance, Joaquin


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: readInt() & byte order

2001-03-21 Thread Ashish

Answer is simple

Java program expects file bytes in big-endian format, while C uses little
endian

2175 = > 1000   0111

so java will interpret after assuming it's big endian will be 0111
1000 => 32520

-Ashish

- Original Message -
From: "Joaquin Rapela" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 9:56 AM
Subject: readInt() & byte order


> Hello,
>
> I have a binary file containing short integers. I wrote a C program to
read
> the file and it works as expected. I wrote a java program to read the file
> using a DataInputStream and its readInt() method and it is reading the
short
> integers in inverted order Instead of a 2175 (1111) I get a 32520
> (1111000). To read the integers I read the following code:
>
> File inputFile = new File(filename);
> in = new DataInputStream(new FileInputStream(filename));
> short current = -1;
> current = in.readShort();
>
> Is there something wrong with this? Shall I use another method?
>
> Thanks in advance, Joaquin


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: readInt() & byte order

2001-03-21 Thread Matthias Pfisterer

Ashish wrote:
> 
> Answer is simple
> 
> Java program expects file bytes in big-endian format, while C uses little
> endian

Sorry, wrong. C uses the native byte order of the system. I.e. it
depends on the processor.
x86 (Intel, AMD) => little endian
PowerPC, Alpha, Sparc => big endian

Matthias


> 2175 = > 1000   0111
> 
> so java will interpret after assuming it's big endian will be 0111
> 1000 => 32520
> 
> -Ashish
> 
> - Original Message -
> From: "Joaquin Rapela" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, March 21, 2001 9:56 AM
> Subject: readInt() & byte order
> 
> > Hello,
> >
> > I have a binary file containing short integers. I wrote a C program to
> read
> > the file and it works as expected. I wrote a java program to read the file
> > using a DataInputStream and its readInt() method and it is reading the
> short
> > integers in inverted order Instead of a 2175 (1111) I get a 32520
> > (1111000). To read the integers I read the following code:
> >
> > File inputFile = new File(filename);
> > in = new DataInputStream(new FileInputStream(filename));
> > short current = -1;
> > current = in.readShort();
> >
> > Is there something wrong with this? Shall I use another method?
> >
> > Thanks in advance, Joaquin
> 
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

-- 
Matthias Pfisterer  

Share your knowledge.
It's a way to achieve immortality.

 (from a nepalese mantra)

Java Sound Examples:
http://w3studi.informatik.uni-stuttgart.de/~pfistere/jsexamples/
Tritonus, the open source implementation of the Java Sound API:
http://www.tritonus.org/
--


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Typing International Text

2001-03-21 Thread Michael Grinder

Does anyone know the secret to typing non-Latin-1 text into a Java program
on Linux? I've tried everything I can think of, but so far Java programs
stubbornly refuse to accept anything but Latin-1 characters from the
keyboard.

Here's my setup:

Debian GNU/Linux (potato with some packages from unstable)
Blackdown JDK 1.3 (I've also tried the IBM JDK 1.3)

One of the languages I would like to be able to type is Greek, so I did
the following:

Added ISO-8859-7 fonts to font.properties
Set the locale to el_GR
Set up a Greek keymap with xkbsetmap

I know that everything is set up properly on the X11 side because I've
been able to type Greek characters in an xterm, but when I start up a java
program and switch to the Greek keymap, it substitutes the upper half of
Latin-1 rather than Greek characters.

Is this possible, or am I banging my head against a brick wall?



Michael Grinder



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: readInt() & byte order

2001-03-21 Thread Ashish


yep i forgot to mention the paltforms for C

-Ashish

- Original Message -
From: "Matthias Pfisterer" <[EMAIL PROTECTED]>
To: "Ashish" <[EMAIL PROTECTED]>
Cc: "Joaquin Rapela" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 21, 2001 5:13 PM
Subject: Re: readInt() & byte order


> Ashish wrote:
> >
> > Answer is simple
> >
> > Java program expects file bytes in big-endian format, while C uses
little
> > endian
>
> Sorry, wrong. C uses the native byte order of the system. I.e. it
> depends on the processor.
> x86 (Intel, AMD) => little endian
> PowerPC, Alpha, Sparc => big endian
>
> Matthias
>
> > 2175 = > 1000   0111
> >
> > so java will interpret after assuming it's big endian will be 0111
> > 1000 => 32520
> >
> > -Ashish
> >
> > - Original Message -
> > From: "Joaquin Rapela" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 21, 2001 9:56 AM
> > Subject: readInt() & byte order
> >
> > > Hello,
> > >
> > > I have a binary file containing short integers. I wrote a C program to
> > read
> > > the file and it works as expected. I wrote a java program to read the
file
> > > using a DataInputStream and its readInt() method and it is reading the
> > short
> > > integers in inverted order Instead of a 2175 (1111) I get a
32520
> > > (1111000). To read the integers I read the following code:
> > >
> > > File inputFile = new File(filename);
> > > in = new DataInputStream(new FileInputStream(filename));
> > > short current = -1;
> > > current = in.readShort();
> > >
> > > Is there something wrong with this? Shall I use another method?
> > >
> > > Thanks in advance, Joaquin


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Patches for compiling 1.3?

2001-03-21 Thread Barnet Wagman

I'd like to compile the jre (to optimize for my processor, an AMD Athlon
K7) and could use a little guidance.

The Blackdown faq points to compiling instructions for 1.2.2 RC3.  Are
these still correct, for 1.3?  These instructions say that it is
necessary to apply Blackdown's patches in order to get 1.2.2 to compile
under Linux?  Is this still the case for 1.3?  And if so, where can I
get them - I couldn't find any patches on Blackdown's site.

Any suggestions about compiling Java would be appreciated.

Thanks,

Barnet Wagman


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




GCJ on RedHat 6.x

2001-03-21 Thread jmsalvo

I am running RedHat 6.0 ... but with a lot of things upgraded, such as ( but not
limited to ):

kernel 2.2.18, using reiserfs
glibc-2.1.3 ( required by Blackdown's JDK 1.2.2 / 1.3 )

There are others, but these are the ones relevant for java on linux.

Now I want to try out GCJ. I have downloaded the relevant RPMS. However, if I
understand correctly the output at the end, I also need to replace my current C
preprocessor ( cpp package ).

This have me though for a while if it is worth it, since upgrading the cpp
package will probably also require me to upgrade glibc, etc, etc

.. which may in turn break compiling other programs.

Furthermore, the only cpp-2.95.x out there is not even from RedHat. ( 2.96 are
the unstable ones, IIRC as per GCC committee ) Here is result of rpmfind on cpp:

http://www.rpmfind.net/linux/rpm2html/search.php?query=cpp&submit=Search+...
http://www.rpmfind.net/linux/RPM/contrib/libc6/i386cpp-2.95.1-3.i386.html

Has anyone here using RedHat 6.x tried installing gcj-2.95 using the RPMs?

Here is the output:

[root@jsalvo-desktop java]# rpm -Uvh --test gcc-libgcj-2.95-4.i386.rpm
error: failed dependencies:
gcc-java = 2.95 is needed by gcc-libgcj-2.95-4
[root@jsalvo-desktop java]# rpm -Uvh --test gcc-java-2.95.1-3.i386.rpm
error: failed dependencies:
cpp = 2.95.1 is needed by gcc-java-2.95.1-3
[root@jsalvo-desktop java]# rpm -qa | grep cpp
cpp-1.1.2-12


Thanks,

John





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




jdk1.3 support for sparc/linux

2001-03-21 Thread Michael . Chan

is there currently a release plan or schedule for a jdk1.3 port?

I'm willing to offer my time and hardware resources to help with this
project...

mike

snotty e/c


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: GCJ on RedHat 6.x

2001-03-21 Thread Barnet Wagman


As I recall, the version in those RPMs is very out of date and does not
work.  (See the GCJ faq). If you want to try GCJ today, youll need
to get the CVS tree or a recent snapshot.  See  http://gcc.gnu.org/java/index.html
I don't know what kind of state GCJ is at the moment; but I'm
fairly sure it's still in beta.
[EMAIL PROTECTED] wrote:
I am running RedHat 6.0 ... but with a lot of things
upgraded, such as ( but not
limited to ):
kernel 2.2.18, using reiserfs
glibc-2.1.3 ( required by Blackdown's JDK 1.2.2 / 1.3 )
There are others, but these are the ones relevant for java on linux.
Now I want to try out GCJ. I have downloaded the relevant RPMS. However,
if I
understand correctly the output at the end, I also need to replace
my current C
preprocessor ( cpp package ).
This have me though for a while if it is worth it, since upgrading the
cpp
package will probably also require me to upgrade glibc, etc, etc
.. which may in turn break compiling other programs.
Furthermore, the only cpp-2.95.x out there is not even from RedHat.
( 2.96 are
the unstable ones, IIRC as per GCC committee ) Here is result of rpmfind
on cpp:
http://www.rpmfind.net/linux/rpm2html/search.php?query=cpp&submit=Search+...
http://www.rpmfind.net/linux/RPM/contrib/libc6/i386cpp-2.95.1-3.i386.html
Has anyone here using RedHat 6.x tried installing gcj-2.95 using the
RPMs?
Here is the output:
[root@jsalvo-desktop java]# rpm -Uvh --test gcc-libgcj-2.95-4.i386.rpm
error: failed dependencies:
    gcc-java = 2.95 is needed
by gcc-libgcj-2.95-4
[root@jsalvo-desktop java]# rpm -Uvh --test gcc-java-2.95.1-3.i386.rpm
error: failed dependencies:
    cpp = 2.95.1 is needed by
gcc-java-2.95.1-3
[root@jsalvo-desktop java]# rpm -qa | grep cpp
cpp-1.1.2-12
Thanks,
John
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]