From dick Thu Mar 28 11:27 PST 1996
From: dick (Dr. Richard Botting)
Date: Thu, 28 Mar 1996 10:54:40 -0800
To: paul@csci.csusb.edu, dick@csci.csusb.edu, murphy@csci.csusb.edu,
        rlittle@csci.csusb.edu, hchilver@csci.csusb.edu
Subject: (fwd) Re: "cpu eaters" with java threads
Newsgroups: comp.lang.java
Organization: CS Dept., Calif. State Univ., San Bernardino

Path: csus.edu!csusac!charnel.ecst.csuchico.edu!psgrain!newsfeed.internetmci.com!news.ac.net!news.cais.net!nntp.uio.no!ifi.uio.no!news.sics.se!news
From: Jari Ojala <ojala@sics.se>
Newsgroups: comp.lang.java
Subject: Re: "cpu eaters" with java threads
Date: Wed, 27 Mar 1996 16:53:13 +0100
Organization: Swedish Institute of Computer Science, Kista
Message-ID: <31596469.6CD1@sics.se>
NNTP-Posting-Host: 192.16.123.56

I forward this Ingo Wechsung's message:
--cut here

     Subject: 	Re: "cpu eaters" with java threads 
        Date: 	Wed, 27 Mar 1996 16:17:11 +0100 
        From:	Ingo Wechsung <iw@return-online.de>
Organization:	CAS Nord GmbH 
          To:	Jari Ojala <ojala@sics.se>

Jari Ojala wrote:

>
> My point was here that you *can't* stop the counter. I can use
> your computer as a resource for my own private purposes.
> The counter will continue as long your netscape process is running.
> Eaven while you read other web pages or load other applets the
> counter thread will stay on. I could use this bug/feature to
> use your computer as a resource in my private
> computations and you don't have any way to stop me.. :)
>

You are absolutely right. If I could post, I'd have done this,
but unfortunately I am limited to read news only.

Yesterday, I checked the number of threads netscape had before
and after consulting some pages with applets. When I start a
fresh copy of netscape, there are initially 3 threads. After
only half an hour I had 18 threads, some of them still eating
cpu.

The bad thing is, that the browser user can't do anything about
bad programming style (or intentional written unstopping
applets). I think this is an area, where people should think
again about an applets lifecycle.

Please feel free to post this to comp.lang.java if you like.

Ingo

--
Email: iw@return-online.de  Tel.: 07121/928624  Fax.:
07121/928686
CAS Nord GmbH, Geschaeftsstelle Reutlingen  --  Return Online
GmbH
Friedrich-Ebert-Str. 3, 72762 Reutlingen, Germany
Please have a look at our Web pages:
                   http://www.return-online.de

--
dick botting     http://www.csci.csusb.edu/dick/signature.html
Disclaimer:      CSUSB may or may not agree with this message.
Copyright(1996): Copy freely but say where it came from.
	I have nothing to sell, and I'm giving it away.

From prolog-request@swi.psy.uva.nl Mon Apr  3 02:09:11 2000
Resent-Date: Mon, 3 Apr 2000 11:06:17 +0200 (MET DST)
Posted-Date: Mon, 3 Apr 2000 10:52:54 +0100 (WET DST)
From: Lionel Ains <lains@caramail.com>
To: prolog@swi.psy.uva.nl
Message-ID: <954749064008022@caramail.com>
X-Originating-IP: [194.202.131.4]
Subject: CGI with SWI-Prolog
Date: Mon, 3 Apr 2000 10:50:02 GMT+1
Resent-Message-ID: <XGqbTC.A.STG.ssF64@swi>
Resent-From: prolog@swi.psy.uva.nl
X-Mailing-List: <prolog@swi.psy.uva.nl> archive/latest/553
X-Loop: prolog@swi.psy.uva.nl

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--=_NextPart_Caramail_008022954749064_ID

Hello,

I am trying to use SWI-Prolog as a CGI script.
To get the post parameters, I would like to read from the 
stdin without Prolog printing ':|'.
I found out that this was possible by trying to get the 
input when not on an empty line.
How could I do that in any cases (when the cursor is at the 
begining of the line)?
Is there a non-blocking way to detect the when nothing is 
sent to the user input (script called without parameter)?
Are there available librairies to handle the URL 
encoding/decoding?

