 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- How to make CLASSPATH behave like PATH on Windows?Windows (XP and NT) allows one to specify environmental variable
(such as PATH and CLASSPATH) at both the SYSTEM-wide level
as well as at the per-USER level.
And the behavior has always been that the value of one's PATH list is
the concatenation of those two ENV specifications.
So, the $64 question is: Is there some way to coerce the resulting
CLASSPATH list to also be a concatenation of both the SYSTEM
and the USER's lists?
(Hopefully, some sort of registry hack can accomplish this!?)
The reason I ask is that today, after installing a Sun 'product' called
JMF (Java Media Framework), it BROKE my existing CLASSPATH
setup. The reason it BROKE it was that BEFORE the installation,
I had my CLASSPATH defined (only) at the SYSTEM level, and it
got inherited into my USER level. But, the (stupid?) JMF kit decided
to 'add' some stuff of its own to the USER classpath, and since one
didn't exist at all, it created one and put its stuff in it.
BUT the unwanted side-effect of that (brilliant?) idea was that now
the only resulting CLASSPATH that the users have is this new one that
the kit created and all the existing entries on the SYSTEM-wide defn
of CLASSPATH now get tossed into the bit-bucket.
Any SUN Java architects out there who can rule on this? Is this a
bug or a feature of the JMF kit? (A registry hack or something similar
for a workaround would be nice.)
Cheers...
Dave
- 1
- SAX with JAXPHi,
I want to parse a XML document with SAX (using JAXP) and found lot's of
examples of parsing from a file. But... I have the XML in a String variable
and want to parse from there. All the 'parse' methods from the SAXParse
class receive a File, or a InputStream, or a URI... I don't want to create a
file just to be able to parse the XML (for performance reasons).
Any help appreciated,
Araxes Tharsis
- 1
- Applet is not able to call a URLHello!
I try to make a HTTP Connection through a Applet. The Url is inside
the same CodeBase.
Error message: java.net.UnknownHostException: https://www.unserserver.de
HttpMethod method = null;
try {
URL url = new URL(sUrl);
HostConfiguration hostConfig = new HostConfiguration();
hostConfig.setHost(url.getHost(), url.getPort(), url.getProtocol());
HttpClientParams httpClientParams = new HttpClientParams();
HttpClient httpClient = new HttpClient();
httpClient.setHostConfiguration(hostConfig);
httpClient.setParams(httpClientParams);
method = new GetMethod();
method.setQueryString(url.getQuery());
method.setPath(url.getPath());
int resultCode = httpClient.executeMethod(method);
} catch (Exception e) {
System.out.println(e);
}
I have configured the JVM to use the default settings of the browser,
to connect through the proxy.
Without proxy on my own workstation it works, but for the customer it
doesn't work, allthough he saids, that he has configured the same
settings for the JVM.
Any ideas?
best regards
Alexa
- 1
- UML to JavaHello all,
Does anybody knows a good tutorial for beginners to Make java code out of
UML?
Irlan
- 3
- ROW ID problemHi,
I am wtiting JAVA application and getting datas from MS SQL.
This is the code:
QueryDataSet ds = new QueryDataSet();
ds.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor
(db,"select * from myTable"));
In myTable there is one column defined as "primary key".
But dataset(ds) does not get rowID automatically. I have
to disable updateRowID in MetaDataUpdate for dataset, and
then set rowID to the column manually
I had no problem in Sybase, but now I have changed to MS
SQL. Any idea? May be it is some connection property I
have not checked out?
Thanks beforehand.
- 3
- static methods dont inherit (was: Constructor inheritance)"Andrew McDonagh" wrote...
: isamura wrote:
:
: snipped.
:
: > :
: > Can you clarify. Do you mean subclass can't inherit static methods either?
: >
: > ..K
: >
: Correct.
:
: Static methods don't belong to an object like normal (aka Instance)
: methods, they belong to the Class.
:
: When calling a static method you: 'Class.myStaticMethod()'
:
: there's no object, so no Vtable to use to look through.
:
This is going off-topic so I will change the thread topic.
That is puzzling since the following compiles and runs (JDK 1.42):
public static myStaticMethod(); // defined in ClassA
ClassB extends ClassA
ClassB.myStaticMethod(); // no problem
Please explain...
.K
- 6
- jdk 5 generic, why not the other way arround for (T[] e, Collection<T> c)Hi,
I'm trying to understand the generic concept. The following confused
me:
public static void main(String arg[])
{
Object[] oa = new Object [10];
Collection<Object> co = new ArrayList<Object>();
String[] sa = new String[10];
Collection<String> cs = new ArrayList<String>();
method(sa, co); //1
method(oa, co); //2
method(oa,cs); // 3, compile error:
//<T>method(T[],java.util.Collection<T>) in Test cannot be applied to
// (java.lang.Object[],java.util.Collection<java.lang.String>)
// method(oa,cs);
}
static <T> void method(T[]e, Collection<T> c)
{ //do nothing }
The #2 is obvious, but why #1 is ok and #3 is wrong?
- 6
- Jaxb and xsd Help requestedHi,
I'm having problems compiling the classes generated by Jaxb when using
the schema below. (Note the xsd below is part of a bigger xsd file i
just pulled out the section that was giving me issues ). If anyone can
see a problem with the xsd defined below I would appreicate the
information.
The inner interface defined within the generated java class is causing
me issues. The error I get is "Nested type GuestCountType hides an
enclosing type". i would appreciate any help with this.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:complexType name="GuestCountType">
<xs:sequence>
<xs:element name="GuestCount" maxOccurs="99">
<xs:complexType>
<xs:attributeGroup ref="GuestCountGroup"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="IsPerRoom" type="xs:boolean" use="optional"/>
</xs:complexType>
<xs:complexType name="RoomStayCandidateType">
<xs:sequence>
<xs:element name="GuestCounts" type="GuestCountType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:attributeGroup name="GuestCountGroup"/>
</xs:schema>
//
// This file was generated by the JavaTM Architecture for XML
Binding(JAXB) Reference Implementation, v1.0.4-b18-fcs
// See <a
href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of
the source schema.
// Generated on: 2006.05.06 at 09:47:52 EDT
//
package generated;
/**
* Java content class for GuestCountType complex type.
* <p>The following schema fragment specifies the expected content
contained within this java content object. (defined at
file:/C:/xsdfiles/test.xsd line 4)
* <p>
* <pre>
* <complexType name="GuestCountType">
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="GuestCount" maxOccurs="99">
* <complexType>
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attGroup ref="{}GuestCountGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="IsPerRoom"
type="{http://www.w3.org/2001/XMLSchema}boolean" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*/
public interface GuestCountType {
/**
* Gets the value of the isPerRoom property.
*
*/
boolean isIsPerRoom();
/**
* Sets the value of the isPerRoom property.
*
*/
void setIsPerRoom(boolean value);
/**
* Gets the value of the GuestCount property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the
GuestCount property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getGuestCount().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link generated.GuestCountType.GuestCountType}
*
*/
java.util.List getGuestCount();
/**
* Java content class for anonymous complex type.
* <p>The following schema fragment specifies the expected content
contained within this java content object. (defined at
file:/C:/xsdfiles/test.xsd line 7)
* <p>
* <pre>
* <complexType>
* <complexContent>
* <restriction
base="{http://www.w3.org/2001/XMLSchema}anyType">
* <attGroup ref="{}GuestCountGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*/
public interface GuestCountType {
}
}
- 8
- Processing of java-common_0.27_amd64.changesjava-common_0.27_amd64.changes uploaded successfully to localhost
along with the files:
java-common_0.27.dsc
java-common_0.27.tar.gz
java-common_0.27_all.deb
Greetings,
Your Debian queue daemon
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 9
- Font dialog objectHello all..
Just wondering if there is a Font dialog object in Java. Looking at the
API's I did not see one.
Thanks in Advance...
IchBin
__________________________________________________________________________
'The meeting of two personalities is like the contact of two chemical
substances: if there is any reaction, both are transformed.'
- Carl Gustav Jung, (1875-1961), psychiatrist and psychologist
- 10
- java front end that creates database appsDoes there exist a java front end like this database admin tool:
http://qform.sourceforge.net/
but that also allows you to create database applications (similar to
Rekall if you are familiar with that, uses python)
ie. allows you to create your own forms for data input input etc,
provides reporting, scripting etc
Thanks
Wayne
- 10
- Question about BigIntegers and byte[] inputI have a byte[] as an input
8B F2 99 7D 67 F1 7C 15 B2 99 2C 2E 33 DD C6 65
2D CD E7 2B
and I feed it into a BigInteger so that I can do simply compares and
easy formatting. However, when I call the toString(16) I get
74 0d 66 82 98 0e 83 ea 4d 66 d3 d1 cc 22 39 9a d2 32 18 d5
I am sure, in it's own way, it is "right" but I need to understand why
this is occurring. Since these values represent hashes I will be for
sure asked by they are the same as what was recorded for them.
Christian
http://christian.bongiorno.org
- 13
- servlet communicationi`m using servlet technology in a very unusual way and i`m now
searching for a better solution:
there is a server, a embedded device and a user, which logs onto the
server, for access to the embedded device. the server now calls the
embedded device via gsm, to tell the embedded device to connect to the
internet and callback. after that, the data from the embedded device is
transfered to the server and displayed as a html-file. this is now done
via polling the application context, where all online-devices are
stored.
problem now is: i want to figure out a better way, how to get the
server or rather the html file, which is refreshed every 15 seconds, to
see if the device is online now, to know.
is there some way to exchange the data between this servlets?
- 14
- Multiple web applications, single virtual hostHello everyone,
I am attempting to create access logs on a per web application basis,
using a single virtual host in my server.xml file. Here is what I
have so far:
<Host name="www.mysite.com" autoDeploy="false"
deployOnStartup="false"
deployXML="false">
<alias>www.mysite.com</alias>
<Valve
className="org.apache.catalina.valves.AccessLogValve"
prefix="mysite_access" suffix=".log"
pattern="common"
directory="${jboss.server.home.dir}/log"/>
<Context path="" docBase="html" debug="0" reloadable="true"/>
<DefaultContext cookies="true" crossContext="true"
override="true"/>
<Context path="/Web1" docBase="C:\jboss-4.0.1RC2\server\default
\deploy" debug="0" reloadable="true">
<Valve
className="org.apache.catalina.valves.AccessLogValve"
directory="${jboss.server.home.dir}/log"
prefix="my_web1" suffix=".log" resolveHosts="false" pattern="combined"/
>
</Context>
<Context path="/images" appBase="" docBase="C:
\jboss-4.0.1RC2\server\default\images" debug="99">
</Context>
<Context path="/Web2" docBase="C:\jboss-4.0.1RC2\server\default
\deploy" debug="0" reloadable="true">
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="${jboss.server.home.dir}/log"
prefix="my_web2" suffix=".log" resolveHosts="false" pattern="combined"/
>
</Context>
</Host>
Everything is working as it should, except that when I hit www.mysite.com/Web1
or www.mysite.com/Web2 the only log that gets updated is
mysite_access.
Can someone please explain to me how to go about writing to the
my_web1.log and my_web2.log files for those applications?
Thanks,
Monica
- 14
- Attempting to connect to Oracle error...I was attempting to connect to an Oracle instance using the
classes12.zip Oracle thin driver using SQuirrel 1.1final1
[http://squirrelsql.org]. I kept receiving the following Java
Exception:
java.sql.SQLException: Protocol violation
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:639)
at oracle.jdbc.ttc7.O3log.receive2nd(O3log.java:529)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:217)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:156)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:231)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:208)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:99)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.execute(OpenConnectionCommand.java:112)
at net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.run(ConnectToAliasCommand.java:345)
at net.sourceforge.squirrel_sql.fw.util.TaskExecuter.run(TaskExecuter.java:65)
at java.lang.Thread.run(Thread.java:536)
SQuirreL was successfully connecting to other Oracle instances, just
not this particular one. I work for a large organization with
multiple Oracle servers. Additionally, the company has just merged
with another company. And it is the other company's server that I am
unable to successfully connect to.
After going through a number of other tangents (network issues, jdbc
configuration details, etc.), I decided to download the classes12.zip
file from Oracle again just in case there was some difference from the
one I already had.
Once the download completed, I checked the file dates within
classes12.zip and their dates were all 2001/Mar/20. Then I went to
the "old" classes12.zip I was currently using in my project and the
file dates within were 1999/Jun/14. Surprise!!!
I did a quick reconfigure of SQuirreL to use the "new" classes12.zip
and was able to connect to the "problem" DB. Apparently there was
some sort of update since I had last dl'ed classes12.zip from Oracle.
Uh...same bloody file name, "classes12.zip", different versions. WTF?
I am confused why Oracle would choose to name the zip the same name
and not increment it when they change it. Grrr! It sure makes it
difficult to talk about "versions" with their naming convention.
And why doesn't Oracle use the industry standard .jar format and
naming convention? Their being "rogue" makes this even more confusing
and frustrating.
Hope you find my travails useful.
Jim
|
| Author |
Message |
EdwardH

