Re: jdk linux licensing

1999-10-28 Thread Martin Schröder

On 1999-10-27 12:46:44 -0700, Ruchir Tewari wrote:
> Can the blackdown linux jdk be shipped with a product ?

The 1.1.x versions can be shipped; of the 1.2.x versions only the
jre can be shipped since the jdk is still beta.

Just read the LICENSE files.

Best regards
   Martin
-- 
  Martin Schröder, [EMAIL PROTECTED]
ArtCom GmbH, Grazer Straße 8, D-28359 Bremen
   Voice +49 421 20419-44 / Fax +49 421 20419-10

 PGP signature


Re: RMI and ClassFormatException

1999-10-28 Thread Uncle George

Is the pgm avail on-line ?
gat

Paul Grepps wrote:

> Hello,
>
> I'm trying the WeatherServer RMI example out of the "Just Java 2" book
> and I'm getting the following exception.
> I




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



Re: Broken pipe error

1999-10-28 Thread John Rousseau


On Wednesday Oct 27, 1999, Timothy Owen Reilly wrote:

> My servlets use formatting templates which output HTML to the browser. 
> Unfortunately, I get a broken pipe exception right after they're done
> outputting their HTML.  What I don't get is that this happens right AFTER they
> are done.  There is a function that does the following:
> 
> public void outputHTML( Some parameters) {
>   try {
>   //Output lots of HTML, then end with
>   out.println("");
>   } catch (Exception E) {
>   //This is where the exception is caught
>   }
> }
> 
> The thing which confuses me is that the exception is triggered after all the
> HTML is output.  Both the  and  tags make it out to the 
> browser, but a Broken pipe exception is triggered immediately thereafter such
> that it is caught just below this line.
> 
> Can anyone please suggest how to fix this?

Is the browser closing the connection? Are you sending the
appropriate keep-alive headers to the browser (HTTP version
dependent)?

-John


John Rousseau   [EMAIL PROTECTED]
SilverStream Software   
1 Burlington WoodsPhone: +1 781 238 5564
Burlington, MA 01803Fax: +1 781 238 5499



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



Problems with an external library which use pthread

1999-10-28 Thread Stephane Letz

Hi,

I'm trying to port a C library  which use pthread with the Blackdown JDK
1.1.7 on Linux.

The  C library is linked with the JVM using JNI. This works correctly.

One of the function of the C library create a new thread using the
pthread_create (of the pthread library).

The external library is compiled as a shared library and linked with the
pthread library. it works correctly when used from an C or C++ program.

But when used with Java (with green threads),  the  function  crash with a
"segmentation violation" error and the crash seems to occur when the
pthread_create function is executed.

Using Java with native threads does not help and the program hangs before
calling this function.

Is there something special related to the use of pthread functions in a C
library called from Java?

Thanks

Stephane Letz


Grame: Centre National de creation musicale
9, Rue du Garet
69001 Lyon
Tel: 04-72-07-37-00
Fax: 04-72-07-37-01
Web: www.grame.fr



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



GUI Design Question

1999-10-28 Thread Riyad Kalla

Java-Linux,
I've been getting deeper into UserInterface design
recently and have noticed many design issues that I am
comming up against as my interfaces/programs are getting
larger and more complex. And I was hoping maybe some of you
could point me in the right direction.

My GOAL is to be able to break my UserInterface down into
smaller classes that can all be instantiated and used by the
main interface. For example have a ButtonPanel,
NavigationPanel, DisplayPanel and seperate listener classes
for each of those different types of panels. Then have a
UserInterface class that instantiates all of them and builds
the UI. The problems I am running into, as you can imagine,
is getting objects back and forth between these classes
CLEANLY. For an example. Lets say I have these 3 following
classes, one of which is a listener:

/* Class Listener */
public class iHearYou implements ActionListener
{
 actionPerformed( ActionEvent e )
 {
  // Do something complex, create a new graphical
component as a result
  // that needs to be added to the UI.
  }
}

/* Class Panel */
public class controlMe extends JPanel
{
  JButton a = new JButton( "Hi!" );
  iHearYou newEar = new iHearYou();
  a.addActionListener( newEar );
  add( a );
}

/* Class UI */
{
 controlMe S&M = new controlMe();
 getContentPane().add( S&M );
}

