 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- FreeBSD / Eclipse 3.1 / WTP 0.7Hello,
As port of Eclipse 3.1 is already available, I was trying to install Eclips=
e=20
WTP 0.7 to improve my work with JSPs and Servlets. I installed first: GEF,=
=20
EMF, and Java EMF Model Runtime: JEM-SDK-1.1.zip (this is the problem) from=
=20
WTP site, but I have still error saying that there is no such plugin as=20
org.eclipse.jem.util - I checked plugins directory and there is such plugin=
=20
installed, in manage configuration it is shown as disabled - that's probabl=
y=20
mean that this version is incompatible with FreeBSD.
Is there anybody who installed WTP with success on Free, and can share=20
his/her knowledge on this topic? Anybody work on porting JEM and WTP to=20
FreeBSD?
Best Regards,
Lee
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 1
- Applet downloading from netI have a beginner's question.
If I go to internet, a web page containing a java applet. The applet
class
should be downloaded to my hardware.
Does anybody can tell me where I can find the downloaded applet class
file
and image file related to the applet class?
Thanks in advance,
P.Kaviarasu
email***@***.com
- 3
- Any way to turn off array bounds checking? (Matrix multiplication is so slow!)
I am just starting to learn Java J2RE 5.0. I coded the matrix library
below and found that the array accessing is really slow since each
access is checked:
http://f1.pg.briefcase.yahoo.com/bc/agascoig/vwp2?.tok=bccV1CVBYRRfg_eF&.dir=/Guest&.dnm=ComplexDoubleMatrixJava.zip&.src=bc
It appears that with gcj and a -f switch I can turn off the array
bounds checking.
Will a JVM ever be smart enough to know that if the array bound is a
constant variable within a loop, that it can multiply and check the
final array index is within bounds before doing the loop, and then only
have to check once? It seems stupid to me that a general Matrix isn't
included in the Java class libraries. Anybody have a better general
Matrix library in Java?
Also, a newbie observation, that Double (capital D) didn't get passed
as a reference. Why not? This seems dumb to me, as all other objects
seem to get passed by reference.
- 3
- 3
- Swing textboxes can't get focus after JFileChooserHi Java guru's,
I have a swing form that has a text field where a directory name can
be entered. Just to its right I have a button that will open the
JFileChooser dialog to allow selection of the directory name from a
dialog.
I can go in and type the directory name into the textbox by hand. So
far, so good.
I can go in and press the button, have the dialog appear, choose a
directory, and have the textbox programatically updated. Again, this
works.
But, if I press the button and choose a directory, I then lose the
ability to use my mouse to access any textboxes on my form. I am able
to use the tab button to move to, and update the textboxes.
I can't then click my mouse on a textbox and be able to enter in data.
Instead, I have to tab to it. The mouse also cannot be used to select
data within a textbox by double clicking or highlighting it. I CAN
hold down the mouse button and scroll right or left and have the
textbox's data shift if the text exceeds the width of the textbox.
But, the textbox appears to be disabled.
Interestingly enough, I AM able to use my mouse to click other BUTTONs
on the page.
So, its just the textboxes that seem affected.
Anyone have a solution or hints?
(btw, I'm using Java 1.4.2.x)
TIA
Here is my button listener:
public void actionPerformed(ActionEvent event)
{
if (event.getSource() == btnRun)
if (areAllFieldsPopulated())
{
lblStatus.setText("Processing");
ExportFunctionalAreas exportFunctionalAreas = new
ExportFunctionalAreas();
exportFunctionalAreas.ExportXml(txtInputFileName.getText(),
txtOutputFileName.getText(), txtElementName.getText());
lblStatus.setText("Finished");
}
else
{
}
else if (event.getSource() == btnSelectFile)
txtInputFileName.setText(FileHandler.OpenFileDialog(txtInputFileName,"Open
Input File","xml","XML files (*.xml)"));
else if (event.getSource() == btnOutputDirectory)
txtOutputFileName.setText(FileHandler.OpenDirectoryDialog(txtOutputFileName));
}
and here is the open directory dialog code:
public static String OpenDirectoryDialog(Component Owner)
{
JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(Owner))
return chooser.getSelectedFile().getPath();
else
return null;
}
- 5
- programi would to get the solution for the following program.
Write a complete Java program that does the following:
Prompt the user to type in the hour and minute departure time for an
airline flight.
Prompt the user to type in the hour and minute arrival time for that
flight. (Note: assume that the flight occurs in just one afternoon, leaving
at or after 1:00 and arriving at or before 12:59. Assume also that the user
provides valid input values!)
Calculate the total number of minutes the flight will be in the air.
Display the departure time, the arrival time, and the flight time (in
minutes) of the flight.
--
Message posted via http://www.javakb.com
- 6
- Can't compile simple Java code1 class DecimalToBinary{
2 public static void main(String[] y){
3 int dec = new Integer(y[0]).intValue();
4 if (dec/32 = 0)
5 System.out.println(0 + (dec % 32) / 16);
6 else System.out.println(1);
}}
When I try to compile the above code I get an error on line 4:
Error: unexpected type
required: variable
found : value
What is wrong??
Mvh
Johs
- 8
- How to get Cell ID from J2ME location API, on modern phones!Hi all, I wanted to know how to get the Cell ID using the J2ME
location API? I have found so much sites on the net bu they're all
since 2005 or 2003, and none of them contains a clear example (or even
basic idea) how to take the Cell ID. What I've tryed:
set the Criteria power management to low, so it doesn't search for
bluetooth. Everything else I've left as it is (now limits). It stops
the app for 60 secs (that's what I've set) and then it pops exception
- LocationException, which means it can't find info or timeout. I've
tested with longer times - same result. I'm sure the operator supports
it and the phone supports it (N73).
Please give an idea, please!
Thanks in advance...
- 10
- Question for Java GurusOn Tue, 18 May 2004, email***@***.com wrote:
> I suspect that the difference lies in how fundamental we think
> those concepts are. I think that the classpath environment
> variable is a rather peculiar aspect of the JDK command-line
> tools. I much prefer, say, Eclipse 3.0, where I can choose
> project properties and just check all of the user-defined
> libraries that my project uses and expect everything to work,
> without dealing with questions of whether I can set an
> environment variable in one place or another, or oops I only
> set it in this shell so it doesn't appear in other shells, etc.
> I think it's clearly possible to develop Java software without
> worrying one bit about environment variables. So I question
> why understanding the CLASSPATH environment variable (or
> command-line option, etc) would be a necessary prerequisite to
> learning programming in Java.
This is analogous to java programmers thinking they can code
database applications without understanding the underlying
database. Oh, I'm sorry, the JVM is the only world one needs to
know.
--
Galen Boyer
- 10
- Full Casino Source Codes For JUST $9,900We'd like to know if you or your company is interested in buying online
casino software.
We are now selling full casino sourcecodes for crazy cheap price, $9,900.
Yes, it's not $99,000. IT'S JUST $9,900 for full casino sourcecodes
including software, flash, database and everything we have.
With full casino sourcecodes,
You own the sourcecodes
There are no royalties to pay
You can setup as many casino sites as you want, without additional cost.
You can license the software for additional revenue opportunities
You can modify software, flash and database anytime at your own will.
You can do whatever you want.
No download flash casino software backed by java technology.
Stunning 3d graphics and sound add quality to our casino software.
The casino software includes the popular games like roulette, craps,
blackjack, caribbean poker, paigow, video poker games, slots, multi-line
slots and more.
Also it includes full marketing and management tools for your successful
casino business.
Check our website.
http://www.eplaysoft.com
http://www.megabetcasino.com (demo site)
The winning rate in fun mode play is different from that of real money
mode.
In real money mode, you can control the winning rate of each game.
Temporary user account for testing realmode play can be provided upon
request.
The price of the full casino sourcecodes including software, flash,
database and documents is JUST $9,900
Don't think that our software value is just $ 9,900. It's way beyond even
$99,000.
Check our software at the above site.
We are selling just 3 copies for this price on a first-come-first-served
basis to invest in developing different software(not gaming one).
We are selling full sourcecodes including everything(software, flash,
database and documents).
If you want, we can use escrow.com to make the deal safe and ensured to
you. Using escrow.com, you can release money to us after you receive the
source codes and check/verify if your casino works as megabetcasino.com.
We can install casino on your own server for you.
Contact us if you are interested.
We are the developers of the casino software, not sales broker or
reseller.
David.
email***@***.com
Eplaysoft, the gaming software development company.
http://www.eplaysoft.com
- 11
- 11
- M-I'5.P ersecution - Capital Radi o - Chris T arrant-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=
-= Capital Radio -. Chris Tarrant -=
-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=
Capital Radio DJs have been "in on it" from the start.. One of the first
things. I heard in the summer of 1990 was from a Capital DJ who said, "If
he listens to Capital then he can't be all bad". (supportive, you see. We're
not bastards). Much. of what came over the radio in 1990 is now so far away
the precise details. have been obliterated by time. No diary was kept of the
details, and although archives if they. exist may give pointers, the
ambiguity of what broadcasters said would leave that open. to
re-interpretation.
In spring 1994, Chris Tarrant on his Capital morning show made an aside. to
someone else in the studio, about a person he didn't identify.. He said,
"You know this bloke? He says we're trying to kill him. We. should be done
for. attempted manslaughter".
That mirrored something I had said a day or. two before. What Tarrant said
was understood by the staff member in. the studio he was saying it to; they
said, "Oh no, don't say. that" to Tarrant. If any archives exist of the
morning show (probably unlikely) then. it could be found there; what he said
was so out of. context that he would be very hard put to find an explanation.
A couple of days later, someone at the site where I. was working repeated the
remark although. in a different way; they said there had been people in a
computer room when automatic fire. extinguishers went off and those people
were "thinking of suing. for attempted manslaughter".
Finally, this isn't confined to. the established radio stations. In 1990
after I had listened to. a pirate radio station in South London for about
half an hour, there was. an audible phone call in the background, followed
by total silence for a. few moments, then shrieks of laughter. "So what are
we supposed to say now?. Deadly torture? He's going to talk to us now, isn't
he?", which meant that they could. hear what I would say in my room.
5716
- 11
- Java text compressionWhat's the fastest way to compress/decompress text?
We're doing that over really large datasets in our app. We're currently
converting char arrays to byte arrays using our own UTF-8 conversion
code, and then compressing the bytes using java.util.zip. The code is
pretty old.
I don't like this two-step process, and the profiler shows that this is
a bottleneck in our app.
Is anyone aware of any code that compresses chars directly? Perhaps a
third-party library that does it faster?
In our particular situation, decompression speed is a lot more important
than compression speed.
- 11
- How to process 1000 request using ThreadI have one problem. What is the optimal approach for handling 1000
request by using thread.there are 2 scenario. 1 create 1000 thread and
execute the program 2. create 10 thread and pool 1000 requests by some
scheduling algorithm.
- 14
|
| Author |
Message |
M

