Thread in the Linux's JVM

1999-11-08 Thread Evandro Luquini
Title: Thread in the Linux's JVM





Hi,
In the JavaWord article called "programming Java threads in the real world, Part 1( http://www.javaworld.com/jw-09-1998/jw-09-threads.html)", the author sad that "Java's promise of platform independence falls flat on its face in the threads arena". If you read this paper you will can see two plataform example : NT and Solaris.

Major question is what scheduling is implemented by the Linux JVM and the Linux OS. Does it use a nonpreemptive our preemptive scheduler ? 

The other important question is about what thread's architecture is implement by Linux O.S. I am asking it because in the sun's paper "Multithreading: General And Java-Specific Information (http://www.sun.com/solaris/java/wp-java/4.html;$sessionid$5CBVN2YAAI4VTAMW0JZE3NUBS1JHEUDO)" sad : "Understanding the architectural advantages of one native MT environment/architecture over another is critical to an understanding of the advantages of one Java implementation over another. Since a typical JVM runtime is implemented on top of the traditional platform, a richer, architecturally superior MT platform will obviously translate to a superior Java MT environment for Java applications on that platform. The native OS threads model greatly influences Java application performance."

Thanks









Thread in the Linux's JVM

1999-11-08 Thread Evandro Luquini
Title: Thread in the Linux's JVM





Hi,
In the JavaWord article called "programming Java threads in the real world, Part 1( http://www.javaworld.com/jw-09-1998/jw-09-threads.html)", the author sad that "Java's promise of platform independence falls flat on its face in the threads arena". If you read this paper you will can see two plataform example : NT and Solaris.

Major question is what scheduling is implemented by the Linux JVM and the Linux OS. Does it use a collaborative our preemptive scheduler ? 

The other important question is about what thread's architecture is implement by Linux O.S. I am asking it because in the sun's paper "Multithreading: General And Java-Specific Information (http://www.sun.com/solaris/java/wp-java/4.html;$sessionid$5CBVN2YAAI4VTAMW0JZE3NUBS1JHEUDO)" sad : "Understanding the architectural advantages of one native MT environment/architecture over another is critical to an understanding of the advantages of one Java implementation over another. Since a typical JVM runtime is implemented on top of the traditional platform, a richer, architecturally superior MT platform will obviously translate to a superior Java MT environment for Java applications on that platform. The native OS threads model greatly influences Java application performance."

Thanks





Re: Version for GlibC

1999-11-08 Thread Oliver Fels

> How do you find what glibc2.x version you have?
As you mentioned, look at your SuSE distribution ;)

> 
> I couldn't answer it satisfactorily when asked me this morning. 
> ( I haven't downloaded JDK pre 1.2 release yet, because 1.1.7v1a
> works perfectly fin on SuSE Linux 6.1 which I assume is glibc2.0 anyway.)

Yes: 
   6.0 is (still) libc5, 
   6.1 is glibc2.0 and 
   6.2 is based on glibc2.1, 
though the old libs are still delivered for backward compatability.
This works in most cases, not  in all, best example is Oracle 8.15i 
which needs a patch to work under SuSE 6.2 with glibc 2.1.

Oliver

___
Oliver Fels| e-mail: 
IQena GmbH | [EMAIL PROTECTED]
Team Manager JAVA-/IT-Security | http://www.iqena.com
Friedrichshafen, Germany   | 
---


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



Re: Version for GlibC

1999-11-08 Thread Peter Pilgrim



[EMAIL PROTECTED] wrote:
> 
> > How do you find what glibc2.x version you have?
> As you mentioned, look at your SuSE distribution ;)
> 
> >
> > I couldn't answer it satisfactorily when asked me this morning.
> > ( I haven't downloaded JDK pre 1.2 release yet, because 1.1.7v1a
> > works perfectly fin on SuSE Linux 6.1 which I assume is glibc2.0 anyway.)
> 
> Yes:
>6.0 is (still) libc5,
>6.1 is glibc2.0 and
>6.2 is based on glibc2.1,
> though the old libs are still delivered for backward compatability.
> This works in most cases, not  in all, best example is Oracle 8.15i
> which needs a patch to work under SuSE 6.2 with glibc 2.1.
> 
> Oliver

