applet access form data?

1999-01-14 Thread youhq

can java applet read and write data form or to a form of HTML?
How to do? Please tell me.thank



problem with jdk117 and native threads

1999-01-14 Thread Moses DeJong

Hi all.

Under blackdown's JDK1.1.7 v1a for linux an echo program
will not work if it is run from a shell script. The same
code will work perfectly if run without the -native
argument or directly from the command line. The problem
seems to be that a call to System.in.read() will block
and never return. Here is an example that shows the
problem. I also found it interesting that the program
would not be killed by a Ctrl-C when run from the
script with the -native argument. Another strange thing
I noticed is that it will work correctly if the program
is run from the shell script like this "exec java ...".


(shell script used to start program)

#!/bin/sh
java -native echo



(java source file echo.java)

public class echo {

public static void main(String[] argv) throws Exception {
System.out.println("Please begin typing, type quit to stop");

while (true) {
int avail = System.in.available();

if (avail < 0) {
throw new Exception("System.in.available() returned " + avail);
} else if (avail == 0) {
Thread.currentThread().sleep(100);
} else {
byte[] buff = new byte[avail];
System.in.read(buff);

// quit if they typed "quit"
if ((buff.length == 5 || buff.length == 6) &&
buff[0] == 'q' && buff[1] == 'u' &&
buff[2] == 'i' && buff[3] == 't') {System.exit(0);}


// echo back what was just typed
System.out.println("-ECHO BEGIN-");
System.out.write(buff);
System.out.println("-ECHO END-");
System.out.println();
}
}
}
}



I hope that helps
mo dejong
dejong at cs.umn.edu



Can't find getMonth Method

1999-01-14 Thread Lee Sang Hoon


Hi ! everyon...

I'm  coding bulletin.

but ERROR concured below !


WriteCybbs.java:66: Class java.util.Date. getMonth not found in type
declaration.
+new Date.getMonth()+"-"
 ^
Note: WriteCybbs.java uses a deprecated API.  Recompile with
"-deprecation" for details.

-- 

I'm using java version 1.1.7 via 

evidently, Date class contain getMonth() method in API .


I hope helps

   http://cyclo.ml.org   by jisu.




Re: Can't find getMonth Method

1999-01-14 Thread Moses DeJong

I think your code is wrong. It is attempting to allocate an object
of type java.util.Date.$getMonth which does not exist (javac thinks
getMonth is an inner class of the Date class). I do not know what
the "new" is doing there but I think you code should read:

... + Date.getMonth() + "-" ...


I hope that helps
Mo DeJong
dejong at cs.umn.edu


On Thu, 14 Jan 1999, Lee Sang Hoon wrote:

> 
> Hi ! everyon...
> 
> I'm  coding bulletin.
> 
> but ERROR concured below !
> 
> 
> WriteCybbs.java:66: Class java.util.Date. getMonth not found in type
> declaration.
> +new Date.getMonth()+"-"
>  ^
> Note: WriteCybbs.java uses a deprecated API.  Recompile with
> "-deprecation" for details.
> 
> -- 
> 
> I'm using java version 1.1.7 via 
> 
> evidently, Date class contain getMonth() method in API .
> 
> 
> I hope helps
> 
>http://cyclo.ml.org   by jisu.
> 
> 



Re: Returned mail: User unknown

1999-01-14 Thread RameshBabu