|
Posted: 2004-6-2 19:57:00 |
Top |
java-programmer, Java Newbie question
Hi all, I'm learning Java 2 by myself and find question for help.
I'm testing the System.in.read() method and tried the following program:
import java.io.*;
class ReadBytes {
public static void main(String args[])
throws IOException {
byte data[] = new byte[10];
System.out.println("Enter some characters.");
System.in.read(data);
System.out.print("You entered: ");
for (int i=0; i<data.length; i++) {
System.out.print((char)data[i]);
}
}
}
My question are:
(1) if I just comment out the "throws IOException" in the main, I
just got compilation error! Is the any condition I can tell whether
I have to throw something or not? I remembered in the HelloWOrld
app, I don't have to throw anything.
(2) If I entered more than 10 characters in the above test, I didn't
get overflow error. Why? Actually I'm expected an exception to
be caught.
Thanks in advance.
|
| |
|
| |
 |
Andrew Thompson

|
Posted: 2004-6-2 20:16:00 |
Top |
java-programmer >> Java Newbie question
On Wed, 2 Jun 2004 19:57:12 +0800, M wrote:
> Hi all, I'm learning Java 2 by myself and find question for help.
Please direct your quetions to
c.l.j.help for the moment.
<http://www.physci.org/codes/javafaq.jsp#cljh>
> I'm testing the System.in.read() method and tried the following program:
...
> My question are:
> (1) if I just comment out the "throws IOException" in the main, I
> just got compilation error! Is the any condition I can tell whether
> I have to throw something or not?
'JavaDocs'
<http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#in>
<http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html#read()>
The second link will most likey break because
of the '()', find your way from here..
<http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html#method_summary>
> (2) If I entered more than 10 characters in the above test, I didn't
> get overflow error. Why?
Your code only reads the size of the array, 10
characters, then iterates through the existing 10.
Try entering 5..
--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
|
| |
|
| |
 |
