If you put a properties file on your classpath then the java.util.ResourceBundle class will pick it up.
e.g. For a web application I place a webapp_config.properties file in the web app WEB-INF/classes directory deployed on the app server. (The Servlet J2EE spec says that all files under...
Sounds like you are getting bogged down in the use of the Double object vs the double primitive.
If you are using the Double object then compareTo() is worth a look for your use.
See if this snippet helps shed light :
public class Scratcher
{
public Scratcher()
{
}
public void...
Thanks all,
Turns out its as I thought - had to do it the hard way.
Basically I implemented 3 classes
1. WebTxnLock : A class that models a lock on a named transaction, containing methods like lock(), unlock()
2. WebTxnLockList : A class that maintains a list of WebTxnLock's that are...
Thanks Pete - unfortantely javascript is a no go solution as site standards prohibit. Even if we did use it the fix would be then browser dependent - so if the browser had javascript disabled then such a fix wouldn't work.
RjB.
Hi all,
We have a java web app (running on Tomcat) that performs an user registration process. A pretty standard internet experience right? We have havning trouble with users double clicking on the 'I accept' button and getting errors because the second transaction fails as the user details...
Apart from not including 'import java.io.*;' in the first line of the Edu1 they look fine.
I can see how JBuilder might have troubles with the second one is it is awaiting input from STDIN. Have you tried excuting the classes from a command prompt instead of thru your IDE ?
RjB.
There is a host load of Java XML parsers and XSLT processors out there these days. The hard bit used to be not finding one - but picking one to use.
However Sun has kindly included an XML parser into the J2SE1.4.0. So from now on everybody will probably just be using this one to keep things...
Ok - you may have put the j2se binaries and libraries on your machine from a direct file copy. In this case the java.exe will work ok but if you have not gone thru the actual java installer then your registry settings (I see you are on a Window OS) will not have been updated for your machine...
Ok, I see it.
Its just a silly compile error. What you have done is tried to call getImage() as a static method of the Toolkit class - which its not.
>Toolkit toolkit = Toolkit.getDefaultToolkit();
error->Image image1 = Toolkit.getImage("/home/gui/square.gif");
What you need...
If the applets imbedded in a browser I'm pretty sure (like 99.99%) you won't be able to popup a Dialogue window on the PC - unless there is some really fancy trick I'm not aware of. Think about it - you are confined to the browser when running an applet right ?
What I would suggest instead is...
You just need to call setImage() on an instance of Frame or JFrame.
i.e don't call setImage() in the 'public static void main(String[] args)' method as its a static method and setImage is not.
The try putting the code above in the constructor of your JFrame or Frame class. RjB.
Have you tried using " "'s around the parameter values ?
i.e.
set JAAS_OPTIONS="-Djava.security.auth.policy=%J2EE_HOME%\lib\security\jaas.policy"
set SSL_OPTIONS="-Djavax.net.ssl.trustStore=%J2EE_HOME%\lib\security\cacerts.jks"
set...
Sorry : told you there would be typos :
ins = new InputStream (socket.getInputStream()); // use default encoding
should be
ins = new InputStreamReader (socket.getInputStream()); // use default encoding
RjB.
Sounds like you are having encoding issues.
In Java IO there are two fundamental IO types
[1] Input and Output Streams - these are raw byte data
[2] Readers and Writers - these are bridges between byte data and character data via an encoding
I'd recommend using a Reader to decode a byte stream...
JDBC2 connects to the database in two ways
[1] Thick client
[2] Thin client
The thick client plugs into the locally installed database connectivity software (eg ig it was an Oracle connection, we are speaking of the Oracle client software). As it is calling third party libraries (ie DLL's for...
... if you are after an IDE then may I also strongly suggest JDeveloper from Oracle - which you can download for free (http://technet.oracle.com/products/jdev/content.html) With the risk of starting a major holy war I reckon its the best IDE I've seen.
(Qualifier : IDE's are a bit like cars...
If you are after just a good editior for Java (i.e instead of an full blown IDE) then here's two I use
[1] UltraEdit32 - good but requires $$ to license(www.ultaedit.com) - but you can use unregistered version for a period.
[2] J (Freeware) A editior written in Java. Simple but effective. Full...
Ok - sounds like an assignment - so I won't give you the complete answers as that won't help you any in the long run. What you have to do is all straight foward stuff - so I'll just give you some hints to point you in the right direction w/ the right resources (probably not the exact answer you...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.