> Hi,
> I have doubt that java passes arguments(for objects) by reference ?
>
> If yes then
> this pass by reference is equals to c++ reference.
>
> and tell wihch are all objects ? (Strings are objects ???)
>
> I have sample prog. which makes to confuse.
> please explain clearly
>
> --
>
> class PassBy {
> public PassBy()
> {
>  //Button
> Button b = new Button("Test");
> System.out.println("B4 calling fun label " + b.getLabel());
> fun(b);
> System.out.println("after calling fun label " + b.getLabel());
>
> // --
> // array
> String[] arr = new String[] {"Hi"};
> System.out.println("B4 calling fn, " + arr[0]);
> Call(arr);
> System.out.println("After calling fn, " + arr[0]);
>
> // --
>
> // String
> String str1 = "Ramesh";
> String str2 = "Babu";
> System.out.println("B4 calling fn,1 " + str1 + " 2-- " + str2);
> Swap(str1, str2);
> System.out.println("after calling fn,1 " + str1 + " 2-- " + str2);
>
>   // i don't know
> Integer int1 = new Integer(444);
> Integer int2 = new Integer(666);
> System.out.println("B4 swapping 1 " + int1 + " 2 --- " + int2);
> SwapInt(int1, int2);
> System.out.println("after swapping 1 " + int1 + " 2 --- " +
> int2);
>   }
>
>   private void fun(Button c) {
>
> System.out.println("In fun, Label " + c.getLabel());
> c.setLabel("Hooo");
> System.out.println("In fun, after setting " + c.getLabel());
>   }
>
>   void Swap(String s1, String s2) {
>
> String temp = s1;
> s1 = s2;
> s2 = temp;
> System.out.println("In calling fn,1 " + s1 + " 2-- " + s2);
>
>   }
>
>  void Call(String[] local) {
>
> local[0] = "Bye";
> System.out.println("In fn " + local[0]);
>
>   }
>
>   void SwapInt(Integer int1, Integer int2) {
> Integer temp = int1;
> int1 = int2;
> int2 = temp;
> System.out.println("In fn, after swapping 1 " + int1 + " 2 --- "
> + int2);
>
>   }
>
>   static public void main(String[] args) {
>
> new PassBy();
>
>   }
>
> }





Re: Can't find getMonth Method

1999-01-14 Thread Martin Sorgatz

Lee Sang Hoon wrote:

> Hi ! everyon...
>
> I'm  coding bulletin.
>
> but ERROR concured below !
>
> 
> WriteCybbs.java:66: Class java.util.Date. getMonth not found in type
> declaration.
> +new Date.getMonth()+"-"
>  ^
> Note: WriteCybbs.java uses a deprecated API.  Recompile with
> "-deprecation" for details.
>
> --
>
> I'm using java version 1.1.7 via 
>
> evidently, Date class contain getMonth() method in API .
>
> I hope helps
>
>   http://cyclo.ml.org   by jisu.

Hi,
not java-linux related, i know, but here is the answer:
  new Date.getMonth()
tries to create a new instance of class getMonth in package Date.
What you want is a new Date object and call its getMonth() method:
  new Date().getMonth()
Note that you should no longer use deprecated features of the Java API,
refer to the Java API Documentation.
--
Martin Sorgatz
[EMAIL PROTECTED]



Re: [ATTENTION]: Mailing List Changes

1999-01-14 Thread chang hun Park