Yu SONG

|
Posted: 2004-6-2 20:27:00 |
Top |
java-programmer >> Java Newbie question
M wrote:
> Hi all, I'm learning Java 2 by myself and find question for help.
>
> I'm testing the System.in.read() method and tried the following program:
>
> import java.io.*;
>
> class ReadBytes {
> public static void main(String args[])
> throws IOException {
> byte data[] = new byte[10];
>
> System.out.println("Enter some characters.");
> System.in.read(data);
> System.out.print("You entered: ");
> for (int i=0; i<data.length; i++) {
> System.out.print((char)data[i]);
> }
> }
> }
>
> My question are:
> (1) if I just comment out the "throws IOException" in the main, I
> just got compilation error! Is the any condition I can tell whether
> I have to throw something or not? I remembered in the HelloWOrld
> app, I don't have to throw anything.
> (2) If I entered more than 10 characters in the above test, I didn't
> get overflow error. Why? Actually I'm expected an exception to
> be caught.
>
> Thanks in advance.
>
Read this,
http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html#read(byte[])
it says "public int read(byte[] b) throws IOException", so if you use
it, you have to catch the thrown IOException.
The above article also tells you when & why the method throws the exception.
"Hello world" is here
http://java.sun.com/j2se/1.4.2/docs/api/java/io/PrintStream.html#println(java.lang.String)
It won't throw anything, so you don't need to.
--
Song
More info.:
http://www.dcs.warwick.ac.uk/~esubbn/
|
| |
|
| |
 |