This is quite confusing because there is no way or knowing for sure.
You can't type a command or do on `/bin/ls -l /usr/lib/libc*'.
First thing I did, was get the original 6.1 box from the upstair cupboard,
but there is nothing there that says any like glibc2.0. I bet this is
massively confusing to new user. Steve better write a little utility
to do this for next JDK1.2 release.

Oh well...

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]



Visibroker - Java - Linux

1999-11-08 Thread Luis Claudio Santos






Hello,
    
    I download the 
Visibroker for Java 3.4 (linux version) from  http://www.inprise.com/downloads/.
    I'm using Linux RH 
5.2 and JDK1.1.7.
 
    I follow the instructions for 
instalation but, when I try some commands, I get:
 
[root@lc bin]# oadj 
-helpISO-8859-1: unknown locale[root@lc bin]# 
java2idlISO-8859-1: unknown 
locale 
What's happening?
Can anybody help me, please?
 
    Best regards :-)
    -Claudio.


Re: Version for GlibC

1999-11-08 Thread ermirza erekose


do rpm -qa | grep glib


On Mon, 8 Nov 1999, Peter Pilgrim wrote:

> Quick GlibC Question?
> 
> How do you find what glibc2.x version you have?
> 
> I couldn't answer it satisfactorily when asked me this morning. 
> ( I haven't downloaded JDK pre 1.2 release yet, because 1.1.7v1a
> works perfectly fin on SuSE Linux 6.1 which I assume is glibc2.0 anyway.)
> 
> -- 
> 
> 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]
> 
> 


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



Re: Security (was Re: policytool)

1999-11-08 Thread Joseph Shraibman

Hmm.  Well the program that gave me the security exception WAS an RMI
program, and one of the exceptions what for not having permissions to
resolv/connect to a host, but I also got a security exception when trying
to open a file.

Nelson Minar wrote:

> This list is full of stuff that's not Linux specific.
>
> >>>applications do not make use of the java.policy file per default in
> >>>the Linux 1.2 version.
>
> RMI is an exception to this rule. Since Java 1.1, RMI has required a
> security policy of some sort because it can load remote classes by
> default. In Java2, you have to have the right policy file to make RMI
> work. See the rmi-users list and RMI documentation for more info.
>
>   [EMAIL PROTECTED]
> .   .  . ..   .  . . http://www.media.mit.edu/~nelson/
>
> --
> 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]



Any EJB Server for Linux?

1999-11-08 Thread sgee

Are there any EJB Server for Linux currently Available.

Thanks
_
Steve Gee
Certified Java Programmer
Maxor National Pharmacies
Information Technologies

[EMAIL PROTECTED]
806.324.5540
www.maxor.com
806.324.5400


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



Re: Version for GlibC

1999-11-08 Thread Andreas Jaeger

> Peter Pilgrim writes:

 > Quick GlibC Question?
 > How do you find what glibc2.x version you have?

/lib/libc.so - if you get a segmentation fault, it's glibc 2.0.7;-)

For example:
$ /lib/libc.so.6 
GNU C Library stable release version 2.1.2, by Roland McGrath et al.
[...]

 > I couldn't answer it satisfactorily when asked me this morning. 
 > ( I haven't downloaded JDK pre 1.2 release yet, because 1.1.7v1a
 > works perfectly fin on SuSE Linux 6.1 which I assume is glibc2.0 anyway.)
6.1 comes with 2.0.7

Andreas
-- 
 Andreas Jaeger   
  SuSE Labs [EMAIL PROTECTED]  
   private [EMAIL PROTECTED]


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



easy question

1999-11-08 Thread Solomon Douglas

I apologize that this isn't a specifically Linux-related question.

