 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- print a db field with html tagJ've developpe a java web application (jsp,tomcat,java) and j've used a
replacement for field "textarea" and it work fine but store in a db (oracle)
field information with html tag ... there is a program (freeware or
shareware) can j use to print this field without loss this information?
crystal report is OK but it's too expensive!!!
thank in advance
Marco
sorry for my poor english
- 5
- 5
- double "^" operations ???...Greetings all,
I am having a hard time performing exponential operations on doubles.
My code looks like
public double getExpon(double a, double b) {
double ans = a ^ b;
return(ans);
}
and I am getting the compiler error:
operator ^ cannot be applied to double,double
double ans = a^b;
Does anyone know why? I am totally bewildered.
- 6
- war or earhi there, I'm a newbie here. what is the difference between enterprise
archive & web archive? anyone has a url that explains this? also, is there a
complete design specification of the J2EE Petstore application. url anyone?
many thanks. lai...
- 7
- Problem With ReportViewer ObjectHello,
i have a problem eith the class mencioned in above ( ReportViewer.class) that
i've downloaded and puted in my aplication GUI.
Aparently everything is ok, just in the moment that i try to use that object.
the code that i used is:
void jButton1_mouseClicked(MouseEvent e) {
try{
ReportViewer b = new ReportViewer();
b.setReportName("http://localhost:8080/?report=file:c:
/SAMPLE_REPORTS/BalanceSheet.rpt");
b.setShowGroupTree(false);
b.init();
}catch(Exception e1){
}
.....
the error that appears is:
java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
can anybody help me ???
- 10
- get and set Attribute for EJB Context (Storing objects)Are there any methods like getAttribute and setAttribute off the EJB
Context object like there is for Servlet context?
Currently I did not see any in the API. How then are we supposed to
store objects that we want to exist for the life of the app server and
to be accesible by our beans?
Thanks for any suggestions.
- 10
- Published Web Architecture Reference Code for N-Tier Systems?Is there any published system that includes sample source code, that
illustrates a good presentation / business / data layer partitioning of a
web based n-tier application?
The papers and books I have seen all deal with generalizations that are
mostly obvious and aren't very useful in committing something to code.
Everyone agrees that a well structured application should have presentation
layer, business layer, and data layer. The devil is always in details,
and no one publishes details. I want to see code for a large well
structured system that actually holds together and is easier to expand by
virtue of how it implements a layered multi-tier design.
The sample code I have seen, such as Microsoft's multi-tier sample
applications, appear to be completely amateurish efforts by college students
or people with no real commercial code experience. They are mostly
implemented in absolutely random ways that simply trivialize the value of
good architectural layering. I guess they are mainly meant as ways to run
Microsoft APIs.
I'm particularly interested in seeing:
- How authentication is handled, what kinds of cookies are created, and what
kinds of information is stored in each cookie. If authentication protocols
like Kerberos are being used, how are those integrated? Having code to
show just this piece alone would be highly desirable.
- How is the interface between the presentation layer that creates XML and
the business layer that handles business transactions handled, particularly
when the business layer is run on a separate computer? Getting the right
level of granularity in this interface seems hard. If you have all of the
data validation methods in your business layer, your presentation code is
making too many calls into the business layer, and that hurts performance if
you move that business layer to another machine.
--
Will
- 11
- The Fence Between Heaven And HellJTK <email***@***.com> wrote in message news:<AUgUb.177317$email***@***.com>...
> anoncoward wrote:
>
> > JTK wrote:
> >
> >>>
> >>> Are you telling me that the greatest nation on earth,
> >>> the nation that installed SH in the first place,
> >>> could not think of a single other way of removing him
> >>> than declaring war and invading?
> >>>
> >>> Give me a break. How naive are you guys?
> >>>
> >> WHAT OTHER "WAYS" YOU PIECE OF FILTH?
> >
> > See, that's exactly what I mean - half assed.
>
> WHAT OTHER "WAYS" YOU PIECE OF FILTH?
>
> > You shouldn't even put your foot in the pool
>
> WHAT OTHER "WAYS" YOU PIECE OF FILTH?
>
> > if you don't know how to swim.
>
> WHAT OTHER "WAYS" YOU PIECE OF FILTH?
Oh dear, the prepubescent is having a hissy fit.
Like I said, if you don't know how to swim,
don't get in the pool.
- 12
- Defaults for JFileChooser?Any idea how the look and feel mechanism loads the text items for
JFileChooser? I began digging in the source code for UIManager.java,
BasicFileChooserUI.java, and others, and rapidly got lost.
Ultimately a call is made to, e.g.,
UIManager.getString("FileChooser.helpButtonToolTipText", someLocale),
but I can't figure out how the UIDefaults that UIManager uses to locate
this string is actually initialized.
Thanks,
Laird
- 12
- Painting overHello,
I have written code to generate "Fractal Landscap", we can consider that
it is set of painted in different colors ovals.
Now I would like to paint ON IT. I mean paint star in one part of
"Fractal Landscape", than remove this star and paint it somewhere else.
I dont want to repaint() "Fractal Landscape" because it is very slow,
how to paint on it, without replacing content of Landscape.
thx
M
- 12
- Newbie-help! API 0 Results = errorpage.jsp, i need the 0 returnedHi,
Im using the Google API in a JSP project which fires off queries to
google. In the returned object im interested in the
getEstimatedTotalResultsCount() statistic, I just need to know how many
results have been returned, including if 0 have been returned.
However, when I enter a term which should produce 0 results the JSP
throws an exception and directs me to the errorpage.jsp instead of
reurning a GoogleSearchResult object with 0
getEstimatedTotalResultsCount().
Other people on this forum dont seem to have this problem.
Would very much appreciate the help.
nickname-at-oppositeOfColdMail.com
- 13
- Jeff and his Trackball
Just seen:
New image of Jeff Relf and His Trackball.
http://www.ottawaathleticclub.com/images/trackballs.jpg
Yes, Jeff, the buttons are falling apart...the contacts worn, the MicroCrud
drivers bit-cracking with every click -- XP has made the TrackBall unusable
-- that's right -- a M$ product, destroying any backwards compatibility to
the insipid FOOLS who purchased a trackball.
BUT you go, you go on, clinging to your track ball -- muttering 'my driver,
my driver' and weeping, near a poorly sealed medical waste canister near
Harborview...
--
W '04 <:> Open
- 13
- Java Fonts under Microsoft JVMHello,
I have an applet which I want to run under various VM's, including the
Microsoft VM that (used to) be part of Internet Explorer.
When I create a font for a component, as so:
setFont (new Font ("DIALOG", Font.PLAIN, 20));
the font show up just right -- it's 20 units high. Except when the applet
is running inside the Microsoft VM, which always shows the same, small,
sans-serif font.
Has anyone else experienced this, and found a workaround?
Thanks!
Gregory Hassett
- 14
- About Polling Chat Server (Personal Chatting)Hello,
I am in the process of writing a Chat Server for Intranet.
I completed the message-to-all part of it.
The Server (Polling Chat Server) part of it act in a non-blocking mode,
it creates new connections with the clients, read message from a client
and sends it to all the clients.
The Client part just accepts the message typed on a text field, send it
to the server and appends the message received from the server to a
text field.
This is the global chatting part.
Now I need help about the personal-chatting of the clients.
Each client must be able to chat with any other client which is
connected to the server in the global chatting.
How to carry out this?
Presently both Client and Server are Single-threaded ones.
Can anybody gives me logical flow of the program to carry out the
personal-chatting stuff? I am able to program using non-blocking
ClientSockets.
How many threads will be there on the Server and on client and what
each thread will do?
Please help me ASAP.
-Sameer Shinde
- 15
- Jre 1.6 and CDEJRE 1.6 Swing app freezes my Solaris 8 CDE desktop with dtwm running
at 100% of the CPU. It works fine with JRE 1.5. Has anyone had such
problem? Any solutions? Thanks
|
| Author |
Message |
pamkoh99

|
Posted: 2004-1-14 21:08:00 |
Top |
java-programmer, Java license explanation
Can someone explain to me if Java can be used freely like other
softwares like C++.Perl, PHP or I have to pay for its license once I
used it in programming in a company or in a website or e-commerce.
Is Java really opensource or not?
And so when will be the time you have to pay for its license?
Thanks!!!
|
| |
|
| |
 |
Jon Skeet

|
Posted: 2004-1-14 21:30:00 |
Top |
java-programmer >> Java license explanation
Chris <email***@***.com> wrote:
> Can someone explain to me if Java can be used freely like other
> softwares like C++.Perl, PHP or I have to pay for its license once I
> used it in programming in a company or in a website or e-commerce.
Yes, you can use it freely.
> Is Java really opensource or not?
There are open source implementations of the Java platform. Sun has
said repeatedly that it would *like* to make its JRE open source, but
hasn't yet.
> And so when will be the time you have to pay for its license?
It's unlikely you'll ever have to - particularly with .NET available
now. Bear in mind that there are multiple JRE vendors - the chances of
*all* the major ones deciding to charge are slim, IMO.
--
Jon Skeet - <email***@***.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
|
| |
|
| |
 |
Michael Borgwardt

|
Posted: 2004-1-14 21:33:00 |
Top |
java-programmer >> Java license explanation
Jon Skeet wrote:
>>Is Java really opensource or not?
>
>
> There are open source implementations of the Java platform. Sun has
> said repeatedly that it would *like* to make its JRE open source, but
> hasn't yet.
It is "open source" in the sense that the source is publically available,
but not in the sense that people are allowed to modify it and distribute
such modified versions (Sun very explicitly forbids this in their license
terms). So it depends on what you mean with "open source".
|
| |
|
| |
 |
Jon Skeet

|
Posted: 2004-1-14 21:39:00 |
Top |
java-programmer >> Java license explanation
Michael Borgwardt <email***@***.com> wrote:
> > There are open source implementations of the Java platform. Sun has
> > said repeatedly that it would *like* to make its JRE open source, but
> > hasn't yet.
>
> It is "open source" in the sense that the source is publically available,
> but not in the sense that people are allowed to modify it and distribute
> such modified versions (Sun very explicitly forbids this in their license
> terms). So it depends on what you mean with "open source".
Well, I don't think you'd find many people who are *at all* interested
in open source or free (as in speech) software who would consider that
(or Microsoft's Shared Source licence) to be "open source".
--
Jon Skeet - <email***@***.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
|
| |
|
| |
 |
Michael Borgwardt

|
Posted: 2004-1-14 21:43:00 |
Top |
java-programmer >> Java license explanation
Jon Skeet wrote:
>>It is "open source" in the sense that the source is publically available,
>>but not in the sense that people are allowed to modify it and distribute
>>such modified versions (Sun very explicitly forbids this in their license
>>terms). So it depends on what you mean with "open source".
>
>
> Well, I don't think you'd find many people who are *at all* interested
> in open source or free (as in speech) software who would consider that
> (or Microsoft's Shared Source licence) to be "open source".
The original poster didn't sound like he was aware of the full meaning
of the expression.
|
| |
|
| |
 |
Joona I Palaste

|
Posted: 2004-1-15 6:09:00 |
Top |
java-programmer >> Java license explanation
Jon Skeet <email***@***.com> scribbled the following:
> Michael Borgwardt <email***@***.com> wrote:
>> > There are open source implementations of the Java platform. Sun has
>> > said repeatedly that it would *like* to make its JRE open source, but
>> > hasn't yet.
>>
>> It is "open source" in the sense that the source is publically available,
>> but not in the sense that people are allowed to modify it and distribute
>> such modified versions (Sun very explicitly forbids this in their license
>> terms). So it depends on what you mean with "open source".
> Well, I don't think you'd find many people who are *at all* interested
> in open source or free (as in speech) software who would consider that
> (or Microsoft's Shared Source licence) to be "open source".
Don't you have to *both* be on a special "invite list" *and* pay a huge
sum of money to qualify for Microsoft's "Shared Source"? If that is
true, then it's less open than what Sun is doing.
--
/-- Joona Palaste (email***@***.com) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"No, Maggie, not Aztec, Olmec! Ol-mec!"
- Lisa Simpson
|
| |
|
| |
 |
pamkoh99

|
Posted: 2004-1-15 17:18:00 |
Top |
java-programmer >> Java license explanation
Joona I Palaste <email***@***.com> wrote in message news:<bu4emk$gld$email***@***.com>...
> Jon Skeet <email***@***.com> scribbled the following:
> > Michael Borgwardt <email***@***.com> wrote:
> >> > There are open source implementations of the Java platform. Sun has
> >> > said repeatedly that it would *like* to make its JRE open source, but
> >> > hasn't yet.
> >>
> >> It is "open source" in the sense that the source is publically available,
> >> but not in the sense that people are allowed to modify it and distribute
> >> such modified versions (Sun very explicitly forbids this in their license
> >> terms). So it depends on what you mean with "open source".
If I made an online website with e-commerce attached with it using
java,jsp,j2EE etc, would i then have to pay a java license for use of
it?
|
| |
|
| |
 |
Michael Borgwardt

|
Posted: 2004-1-15 17:26:00 |
Top |
java-programmer >> Java license explanation
Chris wrote:
> If I made an online website with e-commerce attached with it using
> java,jsp,j2EE etc, would i then have to pay a java license for use of
> it?
No.
|
| |
|
| |
 |
Jon Skeet

|
Posted: 2004-1-15 17:35:00 |
Top |
java-programmer >> Java license explanation
Joona I Palaste <email***@***.com> wrote:
> > Well, I don't think you'd find many people who are *at all* interested
> > in open source or free (as in speech) software who would consider that
> > (or Microsoft's Shared Source licence) to be "open source".
>
> Don't you have to *both* be on a special "invite list" *and* pay a huge
> sum of money to qualify for Microsoft's "Shared Source"? If that is
> true, then it's less open than what Sun is doing.
No, definitely not.
For instance, anyone can download ROTOR (Microsoft's FreeBSD/XP/MacOSX
CLR implementation) - see http://msdn.microsoft.com/net/sscli/
You need to agree to a licence, but that's fair enough.
There are other parts which *are* more heavily restricted, although
again those don't always require money. For instance, as an MVP I
believe I actually have access to the Windows source code free of
charge, if I want it - under strict terms and conditions of use, of
course.
--
Jon Skeet - <email***@***.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
|
| |
|
| |
 |
Jon Skeet

|
Posted: 2004-1-15 18:35:00 |
Top |
java-programmer >> Java license explanation
Chris <email***@***.com> wrote:
> If I made an online website with e-commerce attached with it using
> java,jsp,j2EE etc, would i then have to pay a java license for use of
> it?
No - although depending on which J2EE server you picked, you may well
have to pay for that.
--
Jon Skeet - <email***@***.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
|
| |
|
| |
 |
Joona I Palaste

|
Posted: 2004-1-16 3:19:00 |
Top |
java-programmer >> Java license explanation
Jon Skeet <email***@***.com> scribbled the following:
> Joona I Palaste <email***@***.com> wrote:
>> > Well, I don't think you'd find many people who are *at all* interested
>> > in open source or free (as in speech) software who would consider that
>> > (or Microsoft's Shared Source licence) to be "open source".
>>
>> Don't you have to *both* be on a special "invite list" *and* pay a huge
>> sum of money to qualify for Microsoft's "Shared Source"? If that is
>> true, then it's less open than what Sun is doing.
> No, definitely not.
> For instance, anyone can download ROTOR (Microsoft's FreeBSD/XP/MacOSX
> CLR implementation) - see http://msdn.microsoft.com/net/sscli/
> You need to agree to a licence, but that's fair enough.
> There are other parts which *are* more heavily restricted, although
> again those don't always require money. For instance, as an MVP I
> believe I actually have access to the Windows source code free of
> charge, if I want it - under strict terms and conditions of use, of
> course.
How does one get to be an MVP then?
--
/-- Joona Palaste (email***@***.com) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"To doo bee doo bee doo."
- Frank Sinatra
|
| |
|
| |
 |
Chris Smith

|
Posted: 2004-1-16 3:41:00 |
Top |
java-programmer >> Java license explanation
Joona I Palaste wrote:
> How does one get to be an MVP then?
>
Answer questions on newsgroups. The catch is that you have to do it in
the microsoft.* hierarchy. Eventually, someone will notice you and make
you an MVP.
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
|
| |
|
| |
 |
Jon Skeet

|
Posted: 2004-1-16 5:36:00 |
Top |
java-programmer >> Java license explanation
Joona I Palaste <email***@***.com> wrote:
> > There are other parts which *are* more heavily restricted, although
> > again those don't always require money. For instance, as an MVP I
> > believe I actually have access to the Windows source code free of
> > charge, if I want it - under strict terms and conditions of use, of
> > course.
>
> How does one get to be an MVP then?
Well, in my case I answer a lot of posts on the C# and .NET
newsgroups...
--
Jon Skeet - <email***@***.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
|
| |
|
| |
 |
Juha Laiho

|
Posted: 2004-1-16 6:07:00 |
Top |
java-programmer >> Java license explanation
email***@***.com (Chris) said:
>Can someone explain to me if Java can be used freely like other
>softwares like C++.Perl, PHP or I have to pay for its license once I
>used it in programming in a company or in a website or e-commerce.
>
>Is Java really opensource or not?
>And so when will be the time you have to pay for its license?
Actually the license is not as clear as I was thinking. While re-reading
it (LICENSE file included in J2SDK 1.4.1 distribution), I noticed the
following:
In the very beginning:
: 1. LICENSE TO USE. Sun grants you a non-exclusive and
: non-transferable license for the internal use only of the
: accompanying software and documentation and any error
: corrections provided by Sun (collectively "Software"), by
: the number of users and the class of computer hardware for
: which the corresponding fee has been paid.
... ok, currently the fee apparently is zero, but a provision seems to
exist to set a non-zero fee (of course this would be applicable only for
licenses granted after setting the fee). But what was the odd clause in
the above was the statement "for internal use only". So, would this mean
that if I set up a WWW site where users could upload Java source files
for compilation, and download the resulting class files, I would be
infringing this license?
Later (at around 3/4 of the file):
: 5. Notice of Automatic Software Updates from Sun. You
: acknowledge that the Software may automatically download,
: install, and execute applets, applications, software
: extensions, and updated versions of the Software from Sun
: ("Software Updates"), which may require you to accept
: updated terms and conditions for installation. If
: additional terms and conditions are not presented on
: installation, the Software Updates will be considered part
: of the Software and subject to the terms and conditions of
: the Agreement.
:
: 6. Notice of Automatic Downloads. You acknowledge that, by
: your use of the Software and/or by requesting services that
: require use of the Software, the Software may automatically
: download, install, and execute software applications from
: sources other than Sun ("Other Software"). Sun makes no
: representations of a relationship of any kind to licensors
: of Other Software. TO THE EXTENT NOT PROHIBITED BY LAW, IN
: NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST
: REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT,
: CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
: CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT
: OF OR RELATED TO THE USE OF OR INABILITY TO USE OTHER
: SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY
: OF SUCH DAMAGES.
Here I'm uncertain as to how I should intepret the word "may"
in phrase "may automatially download". Is it "may" as in "is
allowed to", or "may" as in "this could happen"? So, is Sun
stating that I must allow the program to perform its automated
downloads, or is Sun just warning me that the software could
attempt to "phone home"?
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
|
| |
|
| |
 |
Jon Skeet

|
Posted: 2004-1-16 6:18:00 |
Top |
java-programmer >> Java license explanation
Juha Laiho <email***@***.com> wrote:
> Here I'm uncertain as to how I should intepret the word "may"
> in phrase "may automatially download". Is it "may" as in "is
> allowed to", or "may" as in "this could happen"? So, is Sun
> stating that I must allow the program to perform its automated
> downloads, or is Sun just warning me that the software could
> attempt to "phone home"?
It's basically saying that J2SE contains webstart, which might download
an updated version of Java.
--
Jon Skeet - <email***@***.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
|
| |
|
| |
 |
bcd

|
Posted: 2004-1-16 6:37:00 |
Top |
java-programmer >> Java license explanation
In article <bu72s0$uj8$email***@***.com>,
Juha Laiho <email***@***.com> wrote:
>
>In the very beginning:
>: 1. LICENSE TO USE. Sun grants you a non-exclusive and
>: non-transferable license for the internal use only of the
>: accompanying software and documentation and any error
>: corrections provided by Sun (collectively "Software"), by
>: the number of users and the class of computer hardware for
>: which the corresponding fee has been paid.
>
>... ok, currently the fee apparently is zero, but a provision seems to
>exist to set a non-zero fee (of course this would be applicable only for
>licenses granted after setting the fee). But what was the odd clause in
>the above was the statement "for internal use only". So, would this mean
>that if I set up a WWW site where users could upload Java source files
>for compilation, and download the resulting class files, I would be
>infringing this license?
I believe it's a "assemble a license from pre-built parts" sort of
situation. The first part of the license is a standard Sun license
that basically doesn't let you do anything interesting with the
software and then they tag on the "supplemental license terms" to the
end that reverse a number of the limitations of the preceding section.
They probably find it's a convenient way of building licenses.
Cheers
Bent D
--
Bent Dalager - email***@***.com - http://www.pvv.org/~bcd
powered by emacs
|
| |
|
| |
 |
Andrew Thompson

|
Posted: 2004-1-16 6:53:00 |
Top |
java-programmer >> Java license explanation
"Chris Smith" <email***@***.com> wrote in message
news:email***@***.com...
| Joona I Palaste wrote:
| > How does one get to be an MVP then?
....
| Answer questions on newsgroups. The catch is that you have to
do it in
| the microsoft.* hierarchy. Eventually, someone will notice you
and make
| you an MVP.
VBG.. given Jon's prolific posting rate,
that sounds like hard work!
|
| |
|
| |
 |
Tris Orendorff

|
Posted: 2004-1-17 8:27:00 |
Top |
java-programmer >> Java license explanation
Joona I Palaste <email***@***.com> wrote in
news:bu6p3c$19$email***@***.com:
>> There are other parts which *are* more heavily restricted, although
>> again those don't always require money. For instance, as an MVP I
>> believe I actually have access to the Windows source code free of
>> charge, if I want it - under strict terms and conditions of use, of
>> course.
>
> How does one get to be an MVP then?
Tell Bill he has the largest one you've ever seen.
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d++ s+:- a+ C+ UL++++ P+ L+ E- W+ N++ o- K++ w+ O+ M !V PS+ PE Y+ PGP
t+ !5 X- R- tv--- b++ DI++ D+ G++ e++ h---- r+++ y+++
------END GEEK CODE BLOCK------
|
| |
|
| |
 |
perry

|
Posted: 2004-5-14 5:25:00 |
Top |
java-programmer >> Java license explanation
java itself is basically free to use to your hearts content and if you
were smart and/or you had heavy budget constraints you'd use all open
source that didn't have any performance penalties once your went into
production (aka started making money with it). hence, not only java but
linux is basically in the same boat....
free is you want it to be
what you are paying for is someones tools to help you with it and
usually, if you look around they can be found pretty free too...
however, many people have an attitude that if i don't pay for it then it
can't be worth anything... hence, to my dismay, companies like borland
are charging thousands of dollars for a single developers licences in
some cases
only in america
- perry
Chris wrote:
> Can someone explain to me if Java can be used freely like other
> softwares like C++.Perl, PHP or I have to pay for its license once I
> used it in programming in a company or in a website or e-commerce.
>
> Is Java really opensource or not?
> And so when will be the time you have to pay for its license?
>
> Thanks!!!
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- In Swing, using the RTFEditorKit, how to copy/cut Formatting *and* text to the Clipboard?Hi Folks:
Any idea on the best approach to support copy/cut of all style/formatting as
well as plain text for a JTextPane? I googled quite a bit and located a
word processing program that supports JTextPane but they specifically
mention it only places "plain text" to the Clipboard and ignores the
formatting information when transfering.
I was thinking about implementing the Transferable interface and using the
Clipboard.setContents(..) method but I'm not sure yet by which procedure I
implement the getTransferData() as it wants to return an Object. I could
use a byte[] stream and return a ByteArrayOutputStream who's contents would
be filled with the Document's data (ie, plain text *and* the control/style
information). I just don't know if that would work yet but I plan to try
that.
Seems like there's very little (if anything) mentioned in the sun
developer's forum on how to do this as well as in google...
First of all, is Java's support for RTF still somewhat "primative"??? I
have a full blown word processor going which looks like Word and supports
font changes, size changes, find/replace operations, etc... It's just that
the cut/copy only transfers the plain text (despite my attempts to call
setContentType("text/rtf")) to the clipboard and not the style information.
thanks for any insight, Theron
- 2
- Download file problem in netscapeConsider this example..
I have a pdf file which is embedded in the browser and I have a
download link which is used to download that pdf file. When I click on
the download link, it is not functioning since it is the same url as
the embedded pdf and because the adobe reader is already there in the
browser it will automatically opens or the embedded pdf will goes off.
To prevent this scenario, we can use a mechanism. First create a
hidded iFrame in the same window using the following code..
<iframe style="DISPLAY: none" name="iframe1" src="">
Now make a small change to your download link so that the url target
is pointing to the hidden frame as shown below..
<a href="..." target="iframe1">Download</a>
This will solve the problem. However this method will not work with
Internet Explorer. For IE we can use another method and that method
can be choosen automatically by the browser.
More java tips @ http://sourcecentral.blogspot.com
- 3
- java.sql.SQLException: ORA-00020: maximum number of processes (100) exceededHello Friends,
I am getting the following error.
java.sql.SQLException: ORA-00020: maximum number of processes (100)
exceeded
I am closing all my resultsets and all my connections in the try
block.
should i close ResultSets and Connections in the catch block aswell?.
or the problem is due to the connection pool settings in weblogic or
on the oracle side instead of in my application.
Thanks in Advance
s
- 4
- Download the JAVA , .NET and SQL Server interview question with answersDownload the JAVA , .NET and SQL Server interview sheet and rate
yourself. This will help you judge yourself are you really worth of
attending interviews. If you own a company best way to judge if the
candidate is worth of it.
http://www.questpond.com/InterviewRatingSheet.zip
2000 Interview questions of .NET , JAVA and SQL Server Interview
questions (worth downloading it)
http://www.questpond.com/InterviewQuestions.zip
Core Java and OOP's Interview questions
http://www.questpond.com/OOPsAndCoreJava.zip
Servlets / JSP Interview questions
http://www.questpond.com/ServletsJSP.zip
Architecture Interview Question
http://www.questpond.com/ArchitectureInterviewQuestions.zip
Project Management Interview questions must to read for all aspiring
project managers
http://www.questpond.com/ProjectManagementInterviewQuestions.zip
Full Address book application in C# with technical specification ,
estimation and test cases
http://www.questpond.com/AddressbookProject.zip
Web services Interview questions
http://www.questpond.com/WebServicesAndRemoting.zip
SQL Server 2005 Database optimization Interview questions
http://www.questpond.com/DatabaseOptimization.zip
SQL Server 2005 DTS Interview questions
http://www.questpond.com/DTSInterviewQuestions.zip
SQL Server datawarehoue and Data mining Interview questions
http://www.questpond.com/DatawareHousingandDataMining.zip
SQLCLR Interview questions
http://www.questpond.com/SQLCLRInterviewquestion.zip
SQL Server XML Interview questions
http://www.questpond.com/SQLServerXML.zip
Basic .NET Framework interview questions
http://www.questpond.com/FrameWorkSampleInterviewQuestions.zip
.NET Interop and COM Interview questions
http://www.questpond.com/InteropdotnetInterviewQuestions.zip
ASP.NET Caching Interview questions
http://www.questpond.com/CachingInterviewQestions.zip
Do not know how estimations are done here's a complete book on it
http://www.questpond.com/HowtoPrepareSoftwareQuotations.zip
- 5
- CVS checkout doesn't work in Eclipse v3.0.1Hi,
Since the CVS functionality of NetBeans doesn't appear to work for
me, I'm trying Eclipse. However, the CVS functionality of Eclipse
doesn't appear to work either. When I try to do a CVS checkout in
Eclipse, a "project" does get created in my workspace, but the
contents of the CVS modules aren't actually in the project. Now, the
contents of the module are only directories to this point, because I
was looking to work on the module with Eclipse. Should this be a
problem? Should I add a least one file to the project before Eclipse
will properly checkout the module with all its subdirectories?
Thanks,
Jason
- 6
- Running a servlet with TomcatHi,
When I use the following URL in Internet Explorer:
http://localhost/servlet/HelloWorldExample
I get an error message:
-----8<------------
HTTP Status 404 - /servlet/HelloWorldExample
--------------------------------------------------------------------------------
type Status report
message /servlet/HelloWorldExample
description The requested resource (/servlet/HelloWorldExample) is not
available.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.17
-----8<------------
I have the HelloWorldExample.class file in
C:\Tomcat5.5\webapps\ROOT\WEB-INF\classes.
Can anyone help me please?
Best regards,
Matheas Manssen
- 7
- importing classs without package in JSP ?Hi,
i am working on apache server web based project and i want to import a
class without package in my JSP file.
All my classes are in "WEB-INF/classes"
if i use a package (such as "project") in a class (such as "match" )
then i can import class "match" in jsp using
<%@ page import="
java.util.*,
project.*
"%>
But if i dont have package then i dont know how to import my class in
JSP. Thats what i want to know .
PLease help me. i am really thankful to you guys.
Sincerely,
Jeff
- 8
- garbled JFrame
Ive got a a JFrame class displaying many JLabels with images inside.
It displays fine and I can drag it around the desktop ok.
But when I drag another window over the JFrame my JFrame gets garbled.(get
multiple images of the labels)
Even when i minimize it and maximize it is still garbled.
why would that be?
TIA
patrick
- 9
- AspectJ: solution to Java's repetitiveness?thufir wrote:
> On Sat, 26 Apr 2008 06:51:43 -0400, Lew wrote:
>
>>> attrib_writer :foo, :bar #getter and setter for foo and bar attributes,
>>> #getter setter methods aren't actually written
>> Well, Java cannot do that because it's not in the language definition
>> and because the colon character already serves three other purposes in
>> Java.
>
> That Ruby syntax doesn't work in Java isn't the point at all.
>
>> I would just go with getters/setters. What's the big deal? My IDEs
>> generate them for me, so there's no typing, and it sure helps
>> maintainers to see them.
>>
>> It would be a huge waste of energy to retrofit Java with such a feature.
>
> The point is that getter/setter methods are boilerplate. Adding such a
> feature to Java would be worth it, and Java is constantly in flux.
>
>
> -Thufir
Can't you just add a (custom) annotation, e.g. "@JavaBean", and use
apt to generate the getters/setters? (Or possibly the newer
javax.annotation* stuff?) You could add options to such an
annotation e.g., read-only.
Then add the one extra line in your ant script to build code.
Note JavaEE defines many such annotations, including for an
MX Bean. Adding a standard annotation "@JavaBean" doesn't seem
like it would be that much effort, for a large convenience payoff.
<waffle>
Like Lew I use an IDE that does that for me. Still, I don't like
dependencies on particular tools that provide special features, if
the language could easily support them with little effort.
OTOH as others have pointed out in previous threads, the JavaBean
spec is rarely used, so maybe adding more standard annotations
isn't worth it.
If the OP thinks it should be used, create or modify a JSR for this
feature; if enough others agree it will be added.
</waffle>
-Wayne
- 10
- JSplitPane/JScrollPane Problem?Hey,
I'm writing an interface that has a verticle split pane, the top
and bottom of which both contain JScrollPanes with JEditor panes inside
each scrollpane. It sits within a JTabbedPane which is in a
JInternalFrame on a JDesktopPane.
JDesktopPane --> JTabbedPane --> Tab --> JSplitPane --> 2 ScrollPanes
--> 2 JEditorPanes.
The first EditorPane is a source area and the second is an error
output area. It's been working fine for me, which makes my current
dilema even worse.
I need to do the same format of error for an output tab so that
the output area is on top and the error output is on bottom. I took
the code from the previous working implementation and ported it and for
some reason it didn't work. The top component JScrollPane-->
JEditorPane does not show, but the bottom one does. Also, if I just
add the JScrollPane instead of the JSplitPane to the tab, it still
doesn't show, leading me to believe that it is a problem with the
implementation of the JScrollPane. Here are the code snippets of the
working and non-working portions of my code.
-----Working-----
source = new JEditorPane();
sourceError = new JEditorPane();
sourceError.setEditable(false);
JScrollPane scrollPane = new JScrollPane(source,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane.setBorder(BorderFactory.createEmptyBorder());
JScrollPane errorScrollPane = new
JScrollPane(sourceError);
errorScrollPane.setBorder(BorderFactory.createEmptyBorder());
sourceSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
scrollPane,
errorScrollPane);
sourceSplit.setBorder(BorderFactory.createEmptyBorder());
-----Not Working-----
expressionOut = new JEditorPane();
outputError = new JEditorPane();
expressionOut.setEditable(false);
outputError.setEditable(false);
JScrollPane outputScroller = new
JScrollPane(expressionOut,
JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
outputScroller.setBorder(BorderFactory.createEmptyBorder());
JScrollPane outErrorScroller = new
JScrollPane(outputError);
outErrorScroller.setBorder(BorderFactory.createEmptyBorder());
sourceSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
outputScroller, outErrorScroller);
outputSplit.setBorder(BorderFactory.createEmptyBorder());
-----How They Are Added-----
tabFrame.addTab("Source", sourceSplit);
tabFrame.addTab("Output", outputSplit);
---------------
Any Ideas on why it isn't showing expressionOut?
- 11
- help with multidimensional arraysHi
I am a newbie in the world of Java programming. I have recently started
learning the language. Apart from other hickups one which has been on
my nerves is the concept of multidimensional arrays. As far as my
understanding goes these are array of arrays.
1. WHAT DOES THIS MEAN?
2. ARE ARRAYS RESTRICTED TO THREE DIMENSIONS ONLY OR THERE IS ANY OTHER
LIMIT AND HOW DOES THREE DIMENSIONAL OR HIGHER DIM ARRAYS WORK?
Does two dim arrays represent a pigeon hole type thing in which you
find a particular hole by giving row and column address e,g. box
located at row 5 and column 2.
3. IF THIS CONCEPT OF TWO DIMENSIONAL ARRAYS IS CORRECT THEN HOW DOES
THREE DIMENSIONAL OR HIGHER DIM ARRAYS WORK.
Presently I am going through a book written by Herber Schildt known as
Java 2 complete reference, Following is a program which demonstrates
the two dim arrays. I am unable to understand the make of the program
may be so many loops are troubling me. I am especially confused about
the functioning of the question mark steps please help me out there.
// Demonstration of concept of two dimensional arrays
class twoD {
public static void main (String args [ ]) {
int [ ][ ] twoD = new int [4][5];
int i,j,k = 0;
for (i=0; i<4; i++)
for (j=0; j<5; j++) {
twoD [i][j] = k; ?
k++; ?
}
for (i=0; i<4; i++) {
for (j=0; j<5; j++)
System.out.println (twoD[i][j] + " ");
System.out.println();
}
}
}
4. HOW AND WHY SO MANY LOOPS ARE FUNCTIONING TOGETHER?
(While replying please be patient and keep in mind that u r talking to
an absolute beginner in the world of Java programming)
- 12
- The simplest way to show a large output string?Hi,
What I want to do is quite simple: I want to show a large output String.
The user then will press "OK"; then the output window disappears, and
the program continues.
The following code would be ok for me, but the real String I want to
show is very long (let's say 1000 characters and 100 lines), so I need
scrollbars...
Could you please tell me the simplest way to achieve this? Thanks in
advance for your help.
==========================
package gui;
import javax.swing.*;
public class Prova {
public static void main(String[] args) {
String s = "hello";
JOptionPane.showMessageDialog(null, s);
System.exit(0);
}
}
=====================
- 13
- Critical Problem with Tomcat 3.3.1 and SSLHello,
I am having a serious problem trying to set up SSL on Tomcat 3.3.1 on
Windows 2000. I am following the jakarta guidelines exactly as they
propose, but I am having absolutely no luck. What am I doing wrong?
Here is the procedure I follow:
First, I run the following command -
keytool -genkey -keyalg rsa -alias name -keystore name
- I then answer the questions. I tried setting the common name as
my name, and a second time as the the URL used to access the site in
question, ie: sitename.com
Then, I issue the following command -
keytool -certreq -keystore name -alias name -file name.csr
Next, I send the name.csr file to the CA, and recieve 3 certificates.
The 3 certificates I receive are RootCert.cer, IntCert.cer and
NewCert.cer. So, I then issue the following commands in this order:
keytool -import -trustcacerts -file RootCert.cer -alias rootcert
-keystore name
keytool -import -trustcacerts -file IntCert.cer -alias intcert
-keystore name
keytool -import -trustcacerts -file NewCert.cer -alias newcert
-keystore name
After each command I receive confirmation that the certification was
properly inserted. I then copy the 'name' file to TOMCAT_HOME/conf
and edit the server.xml file. I add the following lines to the
server.xml file:
<Http10Connector
port="8443"
secure="true"
keystore="c:\tomcat\conf\name"
keypass="password"
clientauth="false"/>
Now, I restart tomcat and assume that everything should be in order.
When starting tomcat via the batch file, I see that an Http10Connector
is correctly sitting on port 8443. So, I try accessing the site
normally, and everything works fine. However, if I attempt an HTTPS
request to the site, I receive a page cannot be displayed error. This
is strange, because I figured that at this point it should work.
Well, I then attempted to access it manually by addressing
localhost:8443 .... this is where I noticed a problem. Once the
request is sent to Tomcat, Tomcat throws the following exception:
PoolTcpEndpoint: Handshake failed
javax.net.ssl.SSLException: Unrecognized SSL handshake.
at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
at java.io.OutputStream.write(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
at org.apache.tomcat.util.net.JSSESocketFactory.handshake(JSSESocketFactory.java:270)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:479)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Unknown Source)
ThreadPool: Caught exception executing
org.apache.tomcat.util.net.TcpWorkerThread@3a8602, terminating thread
java.lang.NullPointerException
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:498)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Unknown Source)
What is going on? Luckily, I have access to a CA, so this process
isn't costing me anything, however I have attempted this multiple
times with various certificates and various settings on the
certificate and I always get this same exception. What's more, I
tried creating a self signed certificate and I still get this
exception. Am I doing something wrong? I have scoured the net
countless times and it seems like all the instructions say the same
thing. When I search for this error, none of the recomendations fit
my situation. If no one knows how to fix this, could someone please
recomend where I can go so that I can find the answer to this problem?
Please help me out, this is driving me nuts. Thanks in advance,
Dan
- 14
- How Can I put XSL tag inside HTML form tag?Hello Dudes,
Sorry I couldn't find a XML/XSL group
I can only post these groups close to my subject.
In JSP (Java Server Page) you can do something
like this
<%
String v = myBean.getValue();
%>
<form .... >
<input name="myTag" value="<%= v %>">
</form>
You can do the similar thing in PHP.
But when I try in XSL I got error.
I have an XML file
<myTag attribute1="value1" />
Now I want to transform it into HTML form tag used XSL template
But XSL doesn't like this
<input name="myTag" value='
<xsl:value-of select="@attribute1" />
'></input>
How can I solve this problem?
Thank Q very much in advance!
- 15
- how do I encode image as stringI am trying to pass an image that I am manipulating in a java applet to
a javascript fuction, to be used there as either the source for an img
tag, or to save and/or print. Another possibility is to pass the image
up to a php script for further processing on the server. I know that
you can use ImageIO to save the image to a ByteArrayOutputStream, and
then use the stream's toString to get a string, but passing that string
to javascript truncates the image after the first 4 characters, due to a
null character (hex 0). I have been able to encode the string to
base64, but I do not know if anything more is needed to be done for the
javascript function to use it as an image.
I know that you can embed images in HTML by storing a special string
representation of the image in a javascript variable, but I do not know
what this format is. If I knew this format, I could encode the image in
Java, and then pass this string on. Any one know anything that could
help me?
Darcy Kahle
|
|
|