$)C
mail :83;Av 86< REMOVE 
>
> Carlo E. Prelz @[<:GT:
>
> > Subject: [ATTENTION]: Mailing List Changes
> > Date: Sun, Jan 10, 1999 at 10:31:59AM -0600
> >
> > Quoting Karl Asha ([EMAIL PROTECTED]):
> >
> > > Now my main request is for someone to hold my hand through getting a
> > > newsgroup proposed and possibly approved. Alternatively, I would really
> > > appreciate a -stable- (and by stable I mean someplace that isn't going to
> > > die within a week) to host the mailing lists.
> >
> > Newsgroups have a different audience and accessing method. I, for one,
> > would probably stop following this list if it became a newsgroup.
> >
> > Two main sites have linux-related mailing lists. The most important is
> > vger.rutgers.edu, which runs the VERY-high-traffic linux-kernel list
> > together with roughly a dozen other lists. The second one is
> > redhat.com, which runs the high-priority security lists.
> >
> > I guess vger is the right place to relocate the list. There seems to
> > be an e-mail address to contact people there:
> > <[EMAIL PROTECTED]>
> >
> > I am sending a copy of this message to the above address. I suggest
> > you contact these people or people at redhat. The importance of the
> > list for the Linux community is undeniable and most probably you won't
> > be refused hospitality.
> >
> > Carlo
> >
> > --
> >   * Se la Strada e la sua Virtu' non fossero state messe da parte,
> > * K * Carlo E. Prelz - [EMAIL PROTECTED] che bisogno ci sarebbe
> >   *   di parlare tanto di amore e di rettitudine? (Chuang-Tzu)





Re: Can't find getMonth Method

1999-01-14 Thread Hariharan Narayanan

getMonth() is deprecated. As of JDK version 1.1.x, it has been replaced
by Calendar.get(Calendar.MONTH) .



Lee Sang Hoon wrote:

> Hi ! everyon...
>
> I'm  coding bulletin.
>
> but ERROR concured below !
>
> 
> WriteCybbs.java:66: Class java.util.Date. getMonth not found in type
> declaration.
> +new Date.getMonth()+"-"
>  ^
> Note: WriteCybbs.java uses a deprecated API.  Recompile with
> "-deprecation" for details.
>
> --
>
> I'm using java version 1.1.7 via 
>
> evidently, Date class contain getMonth() method in API .
>
> I hope helps
>
>http://cyclo.ml.org   by jisu.


begin:  vcard
fn: Hariharan Narayanan
n:  Narayanan;Hariharan
org:CMC Centre
adr:16-11-405/34A;;SBI Officers' colony, Moosarambagh,;Hyderabad;Andhra Pradesh;500 036;India
email;internet: [EMAIL PROTECTED]
title:  Engineer
tel;work:   91-40-3000 401/3000 501  Xtn. 22tel
tel;fax:91-40-3000 509
tel;home:   91-40-4048144
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:2.1
end:vcard




Re: class finalizer?

1999-01-14 Thread Jason Dillon

a static finalize method causes the compiler (jikes in this case) to return:

93. public static void finalize ()
   <->
*** Error: The static method "void finalize();" cannot hide the instance method

--jason 

On 14-Jan-99 Chris Abbey wrote:
>>Is there any way to detect when a class is going to be unloaded from the
> vm
>>sort of the opposite of static { ... }?
>>
>>--jason
> 
> In theory or in practice?
> 
> In theory the JLS says so, put a static method finalize() in the class
> (sorry, don't remember the protection, maybe public??) and the VM is
> supposed to call the method before unloading the class.
> 
> In practice . . . well, even Sun never bothered to implement it, and
> I doubt the JCK checks for it either. IIRC someone posted a quote from
> bugParade re this; check the archives if you're interested or search
> for finalization in bugParade.
> 
> There was also a suggestion to strike that requirement from the JLS,
> hopefully this was given some serious thought before being accepted!
> 
> To keep this Java && Linux, are the Blackdowner's considering doing
> more than just porting? Not to imply that porting isn't a major
> undertaking in and of itself. But are any of you working on enhancements
> or bugfixes as well? -=Chris
> 
> <*> cabbey at rconnect dot com  http://homepage.rconnect.com/cabbey/ <*>
> Get it up, keep it up... LINUX: Viagra for the PC. ;) PGP Info: pgp.html
> 
> -BEGIN GEEK CODE BLOCK-
> Version: 3.12 http://www.geekcode.com
> GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P
> w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y?
> --END GEEK CODE BLOCK--



Re: JCK licensing restriction (was: JDK1.2)

1999-01-14 Thread Dirk Vanhalle

I must agree with Nathan.
Nothing disturbs me (as a software developper) more than users filing more
bug reports when I *know* there are still bugs.  They might be new bugs,
but chances are they are subtle variations of known bugs.  It distracts you
from your work, you loose time prioritizing and simulating when you should
be concentrated on fixing what you already know is wrong.

Give them time.  I'll be happy with a beta that passes the JCK.  Don't give
us (me) a first alpha that bearly compiles and executes a 'HelloWorld'
example.

Dirk.





[EMAIL PROTECTED] on 13/01/99 22:43:24

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:   (bcc: Dirk Vanhalle)
Subject:  Re: JCK licensing restriction (was: JDK1.2)





I disagree on that last point, and I was wondering if anyone else feels
the same. (I'm  referring to the part about not releasing any version of
the Linux JDK 1.2 until  passing compatibility tests being a good thing.)
I think it's not such a good thing because, as I understand it, it
prevents any form of public beta testing. Think about it this way: If the
JDK doesn't pass the JCK, then it means there are bugs somewhere, but the
developer community can't help the Blackdown team find/kill those bugs if
a public beta isn't released. So, although one might think that forcing the
JDK to pass the JCK would reduce bugs in the final release, I would guess
that it actually produces *more* bugs since the thousands and thousands of
Java-Linux developers out there are prevented from helping out with the
beta test cycle. It also means that the beta cycle might take longer
since the pre-releases can only be tested by  members of Blackdown. Am I
missing something here, or is the JCK restriction of the license really
not such a great thing after all?

Trevor

Nathan Meyers wrote:

> The answer is that it's being worked on, it'll be out soon (no date
> promised), and the Blackdown team is forbidden by the license to release
> anything until it has passed the compatibility tests (this is a good
> thing).











RE: How to get Netscape 4 working Swing and JMF Applets?

1999-01-14 Thread peter . pilgrim

Thanks alot. Netscape's README is a bit of nonsense with regards to the 
CLASSPATH. If you make sure that the CLASSPATH is unset then everything
work.

I though about install the jars in $MOZILLA_HOME/java/classes
or making symbolic links to the jars from $SWING_HOME and $JMFHOME
but really I think this is too long in tooth. Netscape should has this sorted.

Copying files to the codebase directory does not help diskspace, but thanks for 
a soln.

Pete




__ Reply Separator _
Subject: RE: How to get Netscape 4 working Swing and JMF Applets?
Author:  SHarris ([EMAIL PROTECTED]) at lon-mime
Date:13/01/99 18:52




> The only way to get Java Applets to work in Netscape 4.5 is to unset 
> CLASSPATH env variable. How can I then make the browser find the
> Swing/JFC 
> and JMF (or any other 3rd party) jar files then ? 
> 
> Pete
> 
I forgot to say that if you put the jars in the html, like 
archive="tkb107.jar, oracle.zip, swing103.jar">,
then you need to put these jar files in the same 
directory as your html on the web server.



place to discuss with JDK source code

1999-01-14 Thread SHUDO Kazuyuki

Are there any places to have a discussion referring to
source code of JDK? I'd like to an i18n problem I've
found with JDK source code.

Kazuyuki SHUDO  Happy Hacking!



Re: place to discuss with JDK source code

1999-01-14 Thread Ernst de Haan

Hi Kazuyuki (is that your first name?),

SHUDO Kazuyuki wrote:
> 
> Are there any places to have a discussion referring to
> source code of JDK? I'd like to an i18n problem I've
> found with JDK source code.
> 
> Kazuyuki SHUDO  Happy Hacking!

If you find one, let me know. I'm interested in helping optimizing the
source code (not the native libraries, though).


GreetinX from the guy who introduced the optimized
java.util.Vector.copyInto(Object[]) as implemented in JDK 1.2 :)
-- 
 _