I'm working on a project involving several servlets and other classes,
organized in multiple java packages, and I don't think I've figured
out the ideal way to structure my directories.  This is a web-based
application, so in addition to the server-side Java classes, I also
have HTML and javascript files to deal with.  Thank goodness there are
no applets (yet), because that would make it even more confusing!  I
have the following files:

- Java source code files and their associated RCS files
- C source code (and RCS) for JNI methods
- the development version of the shared libraries for the JNI methods
- the production version of the shared libraries for the JNI methods
- the development version of the Java class files
- the production version of the Java class files
- static HTML and JavaScript source files (development version and RCS)
- static HTML and JavaScript source files (production version)

How does one set up the directory structure for such a project?  The
class files evidently need to be in a directory hierarchy that mirrors
the package hierarchy.  I feel that I need the Java source files to be
in a similar hierarchy - should it be a parallel tree or should I keep
the sources in the same directories as the development versions of
their corresponding classes?  If I don't keep the .class files in the
same directories as their .java files, do I need to "mv" them after
compiling or can I convince javac to understand my CLASSPATH and put
the .class files in the right place?

Thanks in advance,

Solomon


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



Re:Any EJB Server for Linux?

1999-11-08 Thread Steve Nguyen

Check out www.orionserver.com. It is not free BTW. EJB server should be 100% java 
anyway so as long as it run on other platform, it should work in Linux well.

Steve Nguyen
[EMAIL PROTECTED]
C.E.O.
KBMail Software & Java Hosting Service Provider
http://www.kbmail.com
http://www.ebpcs.net

"Plan - Do - Review --> Success"

 Original message 
From: [EMAIL PROTECTED]
Subject: Any EJB Server for Linux?
To: [EMAIL PROTECTED]
Date: Mon, 08 Nov 1999 16:47:37 GMT
--

Are there any EJB Server for Linux currently Available.

Thanks
_
Steve Gee
Certified Java Programmer
Maxor National Pharmacies
Information Technologies

[EMAIL PROTECTED]
806.324.5540
www.maxor.com
806.324.5400


--
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: Any EJB Server for Linux?

1999-11-08 Thread Shawn McKisson

All of the EJB servers I have seen are written in Java.
So, the answer is yes - all of them.

--shawn

[EMAIL PROTECTED] wrote:
> 
> Are there any EJB Server for Linux currently Available.
> 
> Thanks
> _
> Steve Gee
> Certified Java Programmer
> Maxor National Pharmacies
> Information Technologies
> 
> [EMAIL PROTECTED]
> 806.324.5540
> www.maxor.com
> 806.324.5400
> 
> --
> 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]



jdk version

1999-11-08 Thread Raj Patel

Hi everybody,
I have a java-swing application that runs
fine with jdk117_v3 but now i need to compile and run under jdk1.2
pre-v2 and it gives runtime Exception under jdk1.2 as follows,

Exception occurred during event dispatching:
java.lang.IndexOutOfBoundsException: -1
at java.util.BitSet.get(Compiled Code)
at javax.swing.DefaultListSelectionModel.clear(Compiled Code)
at javax.swing.DefaultListSelectionModel.setState(Compiled Code)

at
javax.swing.DefaultListSelectionModel.removeIndexInterval(Compiled Code)

at
javax.swing.plaf.basic.BasicListUI$ListDataHandler.intervalRemoved(Compiled
Code)
at javax.swing.AbstractListModel.fireIntervalRemoved(Compiled
Code)
at javax.swing.DefaultComboBoxModel.removeAllElements(Compiled
Code)
at javax.swing.JComboBox.removeAllItems(Compiled Code)
at Fsa.refreshAttrCombo(Compiled Code)
at Fsa.addAttributes(Compiled Code)
at Fsa.createComponents(Compiled Code)
at Question$2.actionPerformed(Compiled Code)
at javax.swing.AbstractButton.fireActionPerformed(Compiled Code)