No assuming I click that button, which is being contained by
the UI class, that action propogates all the way down to the
action listener, where a new UI components (lets say a
JLabel)  is created, and consequently wants to be added to
my UI WITH a specific layout directive (lets say
BorderLayout.NORTH). some might say "create an add method",
but the problem there that I percieve is lets say I have a
100 buttons that do something different and have to add
there component someplace else depending on many different
variables. Then my generic add() method has to either become
insanely complex or I have to find another way around this.

None the less, how do I cleanly get my object back to the
main UI class and have it be added to the UI?

More importantly, is THIS good design that I have outlined
above? Or should I have the extended JPanel class listening
to itself? I don't like that idea, because it doesn't
inantely seem OOP to me. So I've tried to break things up.
But now I am getting confused about which road to head down.

My goal would to be to create complex user interfaces so
obviously I need to tackle this sooner or later.

--
[  Riyad Kalla  ]
[   [EMAIL PROTECTED]   ]
[   CS - Major  ]
[ University of Arizona ]




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



Re: jdk linux licensing

1999-10-28 Thread Nathan Meyers

On 28 Oct, Martin Schröder wrote:
> On 1999-10-27 12:46:44 -0700, Ruchir Tewari wrote:
>> Can the blackdown linux jdk be shipped with a product ?
> 
> The 1.1.x versions can be shipped; of the 1.2.x versions only the
> jre can be shipped since the jdk is still beta.
> 
> Just read the LICENSE files.

Neither JDK can be redistributed; the license is explicit about that.
You need to make a deal with Sun to get redistribution rights. From
part 1 of the the JDK1.1.7 license:

> Licensee may make one archival copy of the Software
> and may re-distribute complete,  unmodified copies of the Software to
> software developers within Licensee's organization to avoid unnecessary
> download time, provided that this License conspicuously appear with all
> copies of the Software. Except for the foregoing, Licensee may not
> re-distribute the Software in whole or in part, either separately or
> included with a product.

Only the JRE has liberal redistribution terms.

Nathan


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



Re: Problems with an external library which use pthread

1999-10-28 Thread schen

Hi Stephane, everyone,

On Thu, 28 Oct 1999, Stephane Letz wrote:

> I'm trying to port a C library  which use pthread with the Blackdown JDK
> 1.1.7 on Linux.

Bad idea.  All pthread implementations I know of, along with green threads
in the JDK, and native threads, mess around with the signal handlers.  It
would be a big undertaking to make everyone happy.

Your best bet would be to change the pthread code to use native threads,
which is Posix compatible anyway and discard the other pthread library.

. . . Sean.



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



Re: Getting jdk1.2 to run

1999-10-28 Thread Patrick Ohnewein

I have the same problem, now I noticed in my
/usr/jdk1.2pre2/bin/
is no java and no javac file!

there ist only the i386 subdirectory and 2 files named
.java_wrapper
java-rmi.cgi

I have set the PATH, but of course it doesn't help!

Do I have a to old version, I downloaded it some days ago from a mirror,
don't remember which.
Would like to avoid redownload, because I have a very slow internet
connection here!

Thanks for any help, also to Andreas Jäger, who is helping me finding
out the problem, I need some help on linux systems, NEWBIE ;-)

Thanks for any response or comment
Patrick

Jo Uthus wrote:
> 
> Gordon Lindsay wrote:
> 
> | I have unziped into a directory and when i go into the bin
> | directory, and type
> | java or javc or any of the jdk commands, it returns
> | '#bash: javac unknown command'.
> 
> 1. Unpack into something like /usr/local/java/jdk1.2.2-prev2/.
> 2. export PATH=/usr/local/java/jdk1.2.2-prev2/bin/
> 3. [java javac] all the way
> 
> Setting the PATH in a global loginfile (like /etc/profile) would be
> considered a good idea.
> --
> Jo Uthus| e-mail: [EMAIL PROTECTED] (private)
> Software Engineer   | e-mail: [EMAIL PROTECTED]  (work)
> 
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

-- 
-
Save software competition, use Linux and Java!
mailto:[EMAIL PROTECTED]


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



Re: Problems with an external library which use pthread

1999-10-28 Thread Nathan Meyers

Something in this mail sounds like a disconnect. The pthread API
implementation bundled with current Linux releases (it actually comes
as part of glibc) uses the native Linux threading facility... it's what
the JDK itself uses to get native threading.

So I'm not sure what is meant by "change the pthread code to use native
threads". You mean don't use the pthread API and just call Linux'
clone() syscall?

Native apps using the pthread API should be able to play with the
native-thread JDK, but not with the green-thread JDK. That is, unless,
you've somehow latched onto a pthread implementation other than the one
that comes with glibc.