|
Posted: 2006-6-27 4:38:00 |
Top |
java-programmer, NIO! Nein!
I recently had the misfortune of trying out a InputStream.available()
command, only to find out it doesn't work on sockets.
I've found that the solution to my problem is the Nio SocketChannel
class, and now I have only one question:
What was Sun smoking when they came up with SocketChannel and where can
I get some?
SocketChannel* and the SSLEngine is probably the most complicated way of
doing socket work and I can only wonder whose crazy idea it was.
Why couldn't they just make .available() work as advertised?
*sigh*
Just wanted to publically complain about unncessary complication.
|
| |
|
| |
 |
Mark Thornton

|
Posted: 2006-6-27 5:04:00 |
Top |
java-programmer >> NIO! Nein!
EdwardH wrote:
> I recently had the misfortune of trying out a InputStream.available()
> command, only to find out it doesn't work on sockets.
>
> I've found that the solution to my problem is the Nio SocketChannel
> class, and now I have only one question:
>
> What was Sun smoking when they came up with SocketChannel and where can
> I get some?
>
> SocketChannel* and the SSLEngine is probably the most complicated way of
> doing socket work and I can only wonder whose crazy idea it was.
>
> Why couldn't they just make .available() work as advertised?
>
> *sigh*
>
> Just wanted to publically complain about unncessary complication.
What were you expecting available() to do? Many people read more into
its specification than is actually guaranteed.
Mark Thornton
|
| |
|
| |
 |