at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Compiled
Code)
at javax.swing.DefaultButtonModel.fireActionPerformed(Compiled
Code)
at javax.swing.DefaultButtonModel.setPressed(Compiled Code)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Compiled Code)
at java.awt.Component.processMouseEvent(Compiled Code)
at java.awt.Component.processEvent(Compiled Code)
at java.awt.Container.processEvent(Compiled Code)
at java.awt.Component.dispatchEventImpl(Compiled Code)
at java.awt.Container.dispatchEventImpl(Compiled Code)
at java.awt.Component.dispatchEvent(Compiled Code)
at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled
Code)
at java.awt.LightweightDispatcher.processMouseEvent(Compiled
Code)
at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code)
at java.awt.Container.dispatchEventImpl(Compiled Code)
at java.awt.Window.dispatchEventImpl(Compiled Code)
at java.awt.Component.dispatchEvent(Compiled Code)
at java.awt.EventQueue.dispatchEvent(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)

Can anybody tell.. do i need to do anything special to make it work
under jdk1.2 or it's a problem with blackdown jdk version.

-Raj


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



code question

1999-11-08 Thread Yohans Mendoza

hi all,

can someone tell me how can I get the system time and date with java?

TIA

--Yohans

~
Yohans Mendoza  Unix Administrator
[EMAIL PROTECTED]Sirius Images Inc.  
http://www2.utep.edu/~yohanshttp://www.sirius-images.net 
~


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



Re: Thread in the Linux's JVM

1999-11-08 Thread Jacob Nikom

Hi,

Thank you for bringing up this question. I also have problems with
multiple threads in Linux. In my case the behavior of threads with
JNI is different from pure Java behavior.

I use SwingWorker class. If I don't have JNI methods I don't have
to use yield() method. If I replace my Java methods with JNI calls
I must use yield(), otherwise the application simply does not work.
There is no mentioning of yield() method in any SwingWorker-related
documentation.

It would be nice to know more about multithreading features of Linux
JVM.

Jacob Nikom

> Evandro Luquini wrote:
> 
> Hi,
> In the JavaWord article called "programming Java threads in the real
> world, Part 1(
> http://www.javaworld.com/jw-09-1998/jw-09-threads.html)", the author
> sad that "Java's promise of platform independence falls flat on its
> face in the threads arena". If you read this paper you will can see
> two plataform example : NT and Solaris.
> 
> Major question is what scheduling is implemented by the Linux JVM and
> the Linux OS. Does it use a nonpreemptive our preemptive scheduler ?
> 
> The other important question is about what thread's architecture is
> implement by Linux O.S. I am asking it because in the sun's paper
> "Multithreading: General And Java-Specific Information
> 
>(http://www.sun.com/solaris/java/wp-java/4.html;$sessionid$5CBVN2YAAI4VTAMW0JZE3NUBS1JHEUDO)"
> sad : "Understanding the architectural advantages of one native MT
> environment/architecture over another is critical to an understanding
> of the advantages of one Java implementation over another. Since a
> typical JVM runtime is implemented on top of the traditional platform,
> a richer, architecturally superior MT platform will obviously
> translate to a superior Java MT environment for Java applications on
> that platform. The native OS threads model greatly influences Java
> application performance."
> 
> Thanks


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



silly newbie question

1999-11-08 Thread Jalaluddin Riaz

pardon me for this silly question, but i have to know. How do i set multiple 
classpaths? i have jdk1.2pre2 running and want to do some stuff with 
servlets and jdbc. the jdbc is fine for applets and applications but with 
not woth servlets. i use 'javac -classpath /path/servlet.jar . this 
didnot help. when i put everything in classpath bash env variable, jdk 
complains noClassdefFoundError.

what do i do?,..

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



Re: Thread in the Linux's JVM

1999-11-08 Thread Artur Biesiadowski

Jacob Nikom wrote:

> I use SwingWorker class. If I don't have JNI methods I don't have
> to use yield() method. If I replace my Java methods with JNI calls
> I must use yield(), otherwise the application simply does not work.
> There is no mentioning of yield() method in any SwingWorker-related
> documentation.

You should not depend on threads being preemtive. Just suppose that
thread will switch ONLY when you sleep/yield/block and see if you
program can accomplish it's tasks. All this stuff with preemptivnes is
only important when you have to run some not fully trusted code - for
example applets or servlets, you have to be able to kill runaway thread.
In other cases one can really go away with cooperative threads (of
course good programs has to be written for worst case at every point -
a) that thread will never switch unless explicitly told to, b) thread
will switch at every possible point it can do something bad :)

