classpath

2001-02-08 Thread soonho



Hi all,
 
I create a JVM inside my C code. but when running, 
it said that Can't find Prog Class as what i witten in my c code.
 
cls = (*env)->FindClass(env, 
"Prog");    if (cls == 0) 
{    fprintf(stderr, "Can't find Prog 
class\n");    exit(1);
 
How to set the classpath until c know where to get 
prog.class. I put it in /root/jni and set the following:
 
options[1].optionString = 
"-Djava.class.path=root/jni/Prog"; // user classes
 
Why still can't find Prog class?
 
Thanks in advance
 
soonho


RE: font problem

2001-02-08 Thread Jesse Stockall

"Font specified in font.properties not found [--zapf
dingbats-medium-r-normal--*-%d-*-*-p-*-adobe-fontspecific]"

If this is (or similar to) the error you are getting the fix is simple.

Copy "symbol.ttf" to the /j2re1.3/lib/fonts directory add the following line
to "fonts.dir"
"symbol.ttf  -urw-symbol-medium-r-normal--0-0-0-0-p-0-ad
obe-fontspecific"
You also have to change the number at the top of fonts.dir to 13, as there
are now 13 fonts.

You can get symbol.ttf from a windows machine. Or contact me & I'll send it.

Jesse Stockall
Developer
CRYPTOCard Corp
[EMAIL PROTECTED]
613.599.2441 x243

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Zsolt Koppany
Sent: February 7, 2001 16:15
To: [EMAIL PROTECTED]
Subject: Re: font problem

I have installed some additional URW fonts, now I don't get the error
messages but the texts still look ugly. What is the reason?


Jacob Nikom wrote:
>
> This helped me:
>
> Copy the file font.properties file from your jre118 jdk
> /usr/local/jdk1.1.8/jre/lib/font.properties
> to your jre1.3.0 (not j2re1.3.0 - there is no separate jre
> in j2ee)
>
> Regards,
>
> Jacob Nikom
>
> Zsolt Koppany wrote:
>
> > Hi,
> >
> > I use the j2re1.3.0 version and when I start an JFC application I get a
> > lot of messages that fonts cannot be found. Additionaly the texts appear
> > with ugly fonts, they are hardly readable. I don't have this problem
> > with jre118.
> > I use Suse-7.x.
> >
> > Do you know how I could solve this font problem?
> >
> > --
> > Zsolt Koppany
> > Intland GmbH www.intland.com
> > Schulze-Delitzsch-Strasse 16
> > D-70565 Stuttgart
> > Tel: +49-711-7871080 Fax: +49-711-7871017
> >
> > --
> > To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

--
Zsolt Koppany
Intland GmbH www.intland.com
Schulze-Delitzsch-Strasse 16
D-70565 Stuttgart
Tel: +49-711-7871080 Fax: +49-711-7871017


--
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]




Messed up swing windows

2001-02-08 Thread Martin, Stephen

I often have a problem where my Swing windows get created messed up. I've
attached
a couple of gifs to show what I mean. This usually (if not always) happens
with a
frame or dialog is being created and is not 100% reproducible. My guess
would be that
it is the result of a race condition but I have no idea how to work around
it. My solution
to date is to simply kill that application and start it again. It happens
under both the
latest Blackdown and Sun 1.3 jdks (and all other JDKs in the last 6 months
or so). I don't
think it happens under windows. Is this a known problem, or something I'm
doing wrong with
Swing? My apologies if sending images to the list is taboo, but it's the
best way to show what
is happening.

 <>  <> 

 messedup.gif
 ok.gif


Servlet API classes - where to place them?

2001-02-08 Thread Jacob Nikom

Hi,

I started to work with servlets and found that I need to download
Servlet API classes - servlet-2_2b.zip package. I have few questions
about this package.

1. Does it run on Linux?
2. Where jdk directory structure I have to place it in:
   a) /jdk/jre/lib/ext
   b) should I create /jdk/jre/lib/classes directory
and place them over there ?

Jacob Nikom



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




Re: Servlet API classes - where to place them?

2001-02-08 Thread Nathan Meyers

On Thu, Feb 08, 2001 at 12:16:46PM -0500, Jacob Nikom wrote:
> Hi,
> 
> I started to work with servlets and found that I need to download
> Servlet API classes - servlet-2_2b.zip package. I have few questions
> about this package.

Servlets run fine on Linux. The question is what you are trying to
do with the servlet classes - just compile your own source, or run a
servlet environment?

If you just need the library to compile your own classes, you can install
it as an extension or put it in your classpath. If you want to run a
servlet environment - something that will handle HTTP requests and run
servlets - then you need to choose and run one. You have many choices
here: for example, there's the Tomcat servlet engine you can use with
Apache (http://jakarta.apache.org/tomcat/), and there are pure-Java Web
servers such as Jetty (http://jetty.mortbay.com/).

Nathan

> 
> 1. Does it run on Linux?
> 2. Where jdk directory structure I have to place it in:
>a) /jdk/jre/lib/ext
>b) should I create /jdk/jre/lib/classes directory
> and place them over there ?
> 
> Jacob Nikom
> 
> 
> 
> --
> 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: Servlet API classes - where to place them?