EdwardH

|
Posted: 2006-6-27 5:13:00 |
Top |
java-programmer >> NIO! Nein!
> What were you expecting available() to do? Many people read more into
> its specification than is actually guaranteed.
Tell me if there are any bytes waiting in the socket buffer.
It always returns falls.
So does ready().
|
| |
|
| |
 |
EJP

|
Posted: 2006-6-27 13:29:00 |
Top |
java-programmer >> NIO! Nein!
EdwardH wrote:
>>What were you expecting available() to do?
>
> Tell me if there are any bytes waiting in the socket buffer.
No, it tells you *how many* if any, as an integer.
> It always returns falls.
You mean zero? Actually Socket.getInputStream().available() works as
advertised, and so does Reader.ready() if you wrap a Reader around a
socket input stream.
I think you must mean that available() always returns *zero* for
*SSLSockets*, which is basically because it can't be implemented
rationally without encountering the very block it is intended to avoid
(because you might only have read half the next SSL record so you'd have
to read the rest of it to find out how long it was, so you'd block--and
decrypt, which adds even more to the overhead).
It would help if this was documented. However as there are practically
no valid uses for available, or at least none that I've ever
encountered, it's not such a great loss really.
|
| |
|
| |
 |
Chris Uppal

|
Posted: 2006-6-27 18:21:00 |
Top |
java-programmer >> NIO! Nein!
EdwardH wrote:
> I recently had the misfortune of trying out a InputStream.available()
> command, only to find out it doesn't work on sockets.
Never use available().
It doesn't do what most programmers think. If there are /any/ valid (safe and
correct) uses of it, I have yet to hear of them.
Never use available().
-- chris
|
| |
|
| |
 |