Artur


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



Re: Thread in the Linux's JVM

1999-11-08 Thread Nathan Meyers

Jacob Nikom wrote:

> It would be nice to know more about multithreading features of Linux
> JVM.

There are two threading models. If you run with green threads, there is
no preemption, and control passes between threads either with yield()
calls or possibly with other calls that can block (such as sleep() and
various I/O calls).

If you run with native threads, the JVM is using the system's pthread
API, which (except for very strangely configured systems) means it's
using kernel threads. They give you preemption but not thread
priorities, and there is no guarantee about the size of the time slices,
when preemption occurs, or how thread execution is distributed across
multiple processors.

It sounds from your description like you're relying on preemption.
Unfortunately, that's a bad thing - Java doesn't guarantee that you'll
get it, and you need to code as if preemption will not happen.
SwingWorker is a nice tool for conveniently launching another thread,
but it doesn't magically turn non-preemptive threads into preemptive
threads.

So to your problem... why did the behavior change when you rewrote some
of your Java methods as native methods? My guess is that you were using
some Java methods that do voluntary yields, and you stopped using them
when you rewrote the code as native methods.

BTW, that Sun article mentioned in Evandro's original mail (below)
discusses why Solaris is a good platform for applications that rely on
preemptive multi-threading. But it's a Solaris marketing article, not a
Java programming guide. The Java portability message is very clear:
don't rely on preemption. 



Nathan

> 
> Hi,
> 
> Thank you for bringing up this question. I also have problems with
> multiple threads in Linux. In my case the behavior of threads with
> JNI is different from pure Java behavior.
> 
> I use SwingWorker class. If I don't have JNI methods I don't have
> to use yield() method. If I replace my Java methods with JNI calls
> I must use yield(), otherwise the application simply does not work.
> There is no mentioning of yield() method in any SwingWorker-related
> documentation.
> 
> It would be nice to know more about multithreading features of Linux
> JVM.
> 
> Jacob Nikom
> 
> > Evandro Luquini wrote:
> >
> > Hi,
> > In the JavaWord article called "programming Java threads in the real
> > world, Part 1(
> > http://www.javaworld.com/jw-09-1998/jw-09-threads.html)", the author
> > sad that "Java's promise of platform independence falls flat on its
> > face in the threads arena". If you read this paper you will can see
> > two plataform example : NT and Solaris.
> >
> > Major question is what scheduling is implemented by the Linux JVM and
> > the Linux OS. Does it use a nonpreemptive our preemptive scheduler ?
> >
> > The other important question is about what thread's architecture is
> > implement by Linux O.S. I am asking it because in the sun's paper
> > "Multithreading: General And Java-Specific Information
> > 
>(http://www.sun.com/solaris/java/wp-java/4.html;$sessionid$5CBVN2YAAI4VTAMW0JZE3NUBS1JHEUDO)"
> > sad : "Understanding the architectural advantages of one native MT
> > environment/architecture over another is critical to an understanding
> > of the advantages of one Java implementation over another. Since a
> > typical JVM runtime is implemented on top of the traditional platform,
> > a richer, architecturally superior MT platform will obviously
> > translate to a superior Java MT environment for Java applications on
> > that platform. The native OS threads model greatly influences Java
> > application performance."
> >
> > Thanks
> 
> --
> 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: ¦^ÂÐ : Question

1999-11-08 Thread James Seigel

You need to specify the jar in the applet tag as well #:)

DD23 CCChang2 wrote:

> > Hi James :
> > Thanks for your reply, but I still got the problem:
> > My HTML code releate to Applet:
> >> CODEBASE="http://10.3.13.19/~jonesc"
> > WIDTH=600 HEIGHT=250>
> >   
> > I had put my OutputApplet.class & postgresql.jar in same directory.
> > and PostgreSql database & Apache Server on same machine (Linux Redhat
> > 6.0).
> >
> > 1. When I use IE4.0 from Micro$oft Win95, I got the message in applet
> > window:
> > "Can't find Database driver class: java.lang.ClassNotFoundException:
> > postgresql/Driver"
> > 2. When I goto the same linux machine, use netscape browser, I got the
> > same error reply.
> > 3. But on this machine, I use appletviewer index.html, the applet can
> > success got data through
> > JDBC to Postgresql database.
> >
> >
> >   --
> >   :   James Seigel [SMTP:[EMAIL PROTECTED]]
> >
> >   :   DD23 CCChang2
> >   :   [EMAIL PROTECTED]
> >   :   Re: Question
> >
> >   Check your applet tag for codebase tag
> >   Check to make sure your datbase driver is available in the directory
> > where
> >   your codebase is implied.
> >   Make sure you database is on the same machine as the applet is
> > loaded
> >   from.
> >
> >
> >   3 is for after you fix the first two.
> >
> >   J
> >
> >   Pooh Bear -- "I am just a bear of little brain"
> >
> >
> >   On Thu, 4 Nov 1999, DD23 CCChang2 wrote:
> >
> >   >
> >   > > Dear Sirs:
> >   > > I am junior JAVA programmer, one question need your help.
> >   > > I had RedHat Linux 6.0 with Java 1.2 SDK and PostgreSQL
> > database,
> >   > > and my web server is Apache 1.3.6 version.
> >   > > I had copy the postgresql.jar into /jdk1.2/jre/lib/ext.
> >   > >
> >   > > then, I wrote an applet just query the data from PostgreSql
> > database,
> >   > > and show the result on screen, then created the test.html file,
> >   > > and include the class , when I use appletviewer test.html, I can
> > see
> >   > > the data everything is OK,
> >   > >
> >   > > but when I put the html on my web, then I can see the applet
> > area show
> >   > > "Can't find Database Driver .. postgresql.drive"
> >   > > It's anything Linux envirounment setting error?
> >   > > Tks!
> >   > >
> >   > > Jones Chang
> >   > >
> >   >
> >   >
> >   >
> > --
> >   > 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]
>
> --
> 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]