M

|
Posted: 2004-6-2 21:39:00 |
Top |
java-programmer >> Java Newbie question
Thanks. I'll go thru the spec.
"Yu SONG" <email***@***.com> wrote in message
news:c9kh2o$df4$email***@***.com...
> M wrote:
> > Hi all, I'm learning Java 2 by myself and find question for help.
> >
> > I'm testing the System.in.read() method and tried the following program:
> >
> > import java.io.*;
> >
> > class ReadBytes {
> > public static void main(String args[])
> > throws IOException {
> > byte data[] = new byte[10];
> >
> > System.out.println("Enter some characters.");
> > System.in.read(data);
> > System.out.print("You entered: ");
> > for (int i=0; i<data.length; i++) {
> > System.out.print((char)data[i]);
> > }
> > }
> > }
> >
> > My question are:
> > (1) if I just comment out the "throws IOException" in the main, I
> > just got compilation error! Is the any condition I can tell whether
> > I have to throw something or not? I remembered in the HelloWOrld
> > app, I don't have to throw anything.
> > (2) If I entered more than 10 characters in the above test, I didn't
> > get overflow error. Why? Actually I'm expected an exception to
> > be caught.
> >
> > Thanks in advance.
> >
>
> Read this,
>
http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html#read(byte[]
)
>
> it says "public int read(byte[] b) throws IOException", so if you use
> it, you have to catch the thrown IOException.
>
> The above article also tells you when & why the method throws the
exception.
>
>
> "Hello world" is here
>
http://java.sun.com/j2se/1.4.2/docs/api/java/io/PrintStream.html#println(jav
a.lang.String)
>
> It won't throw anything, so you don't need to.
>
>
> --
> Song
>
> More info.:
> http://www.dcs.warwick.ac.uk/~esubbn/
>
|
| |
|
| |
 |
buzz

|
Posted: 2004-6-5 1:23:00 |
Top |
java-programmer >> Java Newbie question
I have just created my first serious applet, a dynamic graph that is fed
from an Access database. My question is, how do I stop the graph from
erasing itself when another screen is maximised in front of it?
Many thanks in advance...
Buzz
|
| |
|
| |
 |
Andrew Thompson

|
Posted: 2004-6-5 1:53:00 |
Top |
java-programmer >> Java Newbie question
On Fri, 4 Jun 2004 18:23:28 +0100, buzz wrote:
> I have just created my first serious applet, a dynamic graph that is fed
> from an Access database. My question is, how do I stop the graph from
> erasing itself when another screen is maximised in front of it?
A better group for GUI matters is
<http://www.physci.org/codes/javafaq.jsp#cljg>
but a group better suited to starters is..
<http://www.physci.org/codes/javafaq.jsp#cljh>
Check this document first though
<http://www.physci.org/guifaq.jsp>
Particularly this part..
<http://www.physci.org/guifaq.jsp#2.4>
And when you go to make your next post,
you might consider an example of the problem..
<http://www.physci.org/codes/sscce.jsp>
--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
|
| |
|
| |
 |
mcwhirt3

|
Posted: 2004-11-10 9:17:00 |
Top |
java-programmer >> Java Newbie question
I need some advice on how to develop somethng. The site below has some
java applets that allow you to move some 3-d shapes around. I have a
professor that needs a similar model created. What can I use
softwarewise to develop something like these. I've never used java but
can learn fast through example. Can you point me to any advice or
examples that would help me make something like the models on the site
below? I appreciate any help very much.
http://mathworld.wolfram.com/Tetrahedron.html
|
| |
|
| |
 |
Real Gagnon

|
Posted: 2004-11-10 10:09:00 |
Top |
java-programmer >> Java Newbie question
email***@***.com (ryan) wrote in news:a7fdaa26.0411091716.6502a832
@posting.google.com:
> I need some advice on how to develop somethng. The site below has some
> java applets that allow you to move some 3-d shapes around.
Check in the demo\Applets\WireFrame directory in your installation of the
JDK.
Bye.
--
Real Gagnon from Quebec, Canada
* Looking for Java or PB snippets ? Visit Real's How-to
* http://www.rgagnon.com/howto.html
|
| |
|
| |
 |