Thomas Hawtin

|
Posted: 2006-6-27 21:46:00 |
Top |
java-programmer >> NIO! Nein!
Chris Uppal wrote:
> Never use available().
>
> It doesn't do what most programmers think. If there are /any/ valid (safe and
> correct) uses of it, I have yet to hear of them.
>
> Never use available().
It's used by java.io.BufferedinputStream.read to see if fill any more of
its buffer without blocking.
For a brief time mustang had a peabody fix that tried harder to fill the
buffer. Unfortunately, for some streams available will often return 1.
If you try to read exactly the amount returned by available, that can
result in a vastly increased number of read (and available) calls,
killing performance.
Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
|
| |
|
| |
 |
Chris Uppal

|
Posted: 2006-6-28 17:33:00 |
Top |
java-programmer >> NIO! Nein!
Thomas Hawtin wrote:
[me:]
> > It doesn't do what most programmers think. If there are /any/ valid
> > (safe and correct) uses of it, I have yet to hear of them.
>
> It's used by java.io.BufferedinputStream.read to see if fill any more of
> its buffer without blocking.
So it is. Part of the contract too (which I hadn't noticed either). Seems
pretty daft...
-- chris
|
| |
|
| |
 |
Oliver Wong

|
Posted: 2006-6-28 21:30:00 |
Top |
java-programmer >> NIO! Nein!
"EdwardH" <edwardh@N:O:S:P:A:M:edward.dyndns.org> wrote in message
news:X5Yng.6417$email***@***.com...
>> What were you expecting available() to do? Many people read more into
>> its specification than is actually guaranteed.
>
> Tell me if there are any bytes waiting in the socket buffer.
>
> It always returns falls.
>
> So does ready().
The available() method returns an int, not a boolean:
http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html#available()
It returns the number of bytes that can be read without blocking the
next call. When it doesn't know, it is conversative (reporting less than the
real number of bytes). Thus, if it always returns 0, it is fulfilling its
adervtised contract.
Similarly for ready().
- Oliver
|
| |
|
| |
 |