Nathan


On 28 Oct, [EMAIL PROTECTED] wrote:
> Hi Stephane, everyone,
> 
> On Thu, 28 Oct 1999, Stephane Letz wrote:
> 
>> I'm trying to port a C library  which use pthread with the Blackdown JDK
>> 1.1.7 on Linux.
> 
> Bad idea.  All pthread implementations I know of, along with green threads
> in the JDK, and native threads, mess around with the signal handlers.  It
> would be a big undertaking to make everyone happy.
> 
> Your best bet would be to change the pthread code to use native threads,
> which is Posix compatible anyway and discard the other pthread library.
> 
> . . . Sean.
> 
> 
> 
> --
> 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: Problems with an external library which use pthread

1999-10-28 Thread schen

Hi Nathan, everyone,

On Thu, 28 Oct 1999, Nathan Meyers wrote:

> Something in this mail sounds like a disconnect. The pthread API
> implementation bundled with current Linux releases (it actually comes
> as part of glibc) uses the native Linux threading facility... it's what
> the JDK itself uses to get native threading.

We cleared it up off-list.  From his email I thought he was using some
other pthread library because of the way he worded it, but he's using the
glibc pthread just the same as the native JDK.

Evidently the 1.1.7v3 native threading is still a bit broken because his
simple test program doesn't work.  It works on the IBM JDK 1.1.8 but other
problems occur there.

I've pointed him to the the beta JDK 1.2, which has better native
threading.

But in any case, none of the native threads implementations are exactly
mature yet so I'm unsure how much success he will have.

. . . Sean.



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



Re: Java 2D on Linux - font weirdness

1999-10-28 Thread schen

Hi, Robbie, everyone,

On Wed, 27 Oct 1999, Robbie Baldock wrote:

> I'm having a weird problem with a GIF-generating Java 2 app I'm 
> running on Linux.  I'm calling the Java app from a Perl script (don't 
> ask!) with a line like:
> 
> system "java XYZ myarguments";
> 
> When I run this from the command line it works perfectly 
> (generating a graph with text labels in GIF format) but when I run 
> exactly the same script as a CGI script from a web-page it 
> generates the same image but the text is all in a Greek font!
> 
> Obviously, this is something to do with the environment the 
> Perl/Java code is running in.  Has anyone come across anything 
> like this before?

Evidently, your program is accessing fonts through the X server when you
run it normally.  Since the perl/CGI environment doesn't have such access, 
the JVM reverts to whatever fonts it can get to.

That's my best guess at what's happening.  You might want to double check
your font setup there.

One possible solution is to use xvfb, which is a fake X server that can be
accessed by server-side Java programs.

. . . Sean.






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



Re: Getting jdk1.2 to run

1999-10-28 Thread Michael Sinz

On Thu, 28 Oct 1999 18:48:09 +0200, Patrick Ohnewein wrote:

>I have the same problem, now I noticed in my
>/usr/jdk1.2pre2/bin/
>is no java and no javac file!
>
>there ist only the i386 subdirectory and 2 files named
>.java_wrapper
>java-rmi.cgi
>
>I have set the PATH, but of course it doesn't help!

Ahh, when you un-tar'ed that file did you use something other than tar?
java, javac, etc. are all soft-links to the .java_wrapper file and thus
if what you used did not know about soft-links they would not show up.
(For example, any Windows-based tool - such as winzip - would fail to
make the soft-links since Windows does not have such things)


-- 
Michael Sinz  Technology and Engineering Director/Consultant
"Starting Startups" mailto:[EMAIL PROTECTED]
My place on the web ---> http://www.users.fast.net/~michael_sinz



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



Re: Metal Look and Feel with 16 bit color

1999-10-28 Thread Armen Yampolsky



> The AWT doesn't do well with X visuals not matching those found on
> Solaris platforms. In some past discussion on this topic, it came up
> that running the X server at depth 15 (X -bpp 15) creates a visual (5
> bits for each primary) that the AWT seems to like much better.

I have found that setting my display to 15bpp does seem to work fine for the 
jdk1.2pre2, but it still does not work if I run the java app remotely on a Solaris box 
with JDK1.2
(and then setting the display to my 15bpp X Server). Has anyone noticed this sort of 
problem? Any workarounds?

-Armen


