Re: javac 1.2 a real pig

1999-03-13 Thread Volker Augustin

I am only using jikes since it appeared. I have not had any problems with it. There 
are 
however both a stable version (currently 0.42) and a developer version (v0.47) which 
you might 
want to try. They fixed a few JDK1.2 bugs recently. The developer version is available 
from 
http://www.ibm.com/research/jikes and the stable version is available from 
http://www.alphaworks.ibm.com/
Volker
> Date:  Fri, 12 Mar 1999 10:08:27 -0600
> From:  Steve Cohen <[EMAIL PROTECTED]>
> To:[EMAIL PROTECTED]
> Subject:   javac 1.2 a real pig

> both time-wise and memory usage wise.  I've had to boost the default
> heap size to 20 MB.  (Possibly this is because I'm compiling with
> -verbose because I had to see what the heck was taking it so long.)
> 
> Is a 1.2-compatible jikes available yet?  The jikes I used for 1.1.7
> seems to zip through the files with its usual speed, but when I go to
> run the thing I get "NoSuchClassExceptions" in my main class.
> 
> 
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 
> 
Volker Augustin
Karl-Stieler-Str. 86
Zi. 3206
93051 Regensburg

Tel.: 0941-945-3206
Homepage: http://home.pages.de/~Volker.Augustin/


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



Re: javacc

1999-03-13 Thread Andreas Rueckert

Hi!

On Sat, 13 Mar 1999 Stefan Lauterbach wrote:
>Hi,
>
>of course the wrong list. But maybe one of the java wizards here on the
>list knows the answer: How can I get the actual line at the end of a rule
>in the Java Compiler Compiler (javacc) ?

Your underlying inputstream should have a method getEndLine(), if your JavaCC
release is not too old. Read the JavaCC FAQ for information on how to get the
last token of a rule.

Ciao,
Andreas



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



Java Machine Code

1999-03-13 Thread Chengyan Che

Hi Friends,

I am kind of newbie to both java and linux. Using JDK1.1.1, I've made a
small java application which is intended to be used as a CGI script running
on Linux(RedHat), Apache as http server. But how can I compile it into a
native Linux machine code executable, instead of a .class file? I don't find
any options for "javac" to achieve this. Where can I find such a compiler?

Thanks in advance for any input.

Chengyan


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



How to create a NetworkClassLoader in JDK1.1.x?

1999-03-13 Thread Volker Augustin

Hi!
Does anyone know how to create a NetworkClassLoader? A ClassLoader loading classes 
from a URL such as http://www.test.com/testdir/ ?
Is it possible to load classes from a jar file at the specified URL?
I can only use JDK1.1.x and don't have the possibility to upgrade to 1.2 on my system.
Help is appreciated. Thanks. Volker


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



Benchmark of a Java application

1999-03-13 Thread Kontorotsui

Hello,
I hope this is not OT.

I have a Java distributed application that works on a network of Linux PCs.
Is there a way to tell, at the end of the computation, how much time was spent
for each method (of course I mean on the local istance of the program)? 
Something like...

method update() was called 24311 times, which took 2869.23 ms (2% of the
  program execution time)

Since this performance meter could be OS-dependant I think this is the right
place to ask.

Thanks for your help.

---
Andrea "Kontorotsui" Controzzi - MALE Student of Computer Science at 
University of Pisa  -  Italy  -  E-mail: [EMAIL PROTECTED]
My home page: http://www.cli.di.unipi.it/~controzz/intro.html