Andrew Thompson

|
Posted: 2004-11-10 14:48:00 |
Top |
java-programmer >> Java Newbie question
On 9 Nov 2004 17:16:56 -0800, ryan wrote:
> http://mathworld.wolfram.com/Tetrahedron.html
As an aside, they use an Applet written by Martin Kraus
known as LiveGraphics3D, you can find the homepage here..
<http://wwwvis.informatik.uni-stuttgart.de/~kraus/LiveGraphics3D/>
while some of my own 3D models can be viewed here..
<http://www.1point1c.org/model/index.jsp>
--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
|
| |
|
| |
 |
Sean Murphy

|
Posted: 2006-3-7 11:43:00 |
Top |
java-programmer >> Java Newbie question
I am just getting started with Java, and come from a background in Microsoft
languages ... I am having a grand ole time with all of the Java Lingo. How
do I sort out all of the acronyms ... J2EE, J2SE, J2ME, servlets, applets,
etc., etc. Or does this just come with time???
|
| |
|
| |
 |
Tail_Spin

|
Posted: 2006-3-7 12:13:00 |
Top |
java-programmer >> Java Newbie question
I've found two of the best resoures for me (relative newbie) are google and
the sun java site http://java.sun.com/.
"Sean Murphy" <email***@***.com> wrote in message
news:Mi7Pf.9738$eP4.6974@trnddc05...
> I am just getting started with Java, and come from a background in
Microsoft
> languages ... I am having a grand ole time with all of the Java Lingo. How
> do I sort out all of the acronyms ... J2EE, J2SE, J2ME, servlets, applets,
> etc., etc. Or does this just come with time???
>
>
|
| |
|
| |
 |
ram

|
Posted: 2006-3-7 12:21:00 |
Top |
java-programmer >> Java Newbie question
"Sean Murphy" <email***@***.com> writes:
>I am just getting started with Java, and come from a background
>in Microsoft languages ... I am having a grand ole time with
>all of the Java Lingo. How do I sort out all of the acronyms
>... J2EE, J2SE, J2ME, servlets, applets,
Don't worry! For the beginning it is entirely sufficient to
know about (in addition to the terms you already have
mentionend) Ant, AntLR, Anvil, AWT, BCEL, Beans, Beanshell,
BlueJ, CoCoon, derby, Dolphin, DOM, Echo, Eclipse, Hibernate,
hsqldb, IntelliJ, iText, J2ME, Jakarta, JavaDoc, JBoss,
JBuilder, JDBC, JDK, JFC, JGoodies, JNI, JNLP, JSF, JSP,
Jucas, JUnit, JVM, Lopica, Maven, Maverick, Midlet, Mustang,
NetBeans, SAX, Spring, Struts, Swing, Tapestry, Tomcat,
Torque, Turbine, UI-delegates, Verge, SOAP, WSDL, UDDI,
JavaBeans, JAXP, JAX-RPC, SAAJ, JAXR, Tag Libraries, JSTL,
Enterprise Java Beans, JAR, JTA, JNDI, JMS, JDOM, dom4j, and
Java Webstart.
To get the meaning, you can read google, sun or mindprod.com.
Just write the buzzword on a file card and its meaning on the
other side and then learn whenever you have some time to
spare.
|
| |
|
| |
 |
Amfur Kilnem

|
Posted: 2006-3-7 12:52:00 |
Top |
java-programmer >> Java Newbie question
"Sean Murphy" <email***@***.com> wrote in message
news:Mi7Pf.9738$eP4.6974@trnddc05...
>I am just getting started with Java, and come from a background in
>Microsoft
> languages ... I am having a grand ole time with all of the Java Lingo. How
> do I sort out all of the acronyms ... J2EE, J2SE, J2ME, servlets, applets,
> etc., etc. Or does this just come with time???
>
Go here...
http://java.sun.com/developer/onlineTraining/new2java/programming/learn/unravelingjava.html
|
| |
|
| |
 |
Oliver Wong

|
Posted: 2006-3-8 2:14:00 |
Top |
java-programmer >> Java Newbie question
"Sean Murphy" <email***@***.com> wrote in message
news:Mi7Pf.9738$eP4.6974@trnddc05...
>I am just getting started with Java, and come from a background in
>Microsoft
> languages ... I am having a grand ole time with all of the Java Lingo. How
> do I sort out all of the acronyms ... J2EE, J2SE, J2ME, servlets, applets,
> etc., etc. Or does this just come with time???
I think the trick most people use can be summarized thus:
When you encounter an ancronym (or term) that you don't know, look it up
(e.g. via Google).
For what it's worth, I program in Java for a living, and there's a
couple of terms in Stefan's post which I don't recognize (and didn't bother
to look up); e.g. Anvil, Jucas, Turbine, etc.
- Oliver
|
| |
|
| |
 |