2001-02-08 Thread Jacob Nikom

Thank you Nathan,

I use Tomcat server. However, I still need to compile my servlet with
Java servlet package. Here I found some unexpected installation feature.

I placed servlet-2_2b.zip on my CLASSPATH and it did not work
wherever I placed it. After some trials, I unzipped it and to my surprise
found server.jar file in it! Also, I could not find any instructions on
the Sun's site how to install it.

After I discovered server.jar file I placed it in the jre/lib/ext directory
and it started to work.

Regards,

Jacob Nikom






Nathan Meyers wrote:

> On Thu, Feb 08, 2001 at 12:16:46PM -0500, Jacob Nikom wrote:
> > Hi,
> >
> > I started to work with servlets and found that I need to download
> > Servlet API classes - servlet-2_2b.zip package. I have few questions
> > about this package.
>
> Servlets run fine on Linux. The question is what you are trying to
> do with the servlet classes - just compile your own source, or run a
> servlet environment?
>
> If you just need the library to compile your own classes, you can install
> it as an extension or put it in your classpath. If you want to run a
> servlet environment - something that will handle HTTP requests and run
> servlets - then you need to choose and run one. You have many choices
> here: for example, there's the Tomcat servlet engine you can use with
> Apache (http://jakarta.apache.org/tomcat/), and there are pure-Java Web
> servers such as Jetty (http://jetty.mortbay.com/).
>
> Nathan
>
> >
> > 1. Does it run on Linux?
> > 2. Where jdk directory structure I have to place it in:
> >a) /jdk/jre/lib/ext
> >b) should I create /jdk/jre/lib/classes directory
> > and place them over there ?
> >
> > Jacob Nikom
> >
> >
> >
> > --
> > 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: Messed up swing windows

2001-02-08 Thread Miloslaw Smyk

"Martin, Stephen" wrote:
> 
> I often have a problem where my Swing windows get created messed up. I've
> attached
> a couple of gifs to show what I mean. This usually (if not always) happens
> with a
> frame or dialog is being created and is not 100% reproducible. My guess
> would be that
> it is the result of a race condition but I have no idea how to work around
> it. My solution
> to date is to simply kill that application and start it again. It happens
> under both the
> latest Blackdown and Sun 1.3 jdks (and all other JDKs in the last 6 months
> or so). I don't
> think it happens under windows. Is this a known problem, or something I'm
> doing wrong with
> Swing? My apologies if sending images to the list is taboo, but it's the
> best way to show what
> is happening.

Noticed it many times. Try resizing the window after a few seconds. Looks
like race condition to me, too. Perhaps someone can comment...

Milek
Ps. It happens under Windows, too.
-- 
mailto:[EMAIL PROTECTED]   |  "Man in the Moon and other weird things" -
http://wfmh.org.pl/~thorgal/  |  see it at http://wfmh.org.pl/~thorgal/Moon/
 Fight for the good cause: http://www.laubzega.com/dvd/


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




RE: Messed up swing windows

2001-02-08 Thread Martin, Stephen

I have a situation right now where I am experienceing it more often than not
when
trying to bring up a JOptionPane. I've tried a number of things, such as
making sure that
I do in the SwingEvent Thread, making sure I do it not in the Swing event
thread, calling yield
before i create the dialog, all with the same result.

I then switch to the IBM 1.3 jdk and have not experienced the problem. I
thought that this might
indicate that hotspot is to blame so I went back to the Blackdown jdk and
tried it with -Djava.compiler=none
but it still happens.