[Q] problem with displaying image

1999-11-08 Thread Eric Chao

Hi, everyone, I am currently writing a Java program that displays an
image constructed from MemoryImageSource.  I start out by displaying the
"portrait" orientation of the image and have one button for the user to
toggle between "portrait" and "landscape" orientation.  The problem is
that when the program starts out in "portrait" orientation, I cannot
switch to "landscape". The only way I can display the image in
"landscape" orientation is to start out the program by displaying  using
"landscape" orientation.

Did anyone have this problem before? I'm using JDK 1.1.7 v3 (Black-down)
under RedHat 6.0.

Eric


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



Re: silly newbie question

1999-11-08 Thread Jacob Nikom

Use JAVA_HOME environment variable and assign your classpath to it.

Jacob Nikom

Jalaluddin Riaz wrote:
> 
> pardon me for this silly question, but i have to know. How do i set multiple
> classpaths? i have jdk1.2pre2 running and want to do some stuff with
> servlets and jdbc. the jdbc is fine for applets and applications but with
> not woth servlets. i use 'javac -classpath /path/servlet.jar . this
> didnot help. when i put everything in classpath bash env variable, jdk
> complains noClassdefFoundError.
> 
> what do i do?,..
> 
> __
> 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]


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



Re: easy question

1999-11-08 Thread Ted Neward

Wow, are *you* in for a mess. :)

OK--this is just a suggestion, and half this stuff is being made up on the
spot, but this is how I'd structure your directory. Assume your project is
called "Project"

Project
+--src
+--cls
These two are your Java "source" and "class" directories, respectively.
Assuming you're building with Java 2, you can do the following quickie
script to build all the java code in the 'src' directory (from the project
root) and have the compiled .class files show up in the 'cls' directory:

(where $(PROJECT_HOME) = the "project root" directory)
find $(PROJECT_HOME) -name '*.java' -print > $(PROJECT_HOME)/.sourcefiles
javac -srcpath $(PROJECT_HOME)/src -d $(PROJECT_HOME)/cls
@$(PROJECT_HOME)/.sourcefiles

Add a $(DEBUG) or other flags-type environment variable to switch
debug/nondebug modes on or off; I'd put this into a makefile that also
controls the JNI/C compilation (discussed in a second). This script doesn't
perform full dependency-checking, so you'll probably want to do a 'rm -r
*.class' from the $(PROJECT_HOME) directory, but it's quick and dirty and
doesn't require .java-file dependency tracking, at the cost of longer
compiles. Adjust as necessary for your own needs.

Then, under the same directory, do

Project
+--c_src
+--inc

This is, of course, where the JNI/C code goes, and the JNI headers go into
the $(PROJECT_HOME)/inc (or 'include', if you prefer) directory. Depending
on what #include syntax you prefer (I like '#include <$(PROJECT)/file.h>',
as opposed to just '#include "file.h"', so I know where each include file is
coming from), you can rename the 'inc' directory to $(PROJECT) and set the
compiler's "-I $(PROJECT_HOME)" flag. That way your JNI/C code is explicitly
documenting where it's getting the JNI headers from. Do the usual
make/makedeps with this, either in the same makefile that handles the java
code (ideally), or in a makefile that's fired from the java project's
makefile.

For the HTML/JavaScript code, I'd do

Project
+--public_html
 +--cgi_bin  javascript

I'm less familiar with how to arrange HTML files in a source-controlled
project, since I've not done much with them recently, but since HTML
requires no compilation, you're really just trying to create the appropriate
HTML structure here, nothing more.

For debug/release deployment, I'd set up your makefile/build-script to
compile everything, with $(DEBUG) flags turned on or off (depending on
whether you do 'make -DDEBUG' or not, for example), and have the generated
executables, .jar files and .zip (of the HTML files) files "released" (that
is, copied) to one of two directories in the same project directory:

Project
+--alpha
+--release

Ideally, you'd be able to then run a script from within each directory to
"deploy" the code (to a Web server or simply to another location on your
filesystem) as appropriate.

As far as RCS goes, either just store the files in a separate location, or
use CVS (my preference) and store them on another server--it doesn't affect
how the files themselves are laid out on disk, IMHO.

It's rough, crude, and could probably use several iterations of refinement.
I *more* than welcome comments--I'd love to hear anybody's ideas on so
complex an application of "proper build procedures".

Ted Neward
CTO, WebRaiser ( http://www.webraiser.com )
Java Instructor, DevelopMentor ( http://www.develop.com )
Patterns/C++/Java/CORBA/EJB/COM-DCOM spoken here
http://www.javageeks.com/~tneward


-Original Message-
From: Solomon Douglas <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Cc: David Harrison <[EMAIL PROTECTED]>
Date: Monday, November 08, 1999 11:42 AM
Subject: easy question


>I apologize that this isn't a specifically Linux-related question.
>
>I'm working on a project involving several servlets and other classes,
>organized in multiple java packages, and I don't think I've figured
>out the ideal way to structure my directories.  This is a web-based
>application, so in addition to the server-side Java classes, I also
>have HTML and javascript files to deal with.  Thank goodness there are
>no applets (yet), because that would make it even more confusing!  I
>have the following files:
>
>- Java source code files and their associated RCS files
>- C source code (and RCS) for JNI methods
>- the development version of the shared libraries for the JNI methods
>- the production version of the shared libraries for the JNI methods
>- the development version of the Java class files
>- the production version of the Java class files
>- static HTML and JavaScript source files (development version and RCS)
>- static HTML and JavaScript source files (production version)
>
>How does one set up the directory structure for such a project?  The
>class files evidently need to be in a directory hierarchy that mirrors
>the package hierarchy.  I feel that I need the Java source files to be
>in a similar hierarchy - should it be a parallel tree or should I keep
>the sources in the sam