Roedy Green

|
Posted: 2006-3-8 6:50:00 |
Top |
java-programmer >> Java Newbie question
On Tue, 07 Mar 2006 18:14:14 GMT, "Oliver Wong" <email***@***.com>
wrote, quoted or indirectly quoted someone who said :
>
> I think the trick most people use can be summarized thus:
>
> When you encounter an ancronym (or term) that you don't know, look it up
>(e.g. via Google).
with Google try definition:JSE
You can also jcheck the Java glossary. If you find a Java-related one
not there, tell me and there soon will be an entyr.
http://mindprod.com/jgloss/jgloss.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
|
| |
|
| |
 |
IchBin

|
Posted: 2006-3-8 11:54:00 |
Top |
java-programmer >> Java Newbie question
Sean Murphy wrote:
> I am just getting started with Java, and come from a background in Microsoft
> languages ... I am having a grand ole time with all of the Java Lingo. How
> do I sort out all of the acronyms ... J2EE, J2SE, J2ME, servlets, applets,
> etc., etc. Or does this just come with time???
>
>
If I have acronym I don't know then I use an acronym finder website:
http://www.acronymfinder.com
Once I have a handle on that I can do some serious searching..
--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
|
| |
|
| |
 |
dave

|
Posted: 2007-9-6 23:56:00 |
Top |
java-programmer >> Java Newbie question
Hello,
I'm studying Java, and now trying to make sense of the concept of
types.
Would it be correct to say:
a Java type is a classification of what could potentially be bound
to a Java variable
Also, The Java class Class really describes types. Would it have made
more sense to call this class Type instead of Class?
|
| |
|
| |
 |
Jeff Higgins

|
Posted: 2007-9-7 0:05:00 |
Top |
java-programmer >> Java Newbie question
dave wrote:
> Hello,
>
> I'm studying Java, and now trying to make sense of the concept of
> types.
>
> Would it be correct to say:
>
> a Java type is a classification of what could potentially be bound
> to a Java variable
>
> Also, The Java class Class really describes types. Would it have made
> more sense to call this class Type instead of Class?
>
<http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html>
|
| |
|
| |
 |
Mark Space

|
Posted: 2007-9-7 0:38:00 |
Top |
java-programmer >> Java Newbie question
dave wrote:
>
> a Java type is a classification of what could potentially be bound
> to a Java variable
This works for me. I also think of type as how the JVM will interpret
any given bit pattern to which the variable is bound.
>
> Also, The Java class Class really describes types. Would it have made
> more sense to call this class Type instead of Class?
>
Hmm, but ints, chars, booleans and all the other primitives are also
types, but I don't think that Class describes them. Class only deals
with Java objects (most of the language, admittedly) but there are a few
types it doesn't abstract.
Also, generics are a type, but their type gets erased during
compilations. I don't think Class can represent the un-erased type.
|
| |
|
| |
 |
Patricia Shanahan

