Re: Problem with Fonts
I got this when I installed as root: my userid didn't have permissions on .../jre/lib/fonts. When I straightened out the permisions, I started seeing text on my components. (This is mentioned somewhere in the FAQ or known errors). On Mon, 20 Sep 1999, Vartan Piroumian wrote: > Hi folks, > > SuSe Linux 6.1 > Blackdown JDK 1.2 pre-v2, > glibc2.0 > > I installed the GIMP URW fonts to eradicate the "zapf dingbats not > found" error messages. And, yes, the errors are gone. > > But now I have an even more disconcerting problem. > > Swing components do not render properly. > > > > AWT: > > The ONLY font I can display (regardless of what font I set on a > component) is some fixed width font (Courier?). > > Text appears on Labels, Choices, Lists, etc. ok. > > > > Swing: > > No component text appears at all, not on ANY component. > > I can't even get drawn graphics to appear--no routines in the > Graphics class produce visible output. > > > > Anyone seen this before? I'm completely stumped. > > Thank you in advance. > > > Vartan > > > > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Is there sound in java1.2 APPLICTAIONS ?
[EMAIL PROTECTED] wrote: > > Isn't there a multimedia API? FWIW, a better place to ask > these questions would be the javasoft website. > > -Tom > There is the forthcoming "JavaSound" API. It is available in JDK1.3 beta. Although someboady else already posted a beta release of JavaSound for Linux a couple of weeks ago. Check out the archive for more infos. Playing sound in Java 1.1 has been drag, because the official API was very weak. There was no way to synthesise sounds or play anything else except 8KHz Sun Audio File format files. However others like myself discovered the `sun.audio.*' undocumentated API. I have built a SoundKit which exploits it, and I have also even got a JDK1.2 bug fixed in time for the Kestrel Release. http://developer.java.sun.com/developer/bugParade/bugs/4238444.html If you want to look a my soundkit for 1.1.7. You can extract the `xenon.soundkit' from my video game source code `http://www.xenonsoft.demon.co.uk/humanoid/humanoid.html'. There is an example test sound program also. At some point (next year I guess) I'd like to evolve the xenon.soundkit to the new JavaSound API. BTW: Is there anyone writing a book on JavaSound? -- Adios Peter - import std.Disclaimer; // More Java for your Lava, Mate. "Give the man, what he wants. £££" [on Roy Keane, Quality Player] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
JNI & servlets:another problem
Hi,
Thanks to Juergen my problem with javah is solved. The problem had been with
javah, that it can't work with
compressed files. I have unjarred the servlet archive and jarred it with -0
option again. That killed the problem.
Thanks for it.(sorry for such a long message)
Here is another issue. I have a famous (as i read from the deja-news )
UnsatisfaiedLinkError. Full output is down there.
I compiled the code with
gcc -fPIC -c -I/usr/local/java/include hello.c -o hello.o
and linked it with
ld -shared hello.o -o libhello.so
cp libhello.so /usr/lib
cp libhello.so /lib (for grant)
and finally
ldconfig -n /usr/lib
ldconfig -n /lib
And restart apache. And as I try to run the servlet i get the error messages
down there.
system:redhat 6.0 2.2.12.
they mention a LD_LIBRARY_PATH environment variable which i think that not
used in redhat 6.0. Instead
i have seen a /etc/ld.so.conf where library paths are defined.
Should I use a this environment variable? Or any other suggestions to
overcome this problem.
By the way except this servlet I made the tutorial example from Sun's Java
Tutorial work.
Source code: (Only the part that causes the error is here, The code without
that "static" part used to work)
import java.io.*;
import javax.servlet.*;
import javax.servlet.
.
;
public class saved2 extends HttpServlet
{
Connection con;
int mu;
public native int authenticate();
static {
try
{
System.loadLibrary("hello");
}
catch (Exception E)
{
}
}
Output of jserv.log:
[20/09/1999 12:10:33:723] (ERROR) ajp11: Servlet Error:
java.lang.UnsatisfiedLinkError: authenticate: authenticate
[20/09/1999 12:10:33:723] (ERROR) an error returned handling request via
protocol "ajpv11"
And this is the output of Apache error log:
---
java.lang.UnsatisfiedLinkError: authenticate
at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:341)
at org.apache.jserv.JServConnection.run(JServConnection.java:197)
at java.lang.Thread.run(Thread.java)
Devrim Baris Acar
Tubitak-Bilten ODTU
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
debuggers for Java-JNI-C++
Hi, I am new to Linux/Java/JNI. Is there such a thing as a debugger for Java-C++ systems (communicating via the JNI) which can cope with both sides of the interface? Or given a Java UI (the main is in Java) which is invoking a C++ system, which then does some callbacks to Java, is there a way to get a debugger running on the C++ part? Thanks, Paul. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Problem with JNI_CreateJavaVM()
I have a "Segmentation fault (core dumped)" message when I execute the
following source.
#include
#include
int main()
{
const int nOpts = 4;
JavaVMOption options[nOpts];
int ii=0;
options[ii++].optionString = "-Djava.compiler=NONE";
options[ii++].optionString = "-Djava.class.path=.";
options[ii++].optionString = "-Djava.library.path=.";
options[ii++].optionString = "-verbose:jni,class,gc";
JavaVMInitArgs vm_args;
vm_args.version = JNI_VERSION_1_2;
vm_args.options = options;
vm_args.nOptions = nOpts;
vm_args.ignoreUnrecognized = JNI_TRUE;
JavaVM *jvm;
JNIEnv *env;
jint res = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args); /*debugger
message : Program received signal SIGSEGV, Segmentation fault.
0x401d5ca8 in main_arena ()*/
if(res < 0)
{
cerr << "Can't create Java VM" << endl;
exit(1);
}
cout << "JNI_CreateJavaVM() is OK" << endl;
jvm->DestroyJavaVM();
}
g++ -g simple.cpp -L/usr/local/jdk/jre/lib/i386
-L/usr/local/jdk/jre/lib/i386/classic
-L/usr/local/jdk/jre/lib/i386/native_threads -ljava -ljvm -lpthread
-lhpi -o Simple
Simple
I use java version "1.2"
Classic VM (build Linux_JDK_1.2_pre-release-v2, native threads, nojit)
on RedHat5.2
Thanks a lot,
Pierre
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [Problem with JNI_CreateJavaVM()]
Dude, you want us to write the code for you as well??
Pierre Heroux <[EMAIL PROTECTED]> wrote:
> I have a "Segmentation fault (core dumped)" message when I execute the
> following source.
>
> #include
> #include
>
> int main()
> {
> const int nOpts = 4;
> JavaVMOption options[nOpts];
> int ii=0;
> options[ii++].optionString = "-Djava.compiler=NONE";
> options[ii++].optionString = "-Djava.class.path=.";
> options[ii++].optionString = "-Djava.library.path=.";
> options[ii++].optionString = "-verbose:jni,class,gc";
>
> JavaVMInitArgs vm_args;
> vm_args.version = JNI_VERSION_1_2;
> vm_args.options = options;
> vm_args.nOptions = nOpts;
> vm_args.ignoreUnrecognized = JNI_TRUE;
>
> JavaVM *jvm;
> JNIEnv *env;
> jint res = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args); /*debugger
> message : Program received signal SIGSEGV, Segmentation fault.
> 0x401d5ca8 in main_arena ()*/
> if(res < 0)
> {
> cerr << "Can't create Java VM" << endl;
> exit(1);
> }
> cout << "JNI_CreateJavaVM() is OK" << endl;
> jvm->DestroyJavaVM();
> }
>
> g++ -g simple.cpp -L/usr/local/jdk/jre/lib/i386
> -L/usr/local/jdk/jre/lib/i386/classic
> -L/usr/local/jdk/jre/lib/i386/native_threads -ljava -ljvm -lpthread
> -lhpi -o Simple
> Simple
>
> I use java version "1.2"
> Classic VM (build Linux_JDK_1.2_pre-release-v2, native threads, nojit)
> on RedHat5.2
>
>
> Thanks a lot,
> Pierre
>
>
>
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact
[EMAIL PROTECTED]
Get free email and a permanent address at http://www.amexmail.com/?A=1
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Problem with JNI_CreateJavaVM()
Hi
Add the JNIGetDefaultJavaVMInitArgs, plus you need to
add your class path to vm_args.classpath
I have a C++ class which does all this for you, email me off list
and I'll send it to you.
Regards
--Jools
>From: Pierre Heroux <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Problem with JNI_CreateJavaVM()
>Date: Mon, 20 Sep 1999 17:54:51 +0200
>
>I have a "Segmentation fault (core dumped)" message when I execute the
>following source.
>
>#include
>#include
>
>int main()
> {
> const int nOpts = 4;
> JavaVMOption options[nOpts];
> int ii=0;
> options[ii++].optionString = "-Djava.compiler=NONE";
> options[ii++].optionString = "-Djava.class.path=.";
> options[ii++].optionString = "-Djava.library.path=.";
> options[ii++].optionString = "-verbose:jni,class,gc";
>
> JavaVMInitArgs vm_args;
> vm_args.version = JNI_VERSION_1_2;
> vm_args.options = options;
> vm_args.nOptions = nOpts;
> vm_args.ignoreUnrecognized = JNI_TRUE;
>
> JavaVM *jvm;
> JNIEnv *env;
JNI_GetDefaultJavaVMInitArgs( &vm_args );
> jint res = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args); /*debugger
>message : Program received signal SIGSEGV, Segmentation fault.
>0x401d5ca8 in main_arena ()*/
> if(res < 0)
> {
> cerr << "Can't create Java VM" << endl;
> exit(1);
> }
> cout << "JNI_CreateJavaVM() is OK" << endl;
> jvm->DestroyJavaVM();
> }
>
>g++ -g simple.cpp -L/usr/local/jdk/jre/lib/i386
>-L/usr/local/jdk/jre/lib/i386/classic
>-L/usr/local/jdk/jre/lib/i386/native_threads -ljava -ljvm -lpthread
>-lhpi -o Simple
>Simple
>
>I use java version "1.2"
>Classic VM (build Linux_JDK_1.2_pre-release-v2, native threads, nojit)
>on RedHat5.2
>
>
>Thanks a lot,
>Pierre
>
>
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact
>[EMAIL PROTECTED]
>
__
Get Your Private, Free Email at http://www.hotmail.com
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
problem running JDK 1.1.7 on alpha
Hello, When I attempt to invoke java I get the following error: ./../bin/alpha_21164a/green_threads/java: error in loading shared libraries: ./../lib/alpha_21164a/green_threads/libjava_dl.so: undefined symbol: _dl_default_scope I am running an alpha Linux system using RedHat 6.0. Has anybody run into this one before? -Kevin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Problem with JNI_CreateJavaVM()
> Pierre Heroux writes: Pierre> I have a "Segmentation fault (core dumped)" message when I Pierre> execute the following source. Pierre> jint res = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args); /*debugger Pierre> message : Program received signal SIGSEGV, Segmentation fault. Pierre> 0x401d5ca8 in main_arena ()*/ Works fine for me with glibc 2.1. Did you try to set LD_BIND_NOW=true? Juergen -- Juergen Kreileder, Blackdown Java-Linux Porting Team http://www.blackdown.org/java-linux.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
[Q] CLASSPATH, JAR searching, etc
Hi. I'm fairly new to Java, but stumbling along quite nicely, thank you; but I'm confused about how the VM finds stuff mentioned in CLASSPATH. Is there an "everything you wanted to know" FAQ, the kind of thing that when you get done reading it, you wish you hadn't asked? I guess that if you give a directory, it'll find .class files there and in appropriate subdirectories, and if you give a .jar file, it'll find classes there, but is there any more to it? Why are there so many .jar files? Why are some in ...java/lib, and others in (and under) ...java/jre/lib? Is it a Bad Idea to unpack them all into a master tree, then make a giant .jar containing all the .class files? * * * I'm having a problem running the BlackBox example from the Sun javacomm20-sparc package, with the rxtx-1.3-7 JNI module set up to implement the machine-specific serial interface. Under 1.2-pre2, I get a "NoClassDefFoundError" for javax/comm/CommDriver while loading the machine-specific code, but the class actually exists in a jar file specifically named on the java line. I tried unpacking all the jar files under /usr/local/packages/java into a temp directory, and that solves my problem, but I don't understand why the other approach fails. Any help? regards, d. dhm@vheissu(483)$ java -verbose -classpath BlackBox.jar:.:/usr/local/packages/java/rte/lib/rt.jar:/usr/local/packages/java/jre/lib/ext/jcl.jar:/usr/local/packages/java/lib/comm.jar BlackBox 2>&1 | grep comm [Loaded javax.comm.NoSuchPortException] <---it's finding some javax.comm [Loaded javax.comm.CommPort]stuff... [Loaded javax.comm.SerialPort] [Loaded javax.comm.PortInUseException] [Loaded javax.comm.SerialPortEventListener] [Loaded javax.comm.CommPortOwnershipListener] [Loaded javax.comm.CommPortIdentifier] [Loaded javax.comm.UnsupportedCommOperationException] Caught java.lang.NoClassDefFoundError: javax/comm/CommDriver while loading driver gnu.io.RXTXCommDriver [Loaded javax.comm.CommPortEnumerator] dhm@vheissu(485)$ jar tvf /usr/local/packages/java/lib/comm.jar | grep CommDriver 277 Sun Nov 15 15:58:08 PST 1998 javax/comm/CommDriver.class -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Hi ... and a request
Hello all, I'm new to the group, so "hi". I have a request for information: Im currently developing a front end in Java for the SpeakFreely suite of tools. As a result, I need to be able to capture their stdout and parse it. No problems I thought - just do an exec() and get the InputStream via getInputStream() on the resulting Process instance. However; I am having no end of difficulties here. If I exec the command (which if anyone is interested goes something like sflwl -hlwl.fourmilab.ch:2076 '[EMAIL PROTECTED]') I get nothing back. However, I can stuff this into the shell, and I get back: [neil@fastspod Project]$ sflwl -hlwl.fourmilab.ch:2076 '[EMAIL PROTECTED]' 209.78.48.182:2074 [EMAIL PROTECTED] (Neil Clayton) [neil@fastspod Project]$ I changed 'sflwl' to 'echo' to test my Java program, and it is able to report the results of that fine. I've tried other unix command line utils, and they have their results processed by my Java code. I then looked into the sflwl source code, to see if it was doing anything weird with stdout. Not that I can see. I just wanted to ask if there is any known problem with the linux jvm here. Current JVM is v1.1.7v1, Ive tried 1.2 prev2 with no difference (Ive downloaded by not yet tried v1.1.7v3) Regards, Neil Clayton -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [Problem with JNI_CreateJavaVM()]
Um. I thought he was just asking for help. He posted the code that was
breaking, it's a short snippet, and he was fairly clear about the
environment he was using; that's already more than *most* of the posts I've
seen come across this, and other, mailing lists.
Pierre, I'm running RH5.2 and Blackdown 1.2-pre-v2, and the code compiled (I
had to add the "-I" include directives, though--your g++ command-line below
was missing those, but that would yield a compile-time error, and not a
run-time segfault) and ran without a hitch; I'd check to make sure the JDK
installation itself is good, in case there's some configuration issue at
stake here. (Juergen, I didn't need the LD_BIND_NOW directive to get this to
run--is it really required?)
Ted Neward
Patterns/C++/Java/CORBA/EJB/COM-DCOM spoken here
http://www.javageeks.com/~tneward
"I don't even speak for myself; my wife won't let me." --Me
-Original Message-
From: William D.Webb <[EMAIL PROTECTED]>
To: Pierre Heroux <[EMAIL PROTECTED]>;
[EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, September 20, 1999 12:27 PM
Subject: Re: [Problem with JNI_CreateJavaVM()]
>Dude, you want us to write the code for you as well??
>
>Pierre Heroux <[EMAIL PROTECTED]> wrote:
>> I have a "Segmentation fault (core dumped)" message when I execute the
>> following source.
>>
>> #include
>> #include
>>
>> int main()
>> {
>> const int nOpts = 4;
>> JavaVMOption options[nOpts];
>> int ii=0;
>> options[ii++].optionString = "-Djava.compiler=NONE";
>> options[ii++].optionString = "-Djava.class.path=.";
>> options[ii++].optionString = "-Djava.library.path=.";
>> options[ii++].optionString = "-verbose:jni,class,gc";
>>
>> JavaVMInitArgs vm_args;
>> vm_args.version = JNI_VERSION_1_2;
>> vm_args.options = options;
>> vm_args.nOptions = nOpts;
>> vm_args.ignoreUnrecognized = JNI_TRUE;
>>
>> JavaVM *jvm;
>> JNIEnv *env;
>> jint res = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args); /*debugger
>> message : Program received signal SIGSEGV, Segmentation fault.
>> 0x401d5ca8 in main_arena ()*/
>> if(res < 0)
>> {
>> cerr << "Can't create Java VM" << endl;
>> exit(1);
>> }
>> cout << "JNI_CreateJavaVM() is OK" << endl;
>> jvm->DestroyJavaVM();
>> }
>>
>> g++ -g simple.cpp -L/usr/local/jdk/jre/lib/i386
>> -L/usr/local/jdk/jre/lib/i386/classic
>> -L/usr/local/jdk/jre/lib/i386/native_threads -ljava -ljvm -lpthread
>> -lhpi -o Simple
>> Simple
>>
>> I use java version "1.2"
>> Classic VM (build Linux_JDK_1.2_pre-release-v2, native threads, nojit)
>> on RedHat5.2
>>
>>
>> Thanks a lot,
>> Pierre
>>
>>
>>
>>
>> --
>> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>> with a subject of "unsubscribe". Trouble? Contact
>[EMAIL PROTECTED]
>
>
>
>Get free email and a permanent address at http://www.amexmail.com/?A=1
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact
[EMAIL PROTECTED]
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
More info on capturing stdout
Following up on my previous message, I have more information:
I've been playing with the code for sflwl, and found that something
*very weird* if happening.
This is a snippet from lwl.c.
myPrintf("While\n");
while (sdes_count-- > 0) {
struct lwl *lw;
myPrintf("In loop\n");
As expected, the output from the console looks like this:
While
In loop
209.78.48.182:2074 [EMAIL PROTECTED] (Neil Clayton)
Try again
Destorying
La1
La2
La3
(as you can see, I've stuck a number of other printf's in there too).
Weird thing is, the output from my Java program is:
While
La2
La3
So it does capture *some* stdout - but any printf statement I put
*inside* the above mentioned while loop does not come out. I am now
officially stumped :-)
I've never seen behaviour like this before! And now I can't tell if it's
anything to do with the JVM or something *weird* is hapnnening on my
linux box.
Comments and sanity checks would be welcome!
Im more than happy to send whatever code is required to anyone who
wishes to help verify the situation.
Regards,
Neil Clayton
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