Many thanks,

Lionel



_______________________________________________________
Vendez tout... aux ench=e8res - http://www.caraplazza.com


--=_NextPart_Caramail_008022954749064_ID--


----------------
* To UNSUBSCRIBE, please use the HTML form at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist

or send mail to prolog-request@swi.psy.uva.nl using the Subject: "unsubscribe"
(without the quotes) and *no* message body.

** An ARCHIVE of this list is maintained at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/


From prolog-request@swi.psy.uva.nl Mon Apr  3 03:02:53 2000
Resent-Date: Mon, 3 Apr 2000 11:53:50 +0200 (MET DST)
From: Lukas Faulstich <faulstic@inf.fu-berlin.de>
MIME-Version: 1.0
Message-ID: <14568.26436.13071.661572@inf.fu-berlin.de>
Date: Mon, 3 Apr 2000 11:41:23 +0200 (MET DST)
To: Lionel Ains <lains@caramail.com>
CC: prolog@swi.psy.uva.nl
Subject: CGI with SWI-Prolog
In-Reply-To: <954749064008022@caramail.com>
Reply-To: faulstic@inf.fu-berlin.de
Resent-Message-ID: <fLrf7B.A._AH._bG64@swi>
Resent-From: prolog@swi.psy.uva.nl
X-Mailing-List: <prolog@swi.psy.uva.nl> archive/latest/554
X-Loop: prolog@swi.psy.uva.nl


--7/ZKyvzVh+
Content-Description: message body and .signature

Lionel Ains writes:
 > Hello,
 > 
 > I am trying to use SWI-Prolog as a CGI script.
 > To get the post parameters, I would like to read from the
 > stdin without Prolog printing ':|'.
 > I found out that this was possible by trying to get the
 > input when not on an empty line.
 > How could I do that in any cases (when the cursor is at the
 > begining of the line)?

	% switch off the prompt: 
	prompt(_, '') 


 > Is there a non-blocking way to detect the when nothing is
 > sent to the user input (script called without parameter)?
 > Are there available librairies to handle the URL
 > encoding/decoding?

it is easier to use Java Servlets 
<http://jserv.javasoft.com/index.html>
to let them do this job. This has the
advantage that you can maintain a stateful prolog process that handles
multiple http requests. While there is the jpl library for calling
prolog from within java
<http://blackcat.cat.syr.edu/~fadushin/software/jpl/>, I found it easier
to use standard input/output for communication. You might have a look at
the attached Java/Prolog source code. 

Hope that helps- 

Lukas

-- 
Lukas C. Faulstich		        faulstic@inf.fu-berlin.de 
Institut fuer Informatik	        +49 (30) 838 - 75 123
Freie Universitaet Berlin	        +49 (30) 838 - 75 109 (fax)
Takustr. 9			        http://www.inf.fu-berlin.de/~faulstic
D-14195 Berlin, Germany	                PGP key: see my homepage


--7/ZKyvzVh+
Content-Description: prolog backend
Content-Disposition: inline;
	filename="servlet.pl"

/* 
 *	 $Id: servlet.pl,v 1.9 1999/11/14 21:31:46 faulstic Exp $
 * 
 * (c) Lukas Faulstich <faulstic@inf.fu-berlin.de>  
 *
 * Description: backend for servlet
 *
 */

:- module(servlet, [
	servlet_loop/0 
    ]). 

servlet_loop:- 
	% redirect user_error to current output
	current_output(CurrentOut), 
	dup_stream(CurrentOut, user_error), 
	% switch off the prompt: 
	prompt(_, ''), 
	% start the loop
	next. 

next:- 
	read_action(Action, Bindings), 
	handle(Action, Bindings). 

handle(http_request(Parameters), _):- !, 
	http_request(Parameters), next. 
handle(syntax_error, _):- !, 
	error('Syntax Error', []). 
handle(welcome, _):- !, welcome, next. 
handle(next, _):- !, fail. 
handle(halt,_):- !, 
	halt. 
handle(end_of_file,_):- !, 
	halt. 