Founder and Admiral of Hoshi no Senshi (italian Leiji Matsumoto's fan group).
Creator of It.Arti.Cartoni (italian anime newsgroup) and proud member of...

+-+
|.  * .   |
|   .__ . .   |
|oq  |po   _ _|
|  /  #==>>>==#,-' (_)\   |
|  |  ,-|~\\   ///_ ,()  ,_}  |
|  |  |/|~]]] /// ,-~'  .,~   /   \|  .   |
|  |\_|_|_\_\~~~~'   \   (/|. |
| ./~ \___/   [m] \   \__//   |
| _bo..__ //   `-,.~~ |
|  _-~ 0o.__( .   |
| \  o  . |
|  .  (_)00   |
|. \~~~*,,,* ~00  |
|~0 . |
|   ~~~---~~  |
|   .*|
+-+


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



swing changes?

1999-03-13 Thread Steve Cohen

I have ported my application from 1.1.7 to 1.2, and after changing all
the com.sun.java to swing gotten the application to compile.  It blows
up, however, with a null pointer exception, the first time the user
presses a button which eventually triggers a call to
JComponent.paintAll().  The components were originally painted once,
successfully without causing null pointer exceptions so I'm curious what
the difference could be.  This code gave no trouble in jdk 1.1.7.

I have looked at everyplace I could think of on the Sun site documenting
changes in API to see if there was anything about this sort of thing and
came up empty.  It would seem that for something this simple to break it
would have to be a major change in the way the whole swing system works.

Does anyone have any information on any sort of macro-level changes to
swing that could cause this behavior?  Or could it be a bug in the linux
port?  (I don't have a 1.2 platform yet to test the code under Windows,
but I will soon.)  In any case I have sent a bug report but perhaps
someone here has information.


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



Missing fonts and pointer exceptions

1999-03-13 Thread Steve Cohen

I've seen the reply to msg 540 on the bug system about these missing
fonts, suggesting I copy them into my /jre/lib/fonts directory but I
don't know where to get these font files.  d051.pfb and s051.pfb
are not found anywhere on my system.

I wonder if this has anything to do with the NullPointerException I've
reported previously, since the font messages do occur for me before the
exception occurs.


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



Questions concerning jikes.

1999-03-13 Thread Justin Knotzke


Hi,

I probably should complain to IBM about this but just in case I can get
a faster answer from the list: Has anyone been able to download Jikes
from IBM? I get an error because when it's time to download IBM tries to
point my browser to ftp:/alpha. (note the missing /) when I try to
add it myself it does not work since it must be a servlet handing out
the username and password..


Also, is there a noticeable difference in speed?

Thanks
Justin Knotzke.


-- 
Justin F. Knotzke
[EMAIL PROTECTED]
www.shampoo.ca
pgp pubkey: finger -l [EMAIL PROTECTED] | pgp


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



Re: How to create a NetworkClassLoader in JDK1.1.x?

1999-03-13 Thread Nelson Minar

(An aside - why do people keep dumping questions not appropriate to
java-linux on this list? It's not even ignorance - people keep saying
things like "I know I should ask this elsewhere, but...". Folks,
that's just plain rude. Please stop.)

At the risk of encouraging more off-topic posts, I'll answer this:

>Does anyone know how to create a NetworkClassLoader? A ClassLoader
>loading classes from a URL such as http://www.test.com/testdir/ ?

You're going to be much happier doing this in Java 1.2, but if you
have to do it in 1.1, you're sort of on your own. RMIClassLoader and
AppletClassLoader both have the basics of what you need, but not
readily in the form you need them.

A good article on how classloaders work is at
  http://www.javaworld.com/javaworld/jw-10-1996/jw-10-indepth.html

  [EMAIL PROTECTED]
.   .  . ..   .  . . http://www.media.mit.edu/~nelson/


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



deregister_frame_info undefined

1999-03-13 Thread GRANT, SCHUYLER D.

Got past the fpucw undefined by doing
g++ -shared -o /usr/lib/libstdc++-libc6.0-1.so.2 -lm -lc
but now get /lib/i386/libfontmanager.so: 
/usr/local/jdk1.2/jre/lib/i386/libfontmanager.so: undefined symbol: 
__deregister_frame_info
when doing swing code
Suggestions?


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



Re: Questions concerning jikes.

1999-03-13 Thread Geoffrey T. Cheshire

On Sat, 13 Mar 1999, Justin Knotzke wrote:
> 
>   I probably should complain to IBM about this but just in case I can get
> a faster answer from the list: Has anyone been able to download Jikes
> from IBM? I get an error because when it's time to download IBM tries to
> point my browser to ftp:/alpha. (note the missing /) when I try to
> add it myself it does not work since it must be a servlet handing out
> the username and password..

Try the developers' site at--

http://www.research.ibm.com/jikes/

Much less pomp and flapdoodle (no cgi crap, frames, or even graphics).  
You can use wget from there -- I've found wget to be the most reliable
ftp/http client.

>   Also, is there a noticeable difference in speed?

Heck yeah.

Geoff

-- 
Geoffrey T. Cheshire <[EMAIL PROTECTED]>


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



Re: Java Machine Code

1999-03-13 Thread Nathan Meyers

Chengyan Che wrote:
> 
> Hi Friends,
> 
> I am kind of newbie to both java and linux. Using JDK1.1.1, I've made a
> small java application which is intended to be used as a CGI script running
> on Linux(RedHat), Apache as http server. But how can I compile it into a
> native Linux machine code executable, instead of a .class file? I don't find
> any options for "javac" to achieve this. Where can I find such a compiler?

Compiling to native platforms is not part of the Java story, other than
just-in-time compilation provided at runtime within individual JVM
environments. That said... there is work going on to do just what you
describe: check out http://www.cygnus.com/product/javalang/ .

OTOH, it sounds like what you're really looking for is to run Java from
your web server. You've got three approaches available: 1) have a CGI
script invoke the JVM, or 2) add Java servlet capability to your server
(that is available for Apache somewhere), or 3) get a Java-based server
that has native servlet capability, such as Jigsaw
(http://www.w3.org/Jigsaw/).

Since these issues are not specific to the Linux platform, you might
want to look for mailing lists or newsgroups that are more focused on
general Java questions or on servlets.

Nathan


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



Re: Benchmark of a Java application

1999-03-13 Thread Nathan Meyers

Kontorotsui wrote:
> 
> Hello,
> I hope this is not OT.
> 
> I have a Java distributed application that works on a network of Linux PCs.
> Is there a way to tell, at the end of the computation, how much time was spent
> for each method (of course I mean on the local istance of the program)?
> Something like...
> 
> method update() was called 24311 times, which took 2869.23 ms (2% of the
>   program execution time)

If you've moved to the new JDK1.2, you'll find new profiling
functionality, -Xrunhprof, that begins to address that problem. I just
recently wrote a perl-based tool that massages the profiling output into
something more useful. I'm planning to publish the tool this weekend;
stay tuned.

Nathan


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



java and glibc2.1

1999-03-13 Thread Seth M. Landsman

Grr ...  

So debian unstable branch has gone to glibc2.1, which breaks many,
many things, including the jdk1.1.7 from blackdown.  So, while I really
would like to participate in the debugging effort of debian, my lack of
having a play machine and the necessity of doing real work has to take
precedence.
Okay, so my questions are : does the jdk1.2pre1 work on glibc2.1
systems?  If not, any chance we could get a glibc2.1 compiled jdk (1.1.7
or 1.2) out of you guys?

Thanks,
-Seth
--
"It is by will alone I set my mind in motion"


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



Re: java and glibc2.1

1999-03-13 Thread Hani Suleiman

I'm runnning Debian potato with no problems. Just make sure you call java 
with -green. I havent tested it extensively, mind you (using jdk1.2pre1)

At 12:52 PM 3/13/99 -0500, Seth M. Landsman wrote:
>Grr ...
>
>So debian unstable branch has gone to glibc2.1, which breaks many,
>many things, including the jdk1.1.7 from blackdown.  So, while I really
>would like to participate in the debugging effort of debian, my lack of
>having a play machine and the necessity of doing real work has to take
>precedence.
>Okay, so my questions are : does the jdk1.2pre1 work on glibc2.1
>systems?  If not, any chance we could get a glibc2.1 compiled jdk (1.1.7
>or 1.2) out of you guys?
>
>Thanks,
>-Seth
>--
>"It is by will alone I set my mind in motion"
>
>
>--
>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]



