Re: I/O to HTTP url

1999-04-26 Thread Stuart McLean

Michael Holst wrote:
> 
> Hello,
> 
> I'm not a Java newbie, but I am not too familiar with the networking
> classes of our dear "write once, run anywhere" language.
> The problem is the following, I need to let an applet write a file to a
> specified http address in order for it to work correctly. How do I
> acomplish this? If I am correct, the java.io.* only works for local
> files.

The java.net.URLConnection will allow you to open files/connections to a
url and get input/output streams on them (which you con manipulate using
the java.io package).  However, you will have to overcome Java's
security model -  simplistically, a normal applet can only access/make
connections to the server from which it was downloaded.  

There are, I believe ways around this using signed applets and certainly
JDK1.2 has a much more complex and flexible security model but I'm not
an expert in either of these areas.

Good luck

Stuart


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



Re: unable to run java progs using jdk1.2

1999-04-26 Thread Stuart McLean

VISHAL BHASIN wrote:
> 
> hi there
> i have a query.i will be thankful if answered.
> 
>i was working on java 1.1 on linux since last
>   few months.
>i downloaded jdk1.2 v1,from sun's site.
>i work on redhat linux 5.2.
>followed all documentation instructions
>  -set PATH.
>  -set LD_PRELOAD.
>   now even if i run the sample programs provided
>   in kit it shows the error(the file is attached)
>   there is no problem in compilation as such.
>   please let me know what to do.
>   thanking you.
> vishal.
> 
>   
>   Name: err
>errType: Plain Text (TEXT/PLAIN)
>   Encoding: BASE64

Try turning off the JIT compiler using java -Djava.compiler=none ...

This worked for me with Redhat 5.1 kernal 2.2 p133 (overclocked to 150)
32Mb.

The JIT compiler seems to crash with any awt code (but seems OK with
none awt stuff).

You might also try java -green ... - the JIT may work with green threads
- I haven't tried this yet.

Good Luck
Stuart.


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



Re: jdk1.2

1999-04-30 Thread Stuart McLean

Ozer Irfan wrote:
> 
> Hello
> Include jdk1.2 the swing libraries ?
> If no where can I download it ?
> 
> I have compilation error :
> 
> for example : JFrame not found
> 
> I do
> 
> import com.sun.java.swing.*;
> 
> Thanks
> 
> Irfan
> 
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

In JDK 1.2 (and I beleive later releases of Swing) the swing packages
are in javax.swing

change import com.sun.java.swing.* to import javax.swing.*

Sun say that since swing is no part of the JDK it shouldn't be in
com.sun and to allow the code from JDK 1.1.x + swing to move to JDK 1.2
(Java2) they didn't put it in java.swing (since its not part of the JDK
for 1.1).

Stuart


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