|  "Come to me all you who are weary and burdened, and I  |
|  will give you rest."   |
| |
| -- Jesus Christ (Mt. 11:28) |
|_|
| Ernst de Haan | email [EMAIL PROTECTED]|
| Java programmer   | web   members.xoom.com/znerd/   |
| Utrecht University| icq#  21871778  |
|___|_|



Re: Can't find getMonth Method

1999-01-14 Thread stoerk

On Thu, 14 Jan 1999, Moses DeJong wrote:

> I think your code is wrong. It is attempting to allocate an object
> of type java.util.Date.$getMonth which does not exist (javac thinks
> getMonth is an inner class of the Date class). I do not know what
> the "new" is doing there but I think you code should read:

I think, you wanted to do this:
 + (new Date()).getMonth() + "-"
Create a new Date-Object and call its getMonth Method.

> On Thu, 14 Jan 1999, Lee Sang Hoon wrote:
> 
> > 
> > Hi ! everyon...
> > 
> > I'm  coding bulletin.
> > 
> > but ERROR concured below !
> > 
> > 
> > WriteCybbs.java:66: Class java.util.Date. getMonth not found in type
> > declaration.
> > +new Date.getMonth()+"-"
> >  ^
> > Note: WriteCybbs.java uses a deprecated API.  Recompile with
> > "-deprecation" for details.
> > 
> > -- 
> > 
> > I'm using java version 1.1.7 via 
> > 
> > evidently, Date class contain getMonth() method in API .
> > 
> > 
> > I hope helps
> > 
> >http://cyclo.ml.org   by jisu.
> > 
> > 
> 
> 