> -Original Message-
> From: Miloslaw Smyk [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 08, 2001 2:57 PM
> To: Martin, Stephen; [EMAIL PROTECTED]
> Subject: Re: Messed up swing windows
> 
> 
> "Martin, Stephen" wrote:
> > 
> > I often have a problem where my Swing windows get created 
> messed up. I've
> > attached
> > a couple of gifs to show what I mean. This usually (if not 
> always) happens
> > with a
> > frame or dialog is being created and is not 100% 
> reproducible. My guess
> > would be that
> > it is the result of a race condition but I have no idea how 
> to work around
> > it. My solution
> > to date is to simply kill that application and start it 
> again. It happens
> > under both the
> > latest Blackdown and Sun 1.3 jdks (and all other JDKs in 
> the last 6 months
> > or so). I don't
> > think it happens under windows. Is this a known problem, or 
> something I'm
> > doing wrong with
> > Swing? My apologies if sending images to the list is taboo, 
> but it's the
> > best way to show what
> > is happening.
> 
> Noticed it many times. Try resizing the window after a few 
> seconds. Looks
> like race condition to me, too. Perhaps someone can comment...
> 
> Milek
> Ps. It happens under Windows, too.
> -- 
> mailto:[EMAIL PROTECTED]   |  "Man in the Moon and other 
> weird things" -
> http://wfmh.org.pl/~thorgal/  |  see it at 
> http://wfmh.org.pl/~thorgal/Moon/
>  Fight for the good cause: http://www.laubzega.com/dvd/
> 
> 
> --
> 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: Messed up swing windows

2001-02-08 Thread Robert S Laramee


> > I often have a problem where my Swing windows get created messed up. I've
> > attached
> > a couple of gifs to show what I mean. This usually (if not always) happens
> > with a
> > frame or dialog is being created and is not 100% reproducible. My guess
> > would be that
> > it is the result of a race condition but I have no idea how to work around
> > it. My solution
> > to date is to simply kill that application and start it again. It happens
> > under both the
> > latest Blackdown and Sun 1.3 jdks (and all other JDKs in the last 6 months
> > or so). I don't
> > think it happens under windows. Is this a known problem, or something I'm
> > doing wrong with
> > Swing? My apologies if sending images to the list is taboo, but it's the
> > best way to show what
> > is happening.
>
> Noticed it many times. Try resizing the window after a few seconds. Looks
> like race condition to me, too. Perhaps someone can comment...
>
> Milek
> Ps. It happens under Windows, too.

Make sure you are not mixing up light weight and heavy weight Java
components.  There's a tutorial on this from www.javasoft.com

-cheers, bob

Robert S Larameetel:(603) 868-1361
9 Woodman Road, #314office: (603) 862-4336 (new office # as of 11 Jan '01)
Durham, NH 03824URL:   http://www.cs.unh.edu/~rlaramee


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




RE: Messed up swing windows

2001-02-08 Thread Joi Ellis

On Thu, 8 Feb 2001, Martin, Stephen wrote:

> I have a situation right now where I am experienceing it more often than not
> when
> trying to bring up a JOptionPane. I've tried a number of things, such as
> making sure that
> I do in the SwingEvent Thread, making sure I do it not in the Swing event
> thread, calling yield
> before i create the dialog, all with the same result.
> 
> I then switch to the IBM 1.3 jdk and have not experienced the problem. I
> thought that this might
> indicate that hotspot is to blame so I went back to the Blackdown jdk and
> tried it with -Djava.compiler=none
> but it still happens.

I am a linux geek and I regularly see this sort of behavior in apps
written by inexperienced Java developers running windows.   It seems that
the heavyweight peers behave differently between *nix and Windows.  Some
actions which are separate method calls in Java are hardcoded in Windows 
peers.

For instance, the action of de-iconifying a window does NOT automatically
bring that window to top in a *nix window manager, so the method must be
called to force it to the top.  On Windows, de-iconifying a window 
brings it to the top automatically. 

So, many Java apps developed on Windows and not tested on *nix will
behave oddly because necessary Java calls were not made.

Generally, when I see a window misbehaving as yours are, I start looking for
a missing call to pack() or validate() or invalidate() or whatever.
Inserting those where they are needed generally makes my dialogs behave
on all platforms, not just Windows.

I don't know that this is the issue you're having, but it's where I
start looking.

-- 
Joi EllisSoftware Engineer
Aravox Technologies  [EMAIL PROTECTED], [EMAIL PROTECTED]

No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried.  Anything
that kicks a monopoly in the pants has got to be good for something.
   - Chris Johnson


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




Thread.yield() on 2.4

2001-02-08 Thread Joseph Shraibman

Is it just me or does Thread.yield() not work anymore with the 2.4.0
kernel?


-- 
Joseph Shraibman
[EMAIL PROTECTED]
Increase signal to noise ratio.  http://www.targabot.com


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




Re: Thread.yield() on 2.4

2001-02-08 Thread Dimitris Vyzovitis

On Thu, 8 Feb 2001, Joseph Shraibman wrote:

> Is it just me or does Thread.yield() not work anymore with the 2.4.0
> kernel?

Works fine for me (kernel 2.4.1, ibm jdk-1.3 build cx130-2815). Use the 
attached file for a quick test. 

-- dimitris
   mailto:[EMAIL PROTECTED]


public class test_yield implements Runnable {

int when_;
int run_;

test_yield( int when ) { when_ = when; }
 
public void run() {
while( true ) {
run_++;
for ( int i = 0; i < when_; i++ );
Thread.currentThread().yield();
}
}

public static void main( String[] args ) {
int when = args.length > 0 ? Integer.parseInt( args[0] ) : 1;
test_yield t1,t2,t3;
new Thread( t1 = new test_yield( when ) ).start();
new Thread( t2 = new test_yield( when ) ).start();
new Thread( t3 = new test_yield( when ) ).start();

while( true ) try {
Thread.currentThread().sleep( 1000 );
int c1 = t1.run_;
int c2 = t2.run_;
int c3 = t3.run_;
System.out.println( "t1: " + c1 + " t2: " + c2 + " t3: " + c3 );
} catch ( InterruptedException exc ){}

}

}