Mark Thornton

|
Posted: 2006-6-29 5:49:00 |
Top |
java-programmer >> NIO! Nein!
EdwardH wrote:
>>What were you expecting available() to do? Many people read more into
>>its specification than is actually guaranteed.
>
>
> Tell me if there are any bytes waiting in the socket buffer.
>
> It always returns falls.
>
> So does ready().
All it guarantees is that if it returns a number greater than zero, then
you can read that many bytes without blocking. It is legitimate for
available to always return zero. That is it is a lower bound on the
number of bytes which can be read without blocking.
Mark Thornton
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- in need of swing performance adviceHi All,
I've hit a point in my app when I first call .validate() when loading a
new panel (it is fairly complex), it takes up to 5 seconds to load..
There must be something I can do to get over this and was wondering if
anyone had any ideas, if you are interested then my App flows like this..
A quite simple frame is initially created and displayed to user, this
contains a button with 4 buttons, a BIG panel and a menu bar and thats
it for now. the button bar is on left, menu at top and the Panel taking
everything else up..
When the user clicks a button, an appropriate panel is then called and
'loaded into' the big empty space where the panel is. All this is in a
function called Show() which is as follows...
private void show(Component component) {
java.awt.GridBagConstraints gridBagConstraints;
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
Main.removeAll();
Main.add(component,gridBagConstraints);
this.validate();
}
when a button is clicked, depending on the button I call the show
command like this...
show(new divelog.forms.ProfilePanel());
The panel that gets loaded that I have a problem with containt 3 panels
in a tabpanel. each one of those has a table, and maybe 10 textfields
per panel.
So not really all that much complexity I dont think, the instantiation
of the panel doesnt take long, so setting up the listeners I have seems
ok its just the moment the .validate() line is executed there is the 5/6
second delay.
Anyone any ideas ? I was thinking Ok I'll create the instances of the
panels in a seperate thread, but as I said the creation doesnt really
take anytime at all.
Thanks in advance.
--------------------
Rgds,
Dave.
- 2
- Oracle consultants available immediately with KraftwareContact : Mandar
Direct : 402 408 6601/402 408 3687
Email : email***@***.com
Hi,
We have the following Oracle consultants available immediately with
us:
1) Oracle HRMS techno-functional consultant
2) Oracle Apps financials consultant
3) Oracle PL/SQL developer
4) Oracle HRMS functional consultant
Please feel free to contact us for additional information.
Thanks & Regards,
Mandar
Direct: 402 408 6601/402 408 3687
Email: email***@***.com
- 3
- JTables and dynamically adding dataHey,
I have a JTable that I want to add a new column to every time someone
clicks a button. I have been reading about extending the
AbstractTableModel, but I don't how this allows you to add a new
column. The examples online show what happens when a user edits a
table, but I don't want that. I want it add when the user presses a
button outside of the table. Some advice would be appreciated.
Thanks
- 4
- [Swing] JScrollPane double MouseMotionListenerhi,
I am targetting JRE 1.5.
I have an image displayed within a jscrollPane (with scrollbars).
(in this way : new JScrollPane(new JLabel(new ImageIcon(image))))
I have a MouseMotionListener added to the JScrollPane, so when the
mouse goes over the visible part of the image, I can get the relative
coordinates of the mouse
My question is how to I get at the same time, the coordinate of the
mouse relative to the jscrollpane (the coordinates within the visible
part of the image) and the absolute coordinates (the coordinates of
the mouse relative to the whole image itself).
I tried adding also MouseMotionListener to the JLabel and that gives
me the the coordinates of the mouse relative to the whole image
itself, but then the event is lost for the jscrollpane's listener.
How can I achieve that simply ?
- 5
- collaborative QA testingDoes free or cheap code to do this already exist? What is this
generic sort of product called?
I want to set up a collaborative QA checklist, so that many people can
be testing at once and reporting what they have tested. Everyone sees
the incoming results like on election night, so they can see what
still needs to be done. It also allows for crucial stuff to be tested
by more than one person, and to record their conflicting results.
It might have columns for different platforms, and some sort of HTML
script to describe the sections and tests.
The problem is getting emergency coverage testing done at the last
possible minute to deal with any "insignificant" last minute changes.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
- 6
- Latest models of Gibson guitarsReviews of latest models of best guitars, fender, gibson, yamaha, and
many more, with pictures and prices.
http://pro-guitars.blogspot.com/
And if you want to win a free guitar go here
http://freeguitars.blogspot.com/
- 7
- Repost:STILL Need help w. HTMLUtils class.
Steve R. Burrus wrote:
> Hi all, this is steve Burrus, and I will admit that it's been a while
> since I last checked in with this group! I was wondering whatever
> happened to the "always-perennial" roedy Green, and after scrolling
> down the list of postings in this group, I found his last post was on
> 8.1.2004 and it's now 8/09/04.
> Well anyway, I needed some help with "getting it right" with the
> HTMLUtils class which is used in quite a few of the various examples
> in a particular servlet book of mine. I always seem to get a compiler
> error whenever I try to compile a servlet with this class in it! Can
> anyone help me please with this problem as I am in anguish over it, I
> must admit. Incidentally, I put the folder with this class in it into
> my classpath env. variable, but that didn't seem to help any.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
<br>
<br>
Steve R. Burrus wrote:<br>
<blockquote type="cite" cite="email***@***.com">
<meta http-equiv="Content-Type" content="text/html;">
<title></title>
<big><b><font face="Times New Roman, Times, serif">Hi all, this is steve
Burrus, and I will admit that it's been a while since I last checked in with
this group! I was wondering whatever happened to the "always-perennial" roedy
Green, and after scrolling down the list of postings in this group, I found
his last post was on 8.1.2004 and it's now 8/09/04.<br>
Well anyway, I needed some help with "getting it right" with the HTMLUtils
class which is used in quite a few of the various examples in a particular
servlet book of mine. I always seem to get a compiler error whenever I try
to compile a servlet with this class in it! Can anyone help me please with
this problem as I am in anguish over it, I must admit. Incidentally, I put
the folder with this class in it into my classpath env. variable, but that
didn't seem to help any. <br>
</font></b></big> </blockquote>
<br>
</body>
</html>
- 8
- Possible to split a PrinterJob ??Hi all,
I am using java Printerjob with Book to create some page to print.
The problem I have is that the generation of all the page a pretty
long.
I usually gets 100 pages and each page take up to 2 seconds.
I would like to know if there is a way to start the printing process
as soon as page are ready and not wait 5 minutes to create the batch
and after that another 3-5 minutes with the printer ?
Can we append page to the book once the print is started ?
thanks,
- 9
- importing Java-code into Rational Rose RealTimeIs there anyone who has managed to get existing java-code imported into
Rational Rose in order to get UML-diagrams?
The documentation shipped with Rational Rose is very spartan on that topic
and I've been trying for days now.
Thank you so much
- 10
- jvm class path unicode native methodsOkay.. I'm having the following problem.. I've tried pretty much every
solution I can think of but always hit some brick wall.
I need to:
load classes from a jar in a unicode directory and register native
methods for those classes.
Before (the unicode) I was simply doing a -Djava.class.path=myjar.jar
And then registering the native methods..
But.. I can't find a way to send a unicode code string to through the
-Djava.class.path..
So I've tried:
1. sending the string as utf8.. nope.
2. setting environment variable classpath with
SetEnvironmentVariableW.. nope.
3. creating my own url class loader with the jar..
Loads fine.. BUT NATIVE METHODS DO NOT REGISTER CORRECTLY (even
though the jnienv says they do.. they don't.. apparently I can only
register native methods from classes loaded from the jnienv_ sucky..)
4. creating my own url class loader that loads the byte code directly
from the jar, then calls defineClass from the root class loader.
NOPE.. because classes reference each other.. therefore the entire
jar must be available when ever I reference one class.
5. found out the class Launcher and its methods getClassLoader,
appendblahblahfor instrumentation..
NOPE.. although.. I've sort of giving up now.. this is going too far.
Any help?
Surely there are some japanese programmers that have dealt with this
before.
-tim
- 11
- Java Native Interface: "Translate" java call to JNI, how to pass parameters, how to show exceptionHallo,
I am at least one step further, now I need to pass the properties to
the call and are now sure how:
Remember: The call I want to implement in Delphi is
java -Xmx256m -cp
"lib\fop\fop.jar;lib\fop\avalon-framework-4.1.3.jar;lib\fop\JimiProClasses.zip"
org.apache.fop.apps.Fop -fo "Data.xml" -c "lib\fop\Config.xml" -pdf
"Data.pdf"
So the parameters that have to be passed are:
-fo "Data.xml"
-c "lib\fop\Config.xml"
-pdf "Data.pdf"
If I do
JNIEnv.CallStaticVoidMethod(Cls, Mid, ['-fo "Data.xml" -c
"Config.xml"-pdf "Cover.pdf"']);
(all parameters in one string) or
JNIEnv.CallStaticVoidMethod(Cls, Mid, ['-fo "Data.xml"', '-c
"Config.xml"', '-pdf "Cover.pdf"']);
(each parameter in a separate string)
...then JNIEnv.ExceptionOccurred is not NULL after the call, thus some
exception occured.
The parameter Args in the call CallStaticVoidMethod() is an array of
const. In CallStaticVoidMethod() the array elements are converted to
JValues with ArgsToJValues().
The exemplary C++ code in the doc PDF works with an ObjectArray created
with NewObjectArray(). I tried that, but CallStaticVoidMethod() won't
accept an ObjectArray, nor would the similar procedures
CallStaticVoidMethodA() or CallStaticVoidMethodV().
By the way: My Delphi app runs in a window, its not a console
application. Can I get the description of the exception with any other
function, or how would I have to use ExceptionDescribe() in this
context?
Regards,
Christian Kirchhoff
- 12
- Problem with TableDear all,
I have a TextField and a TextFieldHandler implement ActionListener and
a Table.
How can I do the following function?
When the user type 111 in the TextField and press enter, item 111
information is retrieved from database and will be displayed in the
table.
When the user type 222 in the TextField and press enter, item 222
information is retrieved from database and will be displayed in the
table.
( I know how to detect the value entered in the TextField, but I donno
how to display the corresponding information with a Table)
Thanks for reply.
Victoria
- 13
- EJB Remote Calls - Serialization Restriction(s)Hi,
I have a simple HelloWorldApplication which uses SSbs.
I pass a Customer Object which has two attribute String name and
Address address;
I made Address not-serializable
so when i make calls to the SessionBean i get a remote Exception which
contains the not-serializable exception in WebPShere (as expected)
To my surprise this application ran without any problem in JRun4.0
Why would that be the case and what would the result in other APp
Servers like WebLogic be?
AFAIK, objects (parameters and Return types) must be serializable for
all Remote EJB Calls.
Note this applicaiton does not use Local Interfaces..
TIA
Manglu
- 14
- W32.Swen.A@mm goes ballistic!"Tim Tyler" <email***@***.com> wrote
> It fills the mailboxes of users with huge numbers of 140K attachments -
> making email practically unusable.
Well, no, it just takes perseverance. Being careful not to junk the
five real messages in 1995 others is a bit tedious, I'll grant from
experience.
> Non-Windows users - and the rest of the internet - are targetted
> as a result of Microsoft's security problem - as mindless zombie
> Windows boxes swarm to spread the virus.
Indeed; in 30 hours so far, I've removed roughly 3500 emails either
containing the virus or saying they were forwarded with the virus
removed. This to my Unix ISP account, where mailx() is my friend and
companion for weeding through the end results of Microsoft's sloppy
coding practices.
Too bad California's refusal to allow the M$ denial of "fitness for
merchantability" cannot be reflected world-wide; a class action lawsuit
for damages would redistribute all of M$'s wealth and capital equipment
to the Internet as a whole.
Meanwhile, 200,000,000+ flawed email clients are trying to find my email
box with their virus copies.
Sigh; it is going to be a long next few days.
xanthian.
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
- 15
- Applet JBuilder(Borland) JDeveloper(Oracle) IE 6.0Hi All!
JBuilder v7 vm 1.3.1-b24
JSeveloper v 9.0.5 vm 1.4.2_03-b02
Applet(for JBulider(Borland) a2, for JDeveloper(Oracle) a1):
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class a2 extends Applet {
private boolean isStandalone = false;
//Get a parameter value
public String getParameter(String key, String def) {
return isStandalone ? System.getProperty(key, def) :
(getParameter(key) != null ? getParameter(key) : def);
}
//Construct the applet
public a2() {
}
//Initialize the applet
public void init() {
try {
jbInit();
}
catch(Exception e) {
e.printStackTrace();
}
}
//Component initialization
private void jbInit() throws Exception {
}
//Get Applet information
public String getAppletInfo() {
return "Applet Information";
}
//Get parameter info
public String[][] getParameterInfo() {
return null;
}
}
Compile in JBuilder & Jdeveloper
Web server - Apache from Oracle Application server on OS Redhat RHES.
index.html:
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251"/>
<TITLE>Test</TITLE>
</HEAD>
<BODY>
<H2>Test</H2>
<UL>
<LI><a href="joracle.html">Applet JDeveloper Oracle</a></LI>
<LI><a href="jborland.html">Apllet JBuilder Borland</a></LI>
</UL>
</BODY>
</HTML>
joracle.html:
<HTML>
<HEAD>
<TITLE>
Test
</TITLE>
</HEAD>
<BODY>
<H2>
This is sample HTML text.
</H2>
<BR>
<APPLET CODEBASE="." CODE="a1" HEIGHT="600" WIDTH="600" ALIGN="bottom">^M
<PARAM NAME="" VALUE="">This browser does not appear to support Applets.</APPLET>
</BODY>
</HTML>
jborland.html:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>
HTML Test Page
</title>
</head>
<body>
Applet2 will appear below in a Java enabled browser.<br>
<applet>
codebase = "."
code = "a2"
name = "TestApplet"
width = "400"
height = "300"
hspace = "0"
vspace = "0"
align = "middle"
>
</applet>
</body>
</html>
Launch IE6.0 with java console.
Borland - OK!
Oracle
Error loading class: a1
java.lang.NoClassDefFoundError
java.lang.ClassNotFoundException: a1
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/applet/AppletPanel.securedClassLoad
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
WHY???????
Help me please!!!!
Best regards.
|
|
|