J"orn St"ork

E-Post: [EMAIL PROTECTED]

I've finally learned what "upward compatible" means.  It means we get to
keep all our old mistakes.
-- Dennie van Tassel



THANX !!! getMonth() problem

1999-01-14 Thread Lee Sang Hoon




Re: How to get Netscape 4 working Swing and JMF Applets?

1999-01-14 Thread peter . pilgrim

I did all of this and it does work under Linux or Solaris.

I think copying the jar to $MOZILLA/java/classes is best.

Pete



__ Reply Separator _
Subject: Re: How to get Netscape 4 working Swing and JMF Applets?
Author:  pridemor ([EMAIL PROTECTED]) at lon-mime
Date:13/01/99 14:31


Write a shell script to launch netscape, instead of calling it directly. 
In the script, you can set your CLASSPATH as needed, including 
java40.jar.





[EMAIL PROTECTED] on 01/13/99 06:28:51 AM

To:   [EMAIL PROTECTED] 
cc:(bcc: Russell Pridemore/Lex/Lexmark)
Subject:  How to get Netscape 4 working Swing and JMF Applets?





I am trying to get Netscape to work with Swing and JMF. What is written in 
the README file does not work at all.

Java Applet Support:

  Java Applet support is available for all Unix platforms.

  To run Java applets with the Java-enabled version, Communicator 
  needs to be able to load Java class files from a file called 
  java40.jar.  This file is included in the distribution, and is 
  searched for using the following algorithm:

 if($CLASSPATH environment variable is set)
 Look at $CLASSPATH, where $CLASSPATH is a 
 colon-delimited list of / entries.
 else
 Search in order:
 
 $MOZILLA_HOME/java/classes
 $HOME/.netscape
 /usr/local/netscape/java/classes
 /usr/local/lib/netscape


The only way to get Java Applets to work in Netscape 4.5 is to unset 
CLASSPATH env variable. How can I then make the browser find the Swing/JFC 
and JMF (or any other 3rd party) jar files then ?

Pete







RE: applet access form data?

1999-01-14 Thread brownphil

I don't think an Applet can access the form properties directly, but you can
use JavaScript to bridge the gap between the form and the Applet.  An
example is attached.  Note there is a difference between browsers and
versions, but you can cover both in the code.

The sample basically uses JavaScript to pull the fields off the form passing
them to a method called 'AppletMethod' in an applet called 'Applet.class'.
The applet is defined in the HTML as 'AppletToUse', and it's return value is
put back into the form field.  After this the form action takes place (a
call to someaction.exe in this case).  You could, of course, leave the form
action out if all you want to do is call the applet method.

Of course the sample won't execute without an applet, but this should get
you started.

Hope this helps.

Phil Brown
Electronic Commerce Dept.
Bridgestone/Firestone Inc.
http://www.bridgestone-firestone.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 14, 1999 8:06 AM
To: [EMAIL PROTECTED]
Subject: applet access form data?


can java applet read and write data form or to a form of HTML?
How to do? Please tell me.thank


Title: Sample Form/Applet Integration