> On 27 Oct, Chris LeDantec wrote:
> > We've noticed a problem with the Metal look-and-feel and 16 bit color.
> >
> > Basically, if an X server is set to 16 bit color depth, then applications
> > (specifically NetBeans Developer) will not load the Metal look and feel --
> > subsequently crashing.
> >
> > Is this an issue with the motif libraries that are linked in with java at
> > this time?  If the color depth is set to 8 bit  or 24 or 32 bit then
> > everything works fine, no problems.  It is only an issue that arises with
> > the 16 bit color depth.


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



Re: GUI Design Question

1999-10-28 Thread Patrick Ohnewein

Now I added some code, may be could help, don't know about the quality,
and I didn't compile it ;-) Now I would go in this direction if I would
have ur problem, but I don't know if a desigh pattern exists for this
sort of problem. By sure I wouldn't integrate the ActionListener into
the JPanel, by sure not
class XX extends JPanel implements ActionListener

Only alternative could be to make an innerclass of JPanel implement the
interface.

About the actionListener, u could use Action instead, is more powerfull!

Hope I could help a little
Patrick

p.s. I guess this is the wrong mailing list for this questions, check
out some others may be

 [EMAIL PROTECTED]

could be more adequate.

Riyad Kalla wrote:
and Patrick added ;-)

/**
 * This has to be an interface, because you cannot extend all component
classes?
 */
public interface ConstraintsComponent
{
/**
 * Provide the component to be added.
 */
Component getComponent();

/**
 * Provides the constraints for the passed LayoutManager,
 * which should be used adding the provided component.
 */
Object getConstraintsForLayout(LayoutManager lm);
}

public interface TargetProvider
{
Container getTarget();
}

> /* Class Listener */
> public class iHearYou implements ActionListener
> {
private TargetProvider targetProvider;

public iHereYou(TargetProvider targetProvider)
{
super();
this.targetProvider = targetProvider;
}

protected ConstraintComponent createComponent()
{
return new ConstraintsComponent() {
public Component getComponent()
{
return new JLabel();
}

public Object getConstraintsForLayout(LayoutManager lm)
{
if (lm instanceof BorderLayout)
return BorderLayout.NORTH;
return null;// for unknown lm
}
};
}

>  actionPerformed( ActionEvent e )
>  {
if (targetProvider != null) {
Container target = targetProvider.getTarget();
if (target != null) {
ConstraintComponent newCmp = createComponent();
target.add(newCmp);
}
}
>   // Do something complex, create a new graphical
> component as a result
>   // that needs to be added to the UI.
>   }
> }
> 
> /* Class Panel */
> public class controlMe extends JPanel implements TargetProvider
> {
public controlMe()
{
super();
>   JButton a = new JButton( "Hi!" );
//>   iHearYou newEar = new iHearYou();
iHearYou newEar = new iHearYou(this);
>   a.addActionListener( newEar );
>   add( a );
}

public Container getTarget()
{
return getParent();
}
> }
> 
> /* Class UI */
> {
>  controlMe S&M = new controlMe();
>  getContentPane().add( S&M );
> }
> 
-- 
-
Save software competition, use Linux and Java!
mailto:[EMAIL PROTECTED]


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



Re: Metal Look and Feel with 16 bit color

1999-10-28 Thread Nathan Meyers

On 28 Oct, Armen Yampolsky wrote:
> 
> 
>> The AWT doesn't do well with X visuals not matching those found on
>> Solaris platforms. In some past discussion on this topic, it came up
>> that running the X server at depth 15 (X -bpp 15) creates a visual (5
>> bits for each primary) that the AWT seems to like much better.
> 
> I have found that setting my display to 15bpp does seem to work fine for the 
>jdk1.2pre2, but it still does not work if I run the java app remotely on a Solaris 
>box with JDK1.2
> (and then setting the display to my 15bpp X Server). Has anyone noticed this sort of 
>problem? Any workarounds?

Now *that* is interesting. My guess is that, despite whatever
weaknesses Blackdown inherited in Sun's X code, they've probably
tweaked the AWT to be a bit more robust in the face of certain visuals
than Sun's version is.