handle(done,_):- !. 
handle(Action,_):- 
	error('Don\'t understand ~w', [Action]), 
	next. 

http_request(Attributes):- 
	member(halt=true, Attributes), !, 
	base_url(BaseURL), 
	format('<html><head><title>Halt</title></head><body><h1>Halt</h1>The system has been halted. </body></html>~n~n', []),
	halt. 
http_request(Attributes):- 
http_request(Attributes):- 
	decode_attributes(Attributes, DecodedAttributes)
	% use DecodedAttributes = [Attr1=Val1,...,Attrn=Valn] 
        % to generate HTML page and 
	% print it to standard output, e.g.: 
	format('<html><head><title>Attributes</title></head><body><h1>Attributes:</h1>~w</body></html>~n~n', [DecodedAttributes]),

	
decode_attributes([], []). 
decode_attributes([A=V|AVs], [A=T|ATs]):- 
	(atom_to_term(V,T,_) -> true; T=V), 
	decode_attributes(AVs, ATs). 


error(Message, Args):-
	format('<html><head><title>Error</title></head>~n<body><h1>Error:</h1>'), 
	format(Message, Args), 
	format('</body></html>~n~n'). 

remake:- 
	format('<html><head><title>Make</title></head><body><h1>Make:</h1><hr><pre>'), 
	make, 
	format('</pre><hr></body></html>~n~n'). 
	

welcome:- http_request([]). 


read_action(Action, Bindings):- 
	read_line_term(Action, Bindings), !. 
read_action(end_of_file, []). 

read_line_term(Term, Bindings):- 
	read_line(Line), 
	(atom_to_term(Line, Term, Bindings) -> true;
	Term= syntax_error, Bindings=[]). 

read_line(Line):- 
	get0(Char), 
	Char \= -1, 
	read_line_chars(Char, Chars, []), 
	name(Line, Chars). 

read_line_chars(10) --> !, []. 
read_line_chars(-1) --> !, []. 
read_line_chars(C) --> [C], { get0(N) }, read_line_chars(N). 



--7/ZKyvzVh+
Content-Description: Java front end
Content-Disposition: inline;
	filename="PrologServlet.java"

//  Frontend Servlet for SWI Prolog (servlet.pl)

import javax.servlet.*;
import javax.servlet.http.*;

import java.io.*;
import java.util.*;