Magician pulled off the market

1999-03-13 Thread Bernd Kreimeier


[about as much off topic as "JMF for Linux"]

With respect to "Java3D for Linux":  Arcana Ltd.,
the company that till last week provided a very
popular Java OpenGL API and implementations for
JNI, RNI and Netscape's JRI on Linux, Windows,
Mac, and other platforms, has been forced to close
shop.

As Magician was pretty much the basis of the
ARB efforts to create official JavaGL bindings,
this might well set back anybody who wants to
do efficient, performant graphics with Java for
quite some time.

It seems unlikely that Arcana is in a position to
afford an open source release, handing over Magician
to the public domain. Currently, the source and
rights are offered for sale. If you or your company
is using Magician, and wants to see its development
continued, consider contacting them


 b.



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



PLEASE HELP: Library Error

1999-03-13 Thread Steve Gee

can someone please help with a library error:
when I try to run a simple application: source code provided:
import javax.swing.*;

public class jfctest extends JFrame{
public static void main(String args[]){
new jfctest();
}//end main

public jfctest(){
init();
}//end constructor

public void init(){
this.setSize(300,300);
this.setVisible(true);
}//end init
}//end class


I get this error:

$ java jfctest
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/usr/local/jdk1.2/jre/lib/i386/libfontmanager.so:
libstdc++-libc6.0-1.so.2: cannot open shared object file: No such file
or directory