Does XFree86 support more than one visual when running 15bpp? Maybe a
different visual wouldn't bother the AWT so much. You might be
interested in exploring my xwinwrap tool
(http://www.teleport.com/~nmeyers/FreeWare); it allows you to request a
non-default visual. I've only used it on Linux, but I believe Solaris
also has the LD_PRELOAD capability required to make it work.

Nathan

> 
> -Armen
> 
> 
>> On 27 Oct, Chris LeDantec wrote:
>> > We've noticed a problem with the Metal look-and-feel and 16 bit color.
>> >
>> > Basically, if an X server is set to 16 bit color depth, then applications
>> > (specifically NetBeans Developer) will not load the Metal look and feel --
>> > subsequently crashing.
>> >
>> > Is this an issue with the motif libraries that are linked in with java at
>> > this time?  If the color depth is set to 8 bit  or 24 or 32 bit then
>> > everything works fine, no problems.  It is only an issue that arises with
>> > the 16 bit color depth.



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



Re: Metal Look and Feel with 16 bit color

1999-10-28 Thread Alok Daipuria

I am doing following operations on Calendar object, but they don't seem to be working. 
How do I make it working.

   cal.setTimeZone(TimeZone.getTimeZone("EST"); But the time it returns before : Mon 
Sep 28 10:12:23 PDT 1998 and after this operation is also same.

   I also encountered problem while setting the AM/PM like :

 cal.set(Calendar.AM_PM, Calendar.AM)

 I'll appreciate if anyone can help me with this problem.

 thanks Alok


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



Re: Java Platform Debugger Architecture (JPDA)

1999-10-28 Thread Daniel Barclay



> From: Nathan Meyers <[EMAIL PROTECTED]>


> > ... JDWP (Java Debug Wire Protocol) 
> 
> And it's JDWP that's missing. It has a native component that's not a
> part of the JDK and hasn't been ported to Linux. Sun is silent on the
> availability question, and some great tools like JBuilder can't debug
> without it.

How can a wire protocol have any software component?  It's a 
protocol.

Or are you talking about avoiding having to rewrite a JVDMI- or
JDI-to-JDWP component?


Daniel


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



Re: Java Platform Debugger Architecture (JPDA)

1999-10-28 Thread Nathan Meyers

On 28 Oct, Daniel Barclay wrote:
>> From: Nathan Meyers <[EMAIL PROTECTED]>
> 
> 
>> > ... JDWP (Java Debug Wire Protocol) 
>> 
>> And it's JDWP that's missing. It has a native component that's not a
>> part of the JDK and hasn't been ported to Linux. Sun is silent on the
>> availability question, and some great tools like JBuilder can't debug
>> without it.
> 
> How can a wire protocol have any software component?  It's a 
> protocol.


It's not just a protocol, it's an API to use the protocol. And part of
the API is implemented natively. Just implement these 11 native methods
and you've got a working JDWP (and, by extension, JPDA) API:

> private native void com.sun.tools.jdi.SharedMemoryConnection.close0(long)
> private native byte com.sun.tools.jdi.SharedMemoryConnection.receiveByte0(long) 
>throws java.io.IOException
> private native void 
>com.sun.tools.jdi.SharedMemoryConnection.receivePacket0(long,com.sun.tools.jdi.Packet)
> throws java.io.IOException
> private native void com.sun.tools.jdi.SharedMemoryConnection.sendByte0(long,byte) 
>throws java.io.IOException
> private native void 
>com.sun.tools.jdi.SharedMemoryConnection.sendPacket0(long,com.sun.tools.jdi.Packet) 
>throws java.io.IOException
> private native long com.sun.tools.jdi.SharedMemoryTransport.accept0(long) throws 
>java.io.IOException
> private native long 
>com.sun.tools.jdi.SharedMemoryTransport.attach0(java.lang.String) throws 
>java.io.IOException
> private native void com.sun.tools.jdi.SharedMemoryTransport.initialize()
> private native java.lang.String com.sun.tools.jdi.SharedMemoryTransport.name(long) 
>throws java.io.IOException
> private native long 
>com.sun.tools.jdi.SharedMemoryTransport.startListening0(java.lang.String) throws 
>java.io.IOException
> private native void com.sun.tools.jdi.SharedMemoryTransport.stopListening0(long) 
>throws java.io.IOException

Nathan



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



classpath

1999-10-28 Thread Adam Carheden

I am using the blackdown jdk 117 v3.  I have downloaded Swing 1.0.3 from
SUN and ArgoUML.  These come as .jar files which contain the paths
com/sun/java/... and the actual files below that.  All the installation
instructions tell me to simply put these in my class path.  I have tried
setting a CLASSPATH variable, using the -classpath argument to java and
putting these in the same directory as classes.zip (and everywhere else
in my jdk installation), java refuses to find these new additions.  I've
also tried setting JAVA_HOME.  The FAQ seems to say very little about
where it searches for classes.  Please help!
-- 
Adam Carheden
[EMAIL PROTECTED]


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