public final class PrologServlet extends HttpServlet {

Process backEnd= null; 

PrintWriter backEndInput= null; 

BufferedReader backEndResults= null;  

PrintWriter logWriter= null; 

public String getServletInfo() {
        return "Frontend for SWI Prolog (servlet.pl)";
    }

public void init(ServletConfig config)
  throws ServletException
    {
      String logFileName; 
 
      super.init(config);
      

      initBackEnd(); 

      if ((logFileName = getInitParameter("logfile")) == null) { 
	//      throw new UnavailableException (this, "No log file given!");
      } else {
	try { 
	  logWriter= new PrintWriter(new FileOutputStream(logFileName), true); 
	} catch (IOException e) { 
	  throw new UnavailableException (this, "Cannot open log file " + logFileName + "!");
	}
      }
    }

public void initBackEnd() 
throws ServletException { 

    String tmpdir=getInitParameter("tmpdir"); 
    
    if (tmpdir == null) { tmpdir = "/tmp"; }

    String set_tmpdir="TMPDIR="+(new File(tmpdir)).getAbsolutePath();

    String servletName=getInitParameter("servletname"); 
  
    String[] envp; 

    if (servletName==null) {
	String[] tmp_envp= {set_tmpdir}; 
	envp= tmp_envp; 
    } else {
	String[] tmp_envp= {set_tmpdir, "SERVLET_NAME="+servletName}; 
	envp= tmp_envp; 
    }


    String backEndCall=null; 

    if ((backEndCall = getInitParameter("backend")) == null) { 
	backEndCall = "HyperView"; 
      }


    try { 
	backEnd = Runtime.getRuntime().exec(backEndCall, envp);
	
	
    
	backEndInput = 
	    new PrintWriter(backEnd.getOutputStream(), true); 
	
	backEndResults = 
	    new BufferedReader(new InputStreamReader(backEnd.getInputStream())); 
    } catch(IOException e) { 
	throw new UnavailableException (this, "Cannot initialize back end!");
    }
    
}

public void doPost(HttpServletRequest req, HttpServletResponse res)  
  throws ServletException {
  doGet(req, res); 
}

public void doGet(HttpServletRequest req, HttpServletResponse res) 
  throws ServletException {
  
  String action; 

  boolean result; 
  // Set Content Type:
  res.setContentType("text/html");
  
  // get output stream to client
  PrintWriter servletOut = null;
  try {
    servletOut = res.getWriter();
  } catch (IOException e) {
    log("Failed to establish output stream to client");
    return;
  }
   
  if(!forwardRequest(req, servletOut)){ 
      log("Pipe failed. Trying to restart backend...");
      closeBackEnd(); 
      initBackEnd();
      log("... backend restarted."); 
      if (!forwardRequest(req, servletOut)){
	  log("Pipe failed."); 
	  servletOut.println("<html><head><title>Fatal Error</title></head><body><h1>Fatal Error</h1>Failed to (re)start the HyperView Server.</body></html>");
      }
      
  }
  servletOut.close();
}

public boolean forwardRequest(HttpServletRequest req, PrintWriter servletOut){ 
  backEndInput.print("http_request(");
  printParameters(req, backEndInput); 
  backEndInput.println(").");
  log("Request sent."); 
  
  return pipePage(backEndResults, servletOut);    
}


public void printParameters(HttpServletRequest req, PrintWriter out){
  int j=0;
  Enumeration e = req.getParameterNames();
  log("Parameters:"); 
  out.print('['); 
  while (e.hasMoreElements()) {
    String name = (String)e.nextElement();
    String vals[] = (String []) req.getParameterValues(name);
    if (vals != null) {
      for (int i = 0; i<vals.length; i++) { 
	if (j > 0) { out.print(','); }
	out.print(name + "="); 
	log(name + "= \"" + vals[i] + "\"");  
	printAtom(out, vals[i]);
	j++; 
      }
    }
  }
  out.print(']');   
}

public void printAtom(PrintWriter out, String atom) {
  int i, l=atom.length(); 
  char c; 
  out.print('\''); 
  for (i=0; i<l; i++) {
    c= atom.charAt(i); 
    if (c == '\n') { out.print("\\n"); }
    else if (c == '\'') { out.print("\\'"); }
    else if (c == '\\') { out.print("\\\\"); }
    else { out.print(c); }
  }
  out.print('\''); 
}



public boolean pipePage(BufferedReader input, PrintWriter output) {  
  String thisLine= null; 

  try {
    while ((thisLine = input.readLine()) != null) {
      output.println(thisLine);
      if (thisLine.length() == 0) { 
	return true; 
      }
    }	
  } catch (IOException e) { 
    log("IOException" + e);
  }
  return false; 
}


public void destroy() {
  closeBackEnd(); 
  //  log("destroyed."); 
  if (logWriter != null) { logWriter.close(); } 
}

public void closeBackEnd() { 
  if (backEnd != null) {
    try { 
      backEndInput.println("halt."); 
      backEndInput.close(); 
      backEndResults.close();
    } catch (IOException e) { } 
    backEnd.destroy(); 
  }  
} 

public void log(String message) { 
  if (logWriter != null) {
    logWriter.println("frontend: "+ message); 
  }
}




  
}







--7/ZKyvzVh+--


----------------
* To UNSUBSCRIBE, please use the HTML form at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist

or send mail to prolog-request@swi.psy.uva.nl using the Subject: "unsubscribe"
(without the quotes) and *no* message body.

** An ARCHIVE of this list is maintained at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/


From prolog-request@swi.psy.uva.nl Mon Apr  3 15:24:17 2000
Resent-Date: Tue, 4 Apr 2000 00:13:29 +0200 (MET DST)
Message-ID: <38E8D195.25DFBD76@keele.ac.uk>
Date: Mon, 03 Apr 2000 18:15:01 +0100
From: Paul Singleton <p.singleton@keele.ac.uk>
Organization: SmartArts Computing Consultancy
X-Accept-Language: en
MIME-Version: 1.0
To: SWI Prolog <prolog@swi.psy.uva.nl>
Subject: Re: CGI with SWI-Prolog
Resent-Message-ID: <Zw1TNC.A.V-D.VMR64@swi>
Resent-From: prolog@swi.psy.uva.nl
X-Mailing-List: <prolog@swi.psy.uva.nl> archive/latest/556
X-Loop: prolog@swi.psy.uva.nl