After checking out the online docs, I have decided to help out any
answers by including a list of my libs:
$ ls libstd*
libstdc++-lib6.0-1.so.2  libstdc++.so.2.7.2.8 libstdc++.so.2.8.0
libstdc++.so.2.7.2   libstdc++.so.2.8

>From what I can tell I have all of the correct versions of libs (?)

OS:  RedHat5.2
KERNEL: 2.0.36
BOX: AMD K6 200
MEM: 96M

Thanks
[EMAIL PROTECTED]


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



possible 1.2 problem report ...

1999-03-13 Thread Seth M. Landsman

Okay, I just grabbed and setup in a tmp directory the jdk1.2pre1
on a freshly installed slink debian 2.1 system.  I have a research system
with a gross number of objects and files which I've written using
(exclusively) the various 1.1 blackdown jdks.  
Under 1.1.7, the system initializes and launches without a
whimper.  Under 1.2, the system initialies to the point where it launches
its first thread and then dies.  There is no exception or error associated
with this.  
I'll poke around more and give me detail, but I was wondering if
this was a gotcha people might have already seen.

BTW, I get the zapf font problems, which I haven't fixed yet.
Could they cause a problem?

--
"It is by will alone I set my mind in motion"


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



admending previous report ...

1999-03-13 Thread Seth M. Landsman

Okay, let me admend the report.  Specifying java -green, the
system doesn't come up.  Specifying java -native, the system does come up.
I thought green threads were working and native threads were broke.  I
guess I'm not paying close enough attention ...

Sorry about that.  The system does feel a little slower.  Is this
a known problem?

-Seth

-- 
"It is by will alone I set my mind in motion"


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



Fonts, fonts, fonts (sizes, jdk1.2pre1)

1999-03-13 Thread Urban Widmark


Hello

Is there anything that can be done to make the jdk1.2 fonts behave more
like the 1.1 ones? Included is a small testprogram with output. Notice the
difference in height of the fontmetrics.

Searching through the archives and the bug-reports gave at least one other
person (hmm, no mail addresses in the archive?) with the same problem, but
no solution. I've been playing with font.properties and the FontPath of my
X server, without improvments.

My FontPath when running the tests below (default font.properties):
FontPath"/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
FontPath"/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
FontPath"/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath"/usr/X11R6/lib/X11/fonts/100dpi/"
FontPath"/usr/X11R6/lib/X11/fonts/URW/"
FontPath"/usr/X11R6/lib/X11/fonts/Type1/"
FontPath"/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath"/usr/X11R6/lib/X11/fonts/misc:unscaled"
FontPath"/usr/X11R6/lib/X11/fonts/misc/"
(If I move the /75dpi/ entry down as I've seen in some example, emacs uses
some really ugly scaled bitmap(?) fonts)


jdk117_v1a:
sun.awt.motif.X11FontMetrics[font=java.awt.Font[family=Dialog,name=Dialog,
style=plain,size=12]ascent=11, descent=2, height=14]
sun.awt.motif.X11FontMetrics[font=java.awt.Font[family=SansSerif,
name=SansSerif,style=plain,size=12]ascent=11, descent=3, height=15]
sun.awt.motif.X11FontMetrics[font=java.awt.Font[family=Serif,name=Serif,
style=plain,size=12]ascent=11, descent=3, height=15]
sun.awt.motif.X11FontMetrics[font=java.awt.Font[family=Monospaced,
name=Monospaced,style=plain,size=12]ascent=10, descent=3, height=14]
sun.awt.motif.X11FontMetrics[font=java.awt.Font[family=DialogInput,
name=DialogInput,style=plain,size=12]ascent=11, descent=2, height=14]