|
Posted: 2007-9-7 1:05:00 |
Top |
java-programmer >> Java Newbie question
Mark Space wrote:
> dave wrote:
>
>>
>> a Java type is a classification of what could potentially be bound
>> to a Java variable
>
>
> This works for me. I also think of type as how the JVM will interpret
> any given bit pattern to which the variable is bound.
>
>
>>
>> Also, The Java class Class really describes types. Would it have made
>> more sense to call this class Type instead of Class?
>>
>
> Hmm, but ints, chars, booleans and all the other primitives are also
> types, but I don't think that Class describes them. Class only deals
> with Java objects (most of the language, admittedly) but there are a few
> types it doesn't abstract.
Each of the wrapper types has a public static final TYPE field that
references the Class object for the corresponding primitive. For example:
"public static final Class<Integer> TYPE
The Class instance representing the primitive type int."
in class Integer. Class objects for primitives are important in some
reflection interfaces.
>
> Also, generics are a type, but their type gets erased during
> compilations. I don't think Class can represent the un-erased type.
I'm not sure generics count as a type, or anything else, in a running
program. They are effectively a form of compile-time assertion that
enables some extra checking.
Patricia
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Jars and getResource()Hi there,
I've been trying to find a solution to this with no luck so far.
Consider a project with the following dir structure
/bin
/resources
/resources/velocity
.
.
etc.
In /resources/velocity there is a file "velocity.properties"
with /resources/velocity in the classpath I can simply say from within a
class
Class.class.getResourceAsStream(/velocity.properties);
and get an InputStream to that file.
However, when packaging it in a jar file, the above statement stops
working even if in the Manifest I specify in the header:
Class-Path: resources/velocity/
Any ideas? :(
TIA
- 2
- Substitute for Tiles in JSF?Hello
I am working on a refactor. The project handles some trather stright
forward business, but the previous authors decided to use a best of
breed or so they thought amalgam of frameworks. They used Spring,
Struts Tiles Hibernate and JSF. The trouble is new people coming to
the project need to spend weeks coming up to speed on all the open
source technologies. So I am endeavoring to reduce the number of
frameworks I want to keep JSF as I see this as the future of Web
development. Hibernate I believe we may keep.
Spring is easy to get rid of just use the JSF controller. But tiles!
should we use a frameset or use JSP includes? Or does someone know of
a Set of JSF controls that can replace Tiles? Facelets seems a bit of
overkill.
Suggestions any one?
Bob
- 3
- Set colum width in a JTablePosted this on comp.lang.java.programmer before seeing this group - sorry.
Hi,
I'm trying to set the column width in a JTable.
This only works on the first column.
As soon as I use setMinWidth() or setMaxWidth() on the second or third
column setPreferredWidth() wont't work at all.
I use this funtion:
public void insertHead(String headName, int width)
{
TableColumn column = new TableColumn();
column.setHeaderValue(headName);
columnModel.addColumn(column);
column.setMinWidth(15);
column.setMaxWidth(200);
column.setPreferredWidth(width);
}
The JTable is set to AUTO_RESIZE_SUBSEQUENT_COLUMNS.
Any hints?
Thanks.
Rene
- 4
- FileOutputStream to Different DirectoryHello,
I'm trying to get Java to create a file in a new directory (which
already exists). Using FileOutputStream, I've been able to create a
new file, but it always puts it into the same directory (as far as I
can tell, there is only one argument for file name... nothing for
path). Is there some way to specify another path?
Thanks,
Ben
- 5
- Using Java CORBA under OS2Hi,
OS/2 (y'all remember that, right? It's now out in a spiffy new independent
version http://www.ecomstation.com) uses DSOM, which is a relative of CORBA
to define objects at the OS-level. I am wondering if there are any tools to
take classes defined in CORBA then implemented in Java and use them under
OS/2. It could work really nicely. I found an old SOM to Java compiler from
IBM, but that seems to be unsupported now.
Just wondering if anyone has experience with this.
-- jjg
There are no z's in my address.
- 6
- SpinnerNumberModel question (maybe JSpinner..)Hi!
I have an application with quite a few jspinners with the default
spinnernumbermodel (i.e created with JSpinner myspinner=new
JSpinner(new SpinnerNumberModel(val,min,max,step));)
Anyway, say I put the allowed range to be 0-10.
Can I notify the user that they typed in an invalid value then?
that is the user types in 100, the spinner will reject this when the
user select the next spinner, but I would like to inform the user that
they tried to enter an illegal value. Can this be done in an efficent
way?
regards
Daniel
- 7
- [java.nio] Blocking mode for a while - How ?I'm using selector to manage connection on server. When server get an
incomming connection register this connection in non-blocking mode for
making readiness selection on it. In some moment i want to operate
with clients channels with blocking mode... but i can't change channel
to blocking mode, because is registered with selector in non-blocking
mode - i get IllegalBlockingModeException. How can i operate for a
while in blocking mode, but not to lose possibility readiness
selection on channel?
--
pozdr.;)
~xEM
- 8
- XML Validation From Flat File?Hi All,
I am trying to convert some Flat Files (Fixed-Width and CSV) to XML
files (Using Java) and I was wondering what is the best way to validate
the data in conversion time (in term and data type, size, missing
fields, etc.)? I know javax.xml.validation helps but is this the
easiest way? Is there any UI tool to help generating these Schema
files?
Thanks in Advance,
Homer
- 9
- Netbeans V5......Tomcat just won't start.. Why??My appologies if this is not the correct forum but I am desperate.
I have downloaded Netbeans V5.0 with JDK 1.5.0_05. Tomcat will not start.
It just seems to hang until it times out. If anyone else has had this
problem OR can direct me to a possible solution I would be deeply grateful.
PS Netbeans refuse to answer my emails!!
- 10
- JSP EL and explicit error messagesHi,
I sometimes mistype object and property names in JSP EL expressions,
and find that no error is generated. It just doesn't evaluate the
expression.
For example, for an object named foo with a property of name, this
would throw an error:
<%= foo.getNAme() %>
where this won't:
${foo.nAme}
Is there any way to make it produce explicit errors in a case like this?
- 11
- Unreferenced enclosing class instance ?Hi,
I have below question about below enclosing class instance:
For below class
class MyOuter {
//.. say, some variables and methods defined here
class MyInner {
//.. say, some variables & methods defined here
}
}
pulic class TestNested {
public static void main(String[] args) {
MyOuter.MyInner inner = new MyOuter().new MyInner();
//.. suppose some time & memory consuming code executed afterwards
but inner not assigned 'null'
}
}
If compiled class TestNested ran & garbage collector did run at some
time before program terminated, will the MyOuter instance created in
first line of main be garbage collected ? Is there any method to
re-bind that created MyOuter instance with a reference variable after
the line "MyOuter.MyInner inner = new MyOuter().new MyInner();"
executed (besides split the statement into two like
MyOuter outer = new MyOuter();
MyOuter.MyInner inner = outer.new MyInner() ? :)
- 12
- Directory Aliases in ResinI recently had a project dropped into my lap that is written in JSP
running on Apache/Resin. A previous version of the application is
already running and configured on the production server, but new
functionality forces us to reconfigure some portions of both Apache
and Resin. There are basically two versions of the app that live in
separate directories, one that is served when someone goes to
www.domain.com, the second when someone goes to www.domain.com/subdir.
The main issue here is that there will be more than one "subdir", all
of which need to point to the same directory on the server, rather
than duplicating all the code for each new "subdir" that gets added.
Setting up aliases in Apache isn't a big deal, those are done. What
I'd really like to know is if it is even possible to set up aliases in
Resin similar to how they are done in Apache. I did some digging
through documentation, but was unable to find something. If anyone
can point me in the right direction, I'd appreciate it.
- 13
- Math.pow(a,b) Bug
--=-bch+Wpkq/6UBCHGw87bz
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
java.lang.Math.pow(a,b) incorrectly returns a positive value when a
negative value is raise to an odd integer. This occurs with the
jdk-1.4.2p6_4, which applies patchset 6. The attached file will
demonstrate the error.
The problem appears to be corrected by rebuilding the JVM with the
following correction:
--- e_pow.c.orig Mon Aug 30 21:01:45 2004
+++ e_pow.c Mon Aug 30 21:01:01 2004
@@ -173,7 +173,7 @@
}
/* (x<0)**(non-int) is NaN */
- if(((((u_int32_t)hx>>31)+1)|yisint)==0) return (x-x)/(x-x);
+ if(((((int32_t)hx>>31)+1)|yisint)==0) return (x-x)/(x-x);
/* |y| is huge */
if(iy>0x41e00000) { /* if |y| > 2**31 */
Furthermore, examining the experimental patchset, it appears that the
following patch also corrects the error:
2004-07-08 Thursday 20:09 glewis
* j2se/src/share/native/java/lang/fdlibm/src/e_pow.c:
. Merge in a fix recently added to FreeBSD's math library (taken
from
fdlibm-5.3):
"Fixed the sign of the result in some overflow and underflow cases
(ones
where the exponent is an odd integer and the base is negative)."
I've not yet run this through the compatibility test suite, so
this
change may be backed out if the suite relies on the broken
behaviour.
If I had the compatibility test suite, I would be willing to apply the
experimental patchset and perform the test. At the moment, I am not
willing to apply the patchset without being able to test the results.
Please email me with any questions or suggestions.
Best regards,
Tom H.
--
---------------------------------
-- Thomas M. Hermann
-- Thomas.Hermann AT cox DOT net
---------------------------------
--=-bch+Wpkq/6UBCHGw87bz
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
--=-bch+Wpkq/6UBCHGw87bz--
- 14
- A Beginner:Why is my program always returning true?Hi I'm learning Java and there seems to be something wrong with my
program. It's supposed to identify if the substring is in the main
string. My program always returns true and I'm a bit confused.
BTW, this is based from the tutorial from sun. I've read the whole
fundamentals section and try to re-write the examples there after a
while.
Anyway here's the code:
class findInString {
public static void main(String[] args){
String mainString = "The quick brown fox jumped over the lazy dog.";
String subString = "hey";
boolean isItThere = false;
int max = mainString.length();
Test:
for (int letter = 0; letter < max; letter++){
int subStringSize = subString.length();
int subStringCounter = 0;
int mainStringCounter = letter;
while (subStringSize-- > 0){
if (mainString.charAt(mainStringCounter) !=
subString.charAt(subStringCounter)){
continue Test;
}
}
isItThere = true;
break Test;
}
System.out.println(isItThere ? "Word found" : "Not found.");
}
}
If you guys see anything that I should improve on (my programming)
please feel free to comment. I'd appreciate them. Thanks!
- 15
|
|
|