Lukas Faulstich wrote:

> Lionel Ains writes:

>  > ...
>  > Is there a non-blocking way to detect the when nothing is
>  > sent to the user input (script called without parameter)?
>  > Are there available librairies to handle the URL
>  > encoding/decoding?

> it is easier to use Java Servlets
> <http://jserv.javasoft.com/index.html>
> to let them do this job. This has the
> advantage that you can maintain a stateful prolog process that handles
> multiple http requests.

This has other potential advantages, e.g. that someone else does
quite a bit of the work for you, takes responsibility for fixing
bugs, and handles lots of nitty gritty details of HTTP requests
and responses that you may need to handle if/when your application
matures, e.g. sessions, cookies, authentication...

If you want to play with servlets, I recommend donwloading Tomcat 3.0
from www.apache.org: this an all-Java servlet host which also acts as
a rudimentary Web server (i.e. you don't need Apache as well).

> While there is the jpl library for calling
> prolog from within java
> <http://blackcat.cat.syr.edu/~fadushin/software/jpl/>, I found it easier
> to use standard input/output for communication.

OK but I've got it to work with JPL, and you're welcome to reuse my
code (I'll email it to anyone who asks).

[potential disadvantage of the JPL approach: the Java VM shares
memory with the JPL library, the Prolog VM and any foreign code
loaded by it, and is thus vulnerable to corruption; i.e. commercial
or corporate Web servers may reasonably refuse to host servlets
which load Java "native methods"]

Basically, a servlet's "doGet" method is called when a GET request
arrives;
it is passed a "request" object and a "response" object; the method body
(which you write) extracts whatever info it needs from the request
object,
stashes its output (HTML, cookies etc.) into the response object, and
returns.

To couple this generically to Prolog I've tried to convert the request
object to a Prolog term, pass it to a Prolog "doGet" goal which should
succeed at most once, returning a response term which I convert (or
interpret) into a response object.

               public void doGet(                    do_get(
  HTTP GET -->     HttpServletRequest request,  -->      +Request,
                   HttpServletResponse response -->      -Response
               )                                     ) :- 

For now at least, the request term contains just about every detail
of the request object (I don't think it costs much to construct this,
and it's simpler than calling back into Java to get the details on
demand) as a "list-of-pairs" map (some of whose values are similar
maps):

Request = 
  [ secure-false,
    method-'GET',
    context_path-'/examples',
    query_string-'a0=proc&a1=pcm13&a2=pcm_2000&a3=0',
    request_uri-'/examples/servlet/WebGoal',
    servlet_path-'/servlet/WebGoal',
    protocol-'HTTP/1.1',
    remote_addr-'10.1.1.36',
    remote_host-'radford.smartarts.co.uk',
    scheme-http,
    server_name-radford,
    server_port-8080,
    headers-[
      'User-Agent'-'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT;
JungeLink)',
      'Accept'- */*,
      'Host'-'radford:8080',
      'Accept-Encoding'-'gzip, deflate',
      'Accept-Language'-'en-gb',
      'Referer'-'http://radford/index.html', 
      'Connection'-'Keep-Alive'
      ],
    parameters-[
      a2-pcm_2000,
      a1-pcm13,
      a0-proc,
      a3-'0'
      ],
    locales-[
      locale(en,'GB','')
      ]
    ]

and you can pull stuff out of this with e.g. memberchk/2

NB the Servlet API enumerates parameters in no particular order

NB some of these atom values could be parsed into terms, but I'd
rather do this in Prolog than in Java

NB this request term could be written to a pipe or socket in Lukas'
idiom, i.e. it's not peculiar to the JPL approach...

NB there are still some details of a request which are not
readily passable by value as above, but I haven't worried about
them (I lack motivation, being nowhere near needing them yet :-)

Paul Singleton


----------------
* To UNSUBSCRIBE, please use the HTML form at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist

or send mail to prolog-request@swi.psy.uva.nl using the Subject: "unsubscribe"
(without the quotes) and *no* message body.

** An ARCHIVE of this list is maintained at

    http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/


From owner-sigcse.members@ACM.ORG Fri Apr  7 10:56:01 2000
Message-Id: <200004071756.NAA06262@mail.acm.org>
Date:         Fri, 7 Apr 2000 10:15:53 -0700
Reply-To: Sharon Tuttle <st10@HUMBOLDT.EDU>
From: Sharon Tuttle <st10@HUMBOLDT.EDU>
Subject:      Java SUMMARY from very old: Re: Java and Theory textbooks query
To: SIGCSE.MEMBERS@ACM.ORG
In-Reply-To:  <Pine.OSF.4.10.9910291548510.19772-100000@axe.humboldt.edu>

Last semester, I sent out a request for suggestions for texts for two of
my courses. I was quite remiss in not yet summarizing the responses, BUT I
know that our bookstore here is now asking for Fall 2000 textbooks, so I
hope that this summary will still be of interest at this late date.

This part covers the Java textbook portion of that original query.

PART 1: JAVA TEXT SUGGESTIONS

TEXTS MENTIONED:
(in "chronological" order of mention in replies)
Deitel and Deitel, "Java How To Program", Third Edition: 2 references
Bell and Parr, "Java for Students", Prentice-Hall: 1 reference
van der Linden. "Just Java 2", 4th ed., Prentice-Hall, ISBN 0-13-010534-1: 1 reference
Budd, "Understanding Object-Oriented Programming with Java", Addison-Wesley: 2 references
Budd, "C++ for Java Programmers", Addison-Wesley: 1 reference
Winston, "On to Java": 1 reference

(and 1 mention of using their own notes, supplemented by Deitel and Deitel
"for those who must have a text".)

DETAIL:

Deitel and Deitel, "Java How To Program", Third Edition: 2 references
EXCERPTED COMMENTS:

"I use Deitel & Deitel, "Java: How to Program" (3rd ed).  It's not the
perfect book -- it aims at non-academic users, CS I, and more advanced
academic users. The sections on control structures and basic programming
are wasted for my class.  However, I like the early use of graphics and
the deferral of O-O details such as abstract classes and polymorphism.
It has a nice balance of dazzle to substance."

Bell and Parr, "Java for Students", Prentice-Hall: 1 reference
EXCERPTED COMMENTS:

"Check out *Java for Students* by Bell and Parr (Prentice-Hall).
We use it in a self-paced Java-as-a-second language course, for which
it seems to work fine and satisfies all your points; in particular,
the book starts with applets and doesn't get to applications until
rather late.  Its major flaw is that it doesn't mention much of anything
about java.utils."

van der Linden. "Just Java 2", 4th ed., Prentice-Hall, ISBN 0-13-010534-1: 1 reference
EXCERPTED COMMENTS:

"I can't directly speak to your desires, but our students are
using this book and like it a lot.  They're more advanced
than your sophomores, having 2 quarters of C++ with lots
of data structures ... but wouldn't hurt to check it out.
I'm not teaching the course, just word of mouth."

Budd, "Understanding Object-Oriented Programming with Java", Addison-Wesley: 2 references
EXCERPTED COMMENTS:

"This might be a bit off-topic, but I've used Tim Budd's "Understanding
Object-Oriented Programming with Java" (A-W) a couple of times.  His
presentation has a bit of a design orientation, but it's the best concise
intro to Java (both the language and basic libraries) that I've seen.
Applets are done late, but I think it would be easy enough to do them
early if you want."

"Budd has another book, OOP using Java, which has nice example programs (a
pinball construction game for example)."

Budd, "C++ for Java Programmers", Addison-Wesley: 1 reference
EXCERPTED COMMENTS:

"Have you considered Budd's book "C++ for Java programmers" (it can also
be used as a Java for C++ programmers)? This book goes into detail about
the subtle differences between the two languages (in terms of memory
management for example). It is published by Addison Wesley.  I haven't
read the entire book but it looks useful as a supplementary book since it
does not claim to cover either language in great detail."

Winston, "On to Java": 1 reference
EXCERPTED COMMENTS:

"I don't have any good ideas about the Java text, except to mention Winston's
On To Java - I think it is by far the best intro to Java for students who
can already program.  It's also really cheap. Unfortunately, it doesn't
meet any of your other wishes - about applets, etc."


APPENDIX:

Finally, here is the original query:
--------------------------------------------
On Fri, 29 Oct 1999, Sharon Tuttle wrote:
>
> Well, it is Spring 1999 textbook ordering time here, at least, and I've
> already missed the first bookstore deadline. 8-)
>
> In the hopes that a few folks here might have a strong opinion they'd like
> to share, I'm asking for textbook opinions for two different courses:
>
> First course - CIS 235 - Java Programming
> Assumptions:
>       * the course is a Sophomore-level programming course
>       * it is introducing Java to students who have had C++ in
>               a CS0/part of CS1 course (the only prerequisite)
>       * majors can take this as an elective, and it is a course
>               minors often take as well
>       * I really don't want to use a CS0/CS1 text --- I'd prefer a
>               Java-as-an-Nth-language text
>       * I really want applets to be covered early, not in Chapter 10
>       * I'd really prefer a text that doesn't use this-text-only
>               classes for I/O
>       * I currently jump-around in "Problem Solving with Java" by
>               Koffman and Wolz, which looks like a very nice CS1 text,
>               but see above
>
> If anyone has a book that they like that meets the above assumptions, I'd
> love to hear about it. If anyone simply has a favorite Java book, period,
> then I'd be interested in hearing about it even if it doesn't meet the
> above. 8-)
>
> Second Course - CIS 480 - Computer Theory
> Assumptions:
>       * We hope to offer a Computer Science degree some day, but in the
>               meantime, we're trying offering this as an elective to
>               interested and broad-minded CIS majors
>       * I want to cover the basics of Computer Theory, which I
>               persist in thinking is useful for anyone in the computing
>               field 8-)
>       * I do not mind skimping a bit on the proofs...
>       * I currently use "Introduction to Automata Theory, Languages,
>               and Computation" by Hopcroft and Ullman, which is a
>               venerable classic, but surely a more ... accessible?
>               ...text has come out in this area since 1979?
>
> Any suggestions here would be greatly appreciated. I have been trying to
> decide for a semester if Sipser's "Introduction to the Theory of
> Computation" is an improvement. I don't think Lewis and Papadimitriou's
> "Elements of the Theory of Computation" is. Any of these three texts look
> like they'd be fine for a graduate-level CS course, but I keep hoping
> there's an undergraduate-level text suitable for CIS students as well as
> CS and Math majors.
>
> I will post a summary of replies if I get any, so if you would not like
> your reply included in such a summary, please let me know.
>
> And if anyone wants my opinions of CIS database texts or CIS systems
> design/capstone texts, I'd be happy to provide them.
>
> Thank you very much!
>
> -- Sharon Tuttle
>    Department of Computing Science
>    Humboldt State University
------------------------------------------------------------
>

From owner-sigcse.members@ACM.ORG Mon Apr 10 09:30:37 2000
Message-Id: <200004101630.MAA84194@mail.acm.org>
Date:         Mon, 10 Apr 2000 12:31:01 -0400
Reply-To: Michael Feldman <mfeldman@SEAS.GWU.EDU>
From: Michael Feldman <mfeldman@SEAS.GWU.EDU>
Subject:      Write it in Ada; run it on your Java Virtual Machine
To: SIGCSE.MEMBERS@ACM.ORG

Hi all,

Those of you who visited the SIGAda exhibit at SIGCSE 2000 saw
(and maybe played) our ConnectFour "gnapplet", a Java JVM applet
written in Ada 95.

I'm writing now just to pass on to SIGCSE folks that Ada Core
Technologies (ACT) has recently released the compiler that produced
our gnapplet. This is called JGNAT, a version of GNU Ada 95 (GNAT)
that generates byte code for the Java Virtual Machine.

JGNAT, like all the GNAT compilers and tools, is fully open-source
and freely downloadable and distributable. The JGNAT release comes
with

- binary releases for Windows, Solaris, and Linux

- complete sources: JGNAT is written in Ada and can be compiled using
  the current release of GNAT, the GNU Ada 95 compilation system

- a number of interesting examples of JVM applications and "gnapplets"

- a complete set of Ada package specs for the JavaTM 2 Platform, Standard
  Edition, v1.2.2 API Specification. This set of specs can be used to
  write JVM applications and applets in Ada, using the full power of
  the Java Application Program Interfaces (APIs).

See

http://www.acm.org/sigada/education

for a front-page link to all the info on this exciting development.

I have no connection to ACT; I'm just a satisfied customer!

Mike Feldman

From rjbotting@aol.com Mon Apr 17 13:14:35 2000
From: rjbotting@aol.com (Richard J. Botting)
To: dick@csci.csusb.edu
Newsgroups: comp.lang.misc
Date: 17 Apr 2000 20:17:24 GMT
Organization: AOL http://www.aol.com
Subject: Re: How do i put java in my page???
Message-ID: <20000417161724.01422.00000833@ng-fx1.aol.com>

>Christopher Hahn wrote:
>
>> Here is the URL and the html code for a working
>> reference:
>> =======
>> http://www.eleganceintime.com/applets/calculation.html
>> =======
>> <APPLET
>> CODE="jsolitaire/calculation/Calculation.class" HEIGHT=450 WIDTH=680>
>>   JSolitaire Calculation requires a java-enabled browser
>> </APPLET>
>> =======
>>
>> Now, moving the html file up out of the applets subdirectory
>> and changing its reference yields:
>> =======
>> http://www.eleganceintime.com/calculation.html
>> =======
>> <APPLET
>> CODE="applets/jsolitaire/calculation/Calculation.class" HEIGHT=450
>WIDTH=680>
>>   JSolitaire Calculation requires a java-enabled browser
>> </APPLET>
>> =======
>>
>> Now this second reference fails with the error:
>> "Applet applets/jsolitaire/calculation/Calculation error:
>> java.lang.ClassFormatError: Wrong class name inside class file"
>>
>> WHY!
>>
>
>As far as I can see, you have forgotten to enter the CODEBASE tag into your
>applet code. It is a tag that will tell the html client (or browser, what you
>like to call it) that parses the HTML to search for the applet code in a
>specific
>directory. Information about this addition to the applet tag can be found in
>any
>book about html. If you still can not find it, mail me, and I will copy it
>and
>send it to you.
>
>grtz, Arjen aka Dwaal
>
>
>
>
>
>
>
>
>
>Subject: Re: How do i put java in my page???
>Path:
>lobby!newstf02.news.aol.com!portc01.blue.aol.com!portc.blue.aol.com!bigne
ws.mediaways.net!news.algonet.se!newsfeed1.telenordia.se!algonet!uab.erics
son.se!erinews.ericsson.se!newstoo.ericsson.se!not-for-mail
>From: "Arjen Reudink (ETM)" etmarre@etm.ericsson.se 
>Newsgroups: macromedia.dreamweaver, comp.lang.java, comp.lang.help,
>comp.lang.misc
>Date: Mon, 17 Apr 2000 16:47:57 +0200
>Organization: Ericsson
>Message-ID: <38FB241D.B44402CE@etm.ericsson.se>
><38F11D91.A7D90211@eleganceintime.com>
>NNTP-Posting-Host: dino.etm.ericsson.se
>X-Accept-Language: en
>Xref: lobby macromedia.dreamweaver:79536 comp.lang.misc:23386
>
>



rbotting at CSUSB edu
Computer Scientist, Sys Admin, Consultant, Researcher, and Reviewer
http://www.csci.csusb.edu/dick


From dick@csci.csusb.edu Tue Apr 25 13:51:52 2000
Message-ID: <390606AE.CF254AC3@csci.csusb.edu>
Date: Tue, 25 Apr 2000 13:57:18 -0700
From: Dick Botting <dick@csci.csusb.edu>
Reply-To: dick@csci.csusb.edu
Organization: CSUSB
X-Accept-Language: en
MIME-Version: 1.0
To: dick@csci.csusb.edu
Subject: sodaconstructor

http://www.sodaplay.com/constructor/

