[4288] in java-interest
java-interest-digest V1 #262
daemon@ATHENA.MIT.EDU (java.sun.com!owner-java-interest-d)
Fri Dec 15 14:06:45 1995
From: java.sun.com!owner-java-interest-digest@asoft.msk.su
Date: Tue, 14 Nov 1995 03:37:37 -0800
To: java-interest-digest@java.sun.com
Reply-To: java.sun.com!java-interest@asoft.msk.su
java-interest-digest Tuesday, 14 November 1995 Volume 01 : Number 262
In this issue:
Re: NS/Beta 2:"start: applet not intialized"
just checking compatibility issues
RE: Did I Get Everything
Native methods - UnsatisfiedLinkError
Mid-Atlantic JUG interest....
[none]
Socket problem
Socket Problem (new)
Object argument in action() for checkboxes
Re: Accessing information from the server side (fwd)
Re: just checking compatibility issues
Object argument in action() for checkboxes
Re: how to start?
Re: Native methods - UnsatisfiedLinkError
Audio in a standalone application
Re: how to start?
protected is not?
Re: declaration v.s. definition ambiguity
Re: OLE Interfaces
Background color in Graphics?
Button subclassing
Re: declaration v.s. definition ambiguity
Copyright Issues
Development tools etc.
xemacs java mode (was: Development tools etc.)
----------------------------------------------------------------------
From: Steve Azueta <azueta@lennon.sonicnet.com>
Date: Mon, 13 Nov 1995 12:02:25 -0500
Subject: Re: NS/Beta 2:"start: applet not intialized"
Troy says...
> I've had trouble getting NetScape 2.0b2 to run applets. All of my
> applets ran fine under the 2.0b1 version, but the second beta version
> just doesn't want to run them. Gives me all sorts of complaints.
> (BTW, my CLASSPATH points to the moz2_0.car dir, and I updated this
> file to the new moz2_0.car file.)
I had the very same trouble with Netscape 2.0b2 on Solaris 2.4. Here's
what I found:
Specifying the moz2_0.car directory path is NOT good enough for Netscape
2.0b2. Your CLASSPATH must specify the full path of the file. AND it
needs to be the FIRST path in CLASSPATH. Like so:
- ---------
# NO GOOD:
setenv CLASSPATH /usr/joe/moz_dir:/usr/local/classes
# GOOD:
setenv CLASSPATH /usr/joe/moz_dir/moz2_0.car:/usr/local/classes
#NO GOOD:
setenv CLASSPATH /usr/local/classes:/usr/joe/moz_dir/moz2_0.car
- ---------
The bad news is, this is understandably bad for javac, which correctly
parses CLASSPATH for paths, not files. I've reported this as a bug
to Netscape.
Hope this helps, good luck,
steve.
- --
Steve Azueta
azueta@sonicnet.com
------------------------------
From: parkl@huachuca-simcenter.army.mil (Laura Park)
Date: Mon, 13 Nov 1995 11:58:36 -0700
Subject: just checking compatibility issues
Am I correct to assume that a Java standalone application developed under the pre-beta release of Java on Solaris 2.3 will run with NO PROBLEMS under Solaris 2.4?
Also how about taking that same pre-beta developed stadalone application and running it under the beta release?
Just checking!
Thank you,
Laura
------------------------------
From: jazukow@rssi.rssi.com (John Zukowski)
Date: Mon, 13 Nov 1995 15:02:43 -0500
Subject: RE: Did I Get Everything
(Sorry not responding in newsgroup, can't post to that right now....)
Charlie:
>Question 1:
>
>I am running JDK beta 1.0 under Windows 95. I expanded the archive
>into a java subdir on my C: dirve and started going through the
>examples in the Sun on-line programmer's guide. Both the "Hello
>World" application and applet (under Netscape 2.0b2) run fine. The
>"run:" protocol hanlder, on the other hand, complained it couldn't
>find certain object definitions (in particular URLStreamHandler) which
>I think should have been imported by these two lines which appear at
>the start of the code
>
> import java.io.*;
> import net.www.html.*;
>
>My impression from the Java language Specification is that the target
>of these import lines correspond to subdirectories on my system. Is
>that true? I can't find a "io" or a "net/www/html" tree on my system.
From the installation directory, these would be in something like:
$JAVAHOME/classes/java/io/....
John Zukowski
Rapid Systems Solutions
http://www.rssi.com/info/java-info.html
------------------------------
From: anoor@hedley.East.Sun.COM (Arshad Noor - Technical Mgr - Sun Integration)
Date: Mon, 13 Nov 1995 15:24:11 -0500
Subject: Native methods - UnsatisfiedLinkError
I'm having a problem getting Java to successfully execute an application that
has a native method in it. Even the examples that are part of the Programmers
Guide do not work. The actual message (only 2 lines) is:
java.lang.UnsatisfiedLinkError: displayHelloWorld
at Main.main(Main.java:3)
I'm using the Beta JDK on a Solaris 2.5 machine; my CLASSPATH is set correctly,
and so is my LD_LIBRARY_PATH. The libhello.so exists so there is no problem
with the files not being available.
I'm not even able to execute the Replace example due to a similar problem. Is
there anything I'm missing here? Thanks in advance.
================================================================================
Arshad Noor 400 Atrium Drive
Technical Manager Somerset NJ 08873
Sun Integration Voice: (908) 302-3822
Arshad.Noor@East.Sun.Com Fax: (908) 469-4098
================================================================================
------------------------------
From: jazukow@rssi.rssi.com (John Zukowski)
Date: Mon, 13 Nov 1995 15:32:16 -0500
Subject: Mid-Atlantic JUG interest....
We've heard some local interest about forming a Mid-Atlantic JUG and we (Rapid
Systems Solutions) were looking at sponsoring the first local meeting in
mid-December.
In order to gauge local interest to see what kind of facility we would need,
we are trying to determine the interest level.
Can you please respond to the following survey to express your interest level...
Are you interested in attending monthly meetings in the Baltimore/DC-Metro area?
If yes, what location would be best for you?
Columbia, MD
Beltsville, MD
Tysons Corner, VA
Bethesda, MD
Arlington, VA
Washington, DC
Baltimore, MD
Wilmington, DE
Richmond, VA
Herndon, VA
Other: _______________
Are you interested in an email support group?
Are there any particular topics of interest you would like discussed?
Are there any particular topics of interest you can present?
Purpose would be general sharing of information/ideas, networking, teaching,
etc.
Thanx in advance.
Please send all responses to john.zukowski@rssi.com (or just reply)
John Zukowski
Rapid Systems Solutions
http://www.rssi.com/info/java-info.html
P.S. Java Day West was great, just got back.... (from CA)....
------------------------------
From: "Ka-Fai Lau(MS)" <klau01@widelux.poly.edu>
Date: Mon, 13 Nov 1995 15:44:44 -0500 (EST)
Subject: [none]
Hi, I have a question which need somebody please could help me.
When I use the method getLocalPort from the SocketServer Class, I always
get an compiling error saying that the method not found in class such as
such.
For example,
ServerSocket Sock = new ServerSocket(0,100);
Sock.getLocalPort();
Thanks
------------------------------
From: "Ka-Fai Lau(MS)" <klau01@widelux.poly.edu>
Date: Mon, 13 Nov 1995 15:46:17 -0500 (EST)
Subject: Socket problem
Hi, I have a question which need somebody please could help me.
When I use the method getLocalPort from the SocketServer Class, I always
get an compiling error saying that the method not found in class such as
such.
For example,
ServerSocket Sock = new ServerSocket(0,100);
Sock.getLocalPort();
Thanks
------------------------------
From: "Ka-Fai Lau(MS)" <klau01@widelux.poly.edu>
Date: Mon, 13 Nov 1995 15:57:14 -0500 (EST)
Subject: Socket Problem (new)
Hi, I have a question which need somebody please could help me.
When I use the method getLocalPort from the SocketServer Class, I always
get an compiling error saying that the method not found in class such as
such. The JDK I am using is 1.0 beta.
For example,
ServerSocket Sock = new ServerSocket(0,100);
Sock.getLocalPort();
Thanks
------------------------------
From: suresh@thomtech.com (Suresh Srinivasan)
Date: Mon, 13 Nov 1995 15:50:31 -0500
Subject: Object argument in action() for checkboxes
Hello:
I'm overriding the action() method in a Frame that has a Panel
with some Checkbox items that are part of a CheckboxGroup
as in:
p = new Panel();
cg = new CheckboxGroup();
mm = new Checkbox("Manual", cg, true);
ma = new Checkbox("Auto", cg, false);
p.add(mm);
p.add(ma);
In the action method for the Frame, I'm trying to detect the
selection of the checkbox items as in:
public boolean action(Event e, Object o) {
System.out.println("Event: " + e + " Object: " + o);
if (e.target instanceof Checkbox &&
("Manual".equals((String)o))) {
// ("Manual".equals(((Checkbox)(e.target)).getLabel()))) {
System.out.println("Manual checkbox selected");
}
}
The Object argument to this method is instantiated to a java.lang.Boolean
set to "true" instead of (as in the button object), the label for
the checkbox, i.e., "Manual". It produces a run time cast exception.
Here's the output of the first print:
Event: java.awt.Event[id=1001,x=118,y=50,target=java.awt.Checkbox[0,20,66x20,label=Auto,state=true],arg=true] Object: true
java.lang.ClassCastException: java.lang.Boolean
...
The second option (commented above) works. I was wondering if this is an
error.
Cheers!
- --Suresh
------------------------------
From: Suresh Payankannur <suresh@acgeas.com>
Date: Mon, 13 Nov 1995 12:45:49 -0800 (PST)
Subject: Re: Accessing information from the server side (fwd)
Thanks for the info. Here is the problem
>
> >2. How can I run a CGI script from an applet ?
>
> Why would you want to do this? Well, you would have to mimic the http
> protocol and request the information from the server in that way.
>
> Gary
>
>
I already have some applications with Netscape/CGI combination. I am
planning to incorporate Java applets for certain applications which
cannot be done otherwise. One problem I am facing is to access
the database (an OODB), which has a C++ interface. The current
implementations talk to CGI scripts to access the database. To keep this
uniform, I would like to use the same mechanism for Java applets also, ie to
talk to some CGI scripts which will return the required query results etc,
so that I need not have to change that portion of the existing application.
The requirement is how do I use the applet to run a program
whether in C, Perl or Tcl on the server side and get the results back ?
It will be nice if some way I could tell the server to run a CGI script.
- -- suresh --
------------------------------
From: Thomas.Ball@Eng.Sun.COM (Thomas Ball)
Date: Mon, 13 Nov 1995 13:04:18 -0800
Subject: Re: just checking compatibility issues
> Am I correct to assume that a Java standalone application developed
> under the pre-beta release of Java on Solaris 2.3 will run with NO
> PROBLEMS under Solaris 2.4?
It will run with *the same* problems. Can't vouch for unseen code,
after all. <grin>
> Also how about taking that same pre-beta developed stadalone application
> and running it under the beta release?
That should work (in theory), although there have been a few very minor
API fixes. You can verify whether any of these changes affect your
code by recompiling with the beta environment.
Tom Ball
Java Products Group
------------------------------
From: suresh@thomtech.com (Suresh Srinivasan)
Date: Mon, 13 Nov 1995 16:31:35 -0500
Subject: Object argument in action() for checkboxes
Never mind. I get it now. A checkbox has a boolean state
and *that* was what was being returned.
I think I'll go home now ;-)...
- --Suresh
------------------------------
From: Rich Norgaard <norgaar@server.uwindsor.ca>
Date: Mon, 13 Nov 1995 16:34:01 -0500 (EST)
Subject: Re: how to start?
> Hi,
> I am just testing a example program that everyone has run.
> That's the 'HelloWorld' program. It seems I have correctly
> compiled it(got a HelloWorld.class), but when I use hotjava
> to see it, the HelloWorld class doesn't work.
Set your class path to the location of your classes.
i.e. setenv CLASSPATH /.../classes
Also make sure your read path is set:
setenv HOTJAVA_READ_PATH /.../hotjava:/.../jdk
Try that out!
Rich
------------------------------
From: Thomas.Ball@Eng.Sun.COM (Thomas Ball)
Date: Mon, 13 Nov 1995 14:18:59 -0800
Subject: Re: Native methods - UnsatisfiedLinkError
You can verify that the library was successfully loaded (you *are*
calling System.loadLibrary() in a static initializer, aren't you?) with
truss. Something like:
% truss -f -t open -s\!all java <java app and args> |& tee open.log
should show you what attempts Java is making on loading your library.
The open.log file will then show all open attempts, the paths used and
whether the call was successful or not.
Tom Ball
Java Products Group
> I'm having a problem getting Java to successfully execute an application that
> has a native method in it. Even the examples that are part of the Programmers
> Guide do not work. The actual message (only 2 lines) is:
>
> java.lang.UnsatisfiedLinkError: displayHelloWorld
> at Main.main(Main.java:3)
>
> I'm using the Beta JDK on a Solaris 2.5 machine; my CLASSPATH is set correctly,
> and so is my LD_LIBRARY_PATH. The libhello.so exists so there is no problem
> with the files not being available.
>
> I'm not even able to execute the Replace example due to a similar problem. Is
> there anything I'm missing here? Thanks in advance.
------------------------------
From: Robert W Armstrong <robert+@andrew.cmu.edu>
Date: Mon, 13 Nov 1995 17:32:38 -0500 (EST)
Subject: Audio in a standalone application
I've been trying to play audio clips in a standalone Java application
with little success. It seems the only possible way to do this without
using anything in the sun.* tree would be to import java.applet.* and
then do something like:
play(new URL("http://site.com/soundfile.au"));
or
AudioClip clip = new AudioClip;
clip = getAudioClip(new URL("http://site.com/soundfile.au"));
clip.play();
Neither of these work, I get errors that Java cannot find getAudioClip()
and play(). How might I go about doing this? Thanks.
robert
------------------------------
From: hideo-i@tech.toppan.com (Hideo Inoue)
Date: Mon, 13 Nov 1995 14:47:21 -0800
Subject: Re: how to start?
At 5:01 PM 95.11.13 -0800, Gu Xinji wrote:
>Hi,
>I am just testing a example program that everyone has run.
>That's the 'HelloWorld' program. It seems I have correctly
>compiled it(got a HelloWorld.class), but when I use hotjava
>to see it, the HelloWorld class doesn't work.
>
>the foot notes says:
>
>Applet HelloWorld from file:///.... not loaded.
>
>could anyone kindly tell me why ?
>Thanks a lot.
>
>Gu Xinji
>guxj@email.synet.edu.cn
>-
I guess you use JDK-prebeta or JDK-beta to compile your source code.
"hotjava" does't support applets created by JDK-prebeta or later version.
You can see the applet by appletviewer which comes with JDK-(pre)beta.
If you compile your source code with "javac" comannd which comes with
hotjava, (I think) you can run it on hotjava.
Hideo Inoue
------------------------------
From: daconta@primenet.com (Michael Daconta)
Date: Mon, 13 Nov 1995 16:38:15 -0700 (MST)
Subject: protected is not?
Here is a simple chunk of code that does not
seem to work properly.
class junk {
protected String name;
junk(String inName)
{
name = new String(inName);
}
}
class Protect {
public static void main(String args[])
{
junk apiece = new junk("piece of junk");
System.out.println(apiece.name);
}
}
This code compiles and prints out the name of the
object. The problem is that the compiler should not have
let me do this. name is a protected variable. protected should
mean that inaccesible except to subclasses.
Any ideas or is this a bug?
I am using the beta for Win95.
- Mike Daconta
------------------------------
From: daconta@primenet.com (Michael Daconta)
Date: Mon, 13 Nov 1995 16:50:21 -0700 (MST)
Subject: Re: declaration v.s. definition ambiguity
At 09:32 AM 11/13/95 -0700, Gary Aitken wrote:
>
>
>>You seem to be thinking of declaration vs definition as it is used in
>>ANSI C whereby declaration announces to the compiler the identifier and
>>type and whereby definition is both the announcing to the compiler and
>>the reservation of storage space.
>>
>>It seems that this is now changing in C++.
>
>Yes. I have not read all of the latest draft on this,
>so I'm probably off then.
>
>>The most simplest way to phrase the question is this:
>>
>>what do you call this:
>>
>>class myObject {
>> int a;
>>
>> myObject()
>> {
>> a = 0;
>> }
>>
>> // other methods
>>
>>}
>>
>>Is it a class declaration OR
>> a class definition.
>>
>>If you go by ANSI C: class declaration (even though there are no classes)
>> by C++: class definition
>> by Java: class definition????
>
>I don't think you have much choice but to call it a class definition, since
>it is the only thing allowed, and there can be only one of them.
>
I would also agree that it can be called a class definition; however,
since no storage space is reserved for this it goes against the
ANSI C definition.
I only care which one is chosen so that we can nail down the
working definitions for declaration versus definition.
I think it currently is:
declaration: Only an announcement to the compiler of an identifier to be
reserved in the current name space. In ANSI C, accomplished with the
extern keyword. For functions accomplished by omitting the function body.
For structures and classes accomplished with type identifier and no body.
definition: An announcement to the compiler of an identifier to be
reserved in the current name space. For primitive types, accompanied
with a reservation of storage space. For user-defined types,
accomplished by specifying the structure or class body. For functions
accomplished by specifying the function body.
How does this sound?
Do any language lawyers disagree?
I am just tired of seeing these terms used interchangeably. They
should have distinct meanings.
- Mike Daconta
------------------------------
From: michael@w3media.com (Michael Mehrle)
Date: Mon, 13 Nov 1995 16:18:19 -0700
Subject: Re: OLE Interfaces
>
>OLE would of course be OS dependent but as I understand it (in my fledgling
>state) the windows toolkit is an abstract class which has implementations for
>each specific OS. Would it therefore not be possible (indeed ideal) to
>implement a generic drag and drop class whoich would use OLE (or other such as
>DDE) on Microsoft platforms, Tooltalk on Unix platforms (esp. those with CDE)
>and whatever is relevent for MAC and any others.
>This would enable all implementors to cope with the applets using D&D or other
>OLE features and implent in a manner suitable to their platform. To my mind
>this would be much more in keeping with Java principles and would remove any
>payments that good old Bill might wish to tap us up for at a later date!
>
I certainly agree with the comment above. It would greatly decrease
development time and provide a `one-stop interface` without having to cope
with ten different operating systems. As a matter of fact, the foremost
*promise* of Java is to run independently on all supported platforms; it is
therefore almost mandatory to provide a generic class like the one
suggested above. I'm actually surprised to hear that it hasn't yet been
implemented yet.
Okay now, who is volunteering? ;)
Michael
||||
o o
____________OOOo___<>___oOOO_______________
http://www.w3media.com/w3media
michael@w3media.com
Tel. 310.441.9599
Fax 310.441.5919
"One man's mundane and desperate existence
is someone else's Technicolor."
-Strange Days-
------------------------------
From: William Cook <william@luma.com>
Date: Mon, 13 Nov 1995 17:15:01 -0800
Subject: Background color in Graphics?
The Graphics class has a ClearRect method whose documentation
string mentions "the current background color" but there are no methods to
set the background color. This seems obviously incomplete... which way
will it go in the future?
In general I am having trouble getting my Components to be transparent.
Is there any chance that the peers are clearing my window? How can
I prevent it (I am trying to override update, but without success)?
I am using the Beta APIs on WindowsNT.
- -william
------------------------------
From: Ken Root <Ken_Root@ccm.jf.intel.com>
Date: Mon, 13 Nov 95 17:24:00 PST
Subject: Button subclassing
I need to handle MouseDown and MouseUp events separately in a button
but even with subclassing the button class, all I get is the event
when the button is released.
Any clues, tips, or examples on how to do this?
Thanks!
- Ken (the "real" root)
ken_root@ccm.jf.intel.com
------------------------------
From: garya@village.org (Gary Aitken)
Date: Mon, 13 Nov 1995 21:47:23 -0700
Subject: Re: declaration v.s. definition ambiguity
>I would also agree that it can be called a class definition; however,
>since no storage space is reserved for this it goes against the
>ANSI C definition.
It may go against the ANSI C definition in some ways; I'm no language lawyer.
However, it does reserve storage for the class in the sense that it
reserves all the storage which is the implementation of the
methods for the class, plus all static members of the class.
Said another way, it reserves storage for all aspects of a class which
do not require additional storage allocation when an object of the class
is instantiated.
>I think it currently is:
>
>declaration: Only an announcement to the compiler of an identifier to be
>reserved in the current name space. In ANSI C, accomplished with the
>extern keyword. For functions accomplished by omitting the function body.
>For structures and classes accomplished with type identifier and no body.
>definition: An announcement to the compiler of an identifier to be
>reserved in the current name space. For primitive types, accompanied
>with a reservation of storage space. For user-defined types,
>accomplished by specifying the structure or class body. For functions
>accomplished by specifying the function body.
If I read the above correctly, the following is a declaration of Foo,
not a definition:
public static void main ( String argv[] ) {
MyClass foo;
}
But it seems to me this is a definition.
Also, abstract methods cannot have a body (unfortunately; should be may not)
As I understand the current syntax and semantics,
it seems to me that a declaration is:
An announcement to the compiler of an identifier to be reserved
in the current name space, with no storage allocation.
and a definition is:
An announcement to the compiler of an identifier to be reserved
in the current name space, together with the reservation of
storage for the identifier.
If we remember to take into account the difference between a class, and
an instance of a class, the above is all consistent. In a class definition,
the storage is allocated for the class itself -- the stuff which implements
the class; not an instance of the class.
A class, in java, is never just declared. It is declared
and defined in one operation. The definition amounts to allocating
storage for all aspects of the class which do not require additional
storage allocation when an object of the class is instantiated.
A class instantiation, such as the "MyClass foo;" above, is a
definition, as it reserves the storage associated with the instance.
An interface, in java, is always declared, but never defined,
since the definition of an interface is dependent on the class
which implements the interface; a definition for an interface
effectively occurs in the context of a class which implements
the interface.
Does this make sense?
And please remember I'm no expert on this -- Arthur or somebody else
should pass judgement on any statements like the ones I made above.
Gary Aitken garya@village.org
------------------------------
From: juanda@edx1.educ.monash.edu.au (Juanda Ismail)
Date: Tue, 14 Nov 1995 18:27:28 +1100
Subject: Copyright Issues
Not a technical query, here folks, but one of legallity.
I'm using the "Nervous Text" applet where I've customised the wording of the
text so that it reads the title of my home page. Just wondering if this is ok.
If not, I'll remove the page from the web.
Cheers,
Juanda.
*****************************************************************************
Juanda Ismail
Peter Lalor Secondary College, Melbourne, Australia.
Ph.61-3-9464-0122 Fax.61-3-9465-6590
http://netspace.net.au/~plsc/ E-mail: plsc@netspace.net.au
Projects: http://edx1.educ.monash.edu.au/~juanda/
A Mag-Net School; http://mag-net.vut.edu.au/
------------------------------
From: Horlock.Neil.at.ext06lon@ft.com (Horlock Neil)
Date: Mon, 13 Nov 1995 14:01:14 +0000
Subject: Development tools etc.
This is a Mime message, which your current mail reader
may not understand. Parts of the message will appear as
text. To process the rest, you will have to use a Mime
compatible mail reader. Contact your vendor for details.
- --IMA.Boundary.816346812
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Description: cc:Mail note part
On the subject of dev. tools etc. for Java there is a Java mode for Emacs
It is far from complete (it has been cut up from the C++ mode) but to those of
you who use emacs it is a good start, it has font-lock (syntax hilites) and
other stuff. I got it from my local sunsite (imperial college London) in the
/pub/java/contrib/emacs/ directory
Other mirrors will also have it I guess.
NOTE: Xemacs users.
I cannot get it to work with xemacs my guess is that the default mode that the
java mode inherits from (c++) is not the same lisp package under emacs as it is
under xemacs. I may try to fix this, I'll let you know if I do.
Neil Horlock
Financial Times Information
horlock.neil@ft.com
- --IMA.Boundary.816346812
Content-Type: text/plain; charset=ISO-8859-1; name="RFC822 message headers"
Content-Transfer-Encoding: 7bit
Content-Description: cc:Mail note part
Received: from inetgate.ft.com by smtpgate.ft.com with SMTP
(IMA Internet Exchange v1.04) id 0a482b80; Sat, 11 Nov 95 11:02:16 +0000
Received: (from daemon@localhost) by inetgate.ft.com (8.6.10/8.6.9) id LAA26729 f
or <Horlock.Neil.at.ext06lon@ft.com>; Sat, 11 Nov 1995 11:04:34 GMT
Received: from java.sun.com(206.26.48.100) by inetgate.ft.com via smap (V1.3)
id sma026727; Sat Nov 11 11:04:27 1995
Received: (from daemon@localhost) by java.sun.com (8.6.12/8.6.12) id OAA19595 for
java-interest-recipients; Fri, 10 Nov 1995 14:56:46 -0800
Received: (from majordom@localhost) by java.sun.com (8.6.12/8.6.12) id OAA19507 f
or java-interest-outgoing; Fri, 10 Nov 1995 14:56:24 -0800
Date: Fri, 10 Nov 1995 14:55:46 -0800
From: Thomas.Ball@Eng.Sun.COM (Thomas Ball)
Message-Id: <9511102255.AA17980@alapa.Eng.Sun.COM>
To: garya@village.org
Subject: Re: organization of class path
Cc: java-interest@java.Eng.Sun.COM
X-Sun-Charset: US-ASCII
Sender: owner-java-interest@java.sun.com
Precedence: bulk
X-Info: To unsubscribe, send 'unsubscribe' to java-interest-request@java.sun.com
- --IMA.Boundary.816346812--
------------------------------
From: Anselm Baird_smith <Anselm.Baird_Smith@inria.fr>
Date: Tue, 14 Nov 1995 12:36:48 +0100
Subject: xemacs java mode (was: Development tools etc.)
Horlock Neil writes:
> On the subject of dev. tools etc. for Java there is a Java mode for Emacs
> It is far from complete (it has been cut up from the C++ mode) but to those of
> you who use emacs it is a good start, it has font-lock (syntax hilites) and
> other stuff. I got it from my local sunsite (imperial college London) in the
> /pub/java/contrib/emacs/ directory
>
> Other mirrors will also have it I guess.
>
> NOTE: Xemacs users.
> I cannot get it to work with xemacs my guess is that the default mode that the
> java mode inherits from (c++) is not the same lisp package under emacs as it is
> under xemacs. I may try to fix this, I'll let you know if I do.
You may want to try this, which works for me under xemacs19.13. It is
probably wrong but at least it works for me ;-)
Anselm.
- ---------
;; java-cust.el
; (load "cplus-md")
; (load "java-mode")
(load "java-f-lock")
(defvar java-mode-map nil "Java mode map")
(if java-mode-map
()
(setq java-mode-map (copy-keymap c++-mode-map))
(define-key java-mode-map '(meta backspace) 'backward-kill-word)
(define-key java-mode-map '(meta backward) 'backward-kill-word)
(define-key java-mode-map '(meta delete) 'backward-kill-word)
(define-key java-mode-map '(meta control h) 'backward-kill-word) )
(defun java-mode ()
"Major mode for editing java code.
See the documentation for c++-mode: java-mode is an extension of
c++-mode.
Use the hook java-mode-hook to execute custom code when entering Java
mode.
\\{java-mode-map}"
(interactive)
(let ((current-c++-mode-hook (and (boundp 'c++-mode-hook) c++-mode-hook)))
;; Temporarily disable the c++-mode hook; don't wanna run
;; it when loading up c++-mode.
(setq c++-mode-hook nil)
(c++-mode)
(setq major-mode 'java-mode mode-name "java")
(use-local-map java-mode-map)
;; Restore the original c++-mode-hook.
(setq c++-mode-hook current-c++-mode-hook)
(run-hooks 'java-mode-hook)))
(add-hook 'java-mode-hook
(function
(lambda ()
(if (eq major-mode 'java-mode)
(progn
(setq font-lock-keywords java-font-lock-keywords)
(c-set-offset 'inher-cont '+)
(font-lock-fontify-buffer))))))
(provide 'java-cust)
- --------
------------------------------
End of java-interest-digest V1 #262
***********************************
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com