jdk1.2pre1:
sun.awt.font.FontDesignMetrics[font=java.awt.Font[family=dialog,name=Dialog,
style=plain,size=12]ascent=15, descent=9, height=25]
sun.awt.font.FontDesignMetrics[font=java.awt.Font[family=sansserif,
name=SansSerif,style=plain,size=12]ascent=15, descent=9, height=25]
sun.awt.font.FontDesignMetrics[font=java.awt.Font[family=serif,name=Serif,
style=plain,size=12]ascent=12, descent=5, height=18]
sun.awt.font.FontDesignMetrics[font=java.awt.Font[family=monospaced,
name=Monospaced,style=plain,size=12]ascent=14, descent=9, height=24]
sun.awt.font.FontDesignMetrics[font=java.awt.Font[family=dialoginput,
name=DialogInput,style=plain,size=12]ascent=14, descent=9, height=24]


import java.awt.*;

public class AA
{
// List from Toolkit.getFontList()
static String[] fontnames = {
"Dialog",
"SansSerif",
"Serif",
"Monospaced",
"DialogInput",
};

public static void main(String[] argv)
throws Exception
{
Toolkit tk = Toolkit.getDefaultToolkit();
for(int i=0; i


Re: admending previous report ...

1999-03-13 Thread Urban Widmark

On Sat, 13 Mar 1999, Seth M. Landsman wrote:

>   Okay, let me admend the report.  Specifying java -green, the
> system doesn't come up.  Specifying java -native, the system does come up.
> I thought green threads were working and native threads were broke.  I
> guess I'm not paying close enough attention ...
> 

Did you remember -Djava.compiler= when using -green ?
I didn't at first, and then all programs died when showing their frame ...

/Urban

---
Urban Widmark   [EMAIL PROTECTED]
Svenska Test AB +46 90 71 71 23


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



Re: admending previous report ...

1999-03-13 Thread Juergen Kreileder

> Seth M Landsman writes:

Seth> Okay, let me admend the report.  Specifying java -green, the
Seth> system doesn't come up.  Specifying java -native, the system
Seth> does come up.  I thought green threads were working and
Seth> native threads were broke.  I guess I'm not paying close
Seth> enough attention ...

Exactly, it's a known problem and that's why README.linux says:

Known Problems
==

...

* Green threads and JIT.  The just in time compiler is on by default, but
  it doesn't play nice with green threads yet, so you need to disable it
  when running with green threads.  See "Execution options" below for
  details.


Juergen

-- 
Juergen Kreileder, Universitaet Dortmund, Lehrstuhl Informatik V
Baroper Strasse 301, D-44221 Dortmund, Germany
Phone: ++49 231/755-5806, Fax: ++49 231/755-5802


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



Re: Understanding 1.2 classpath

1999-03-13 Thread Jeff Galyan


> 
> Steve> With jdk 1.2 installed in /usr/local/java/jdk1.2 what would
> Steve> be the equivalent classpath to use in 1.2 for compilation?
> Steve> For execution?
> 
> You need no classpath. Don't even set it to "".
>
I've found in my use of Java 2 (both at Sun and on my machine at home),
that if you have declared packages, and you have a directory structure
set up in your source directories, you still have to use the -classpath
command-line flag to javac. *However* you ONLY need to have the path to
the directory one level up from the beginning of *your* package name.
For example, if you have named your package
"com.anamorphic.MySpiffyClasses" and your build directory sits in
/usr/src/mysources/com/anamorphic/MySpiffyClasses, then your command
line would look like:

javac -classpath /usr/src/mysources SpiffyClass.java


For running, you just jar up all your classes and put that jar file in
/jre/lib/ext and everything works. 
 


-- 
Jeff Galyan
http://www.anamorphic.com
http://www.sun.com
jeffrey dot galyan at sun dot com
talisman at anamorphic dot com
Sun Certified Java(TM) Programmer
==
Linus Torvalds on Microsoft and software development:
"... if it's a hobby for me and a job for you, why are you doing such a
shoddy job of it?"

The views expressed herein do not necessarily reflect those of my
employer.

Sun Microsystems, Inc., has no connection to my involvement with the
Mozilla Organization.


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