2014 June
-
As it says in the title, I have a Java app that runs on Windows (using SWT). How can the java app detect if the machine has touch screen capability?
The purpose is to present different UI elements if touch screen is available.
-
I have two inputs:
- a date value
- an integer (+8 or -3 or such) that represents the offset from GMT
Using Java, how can I convert the given date value into the corresponding date/time in the local timezone? There doesn't seem to be any timezone offset function in the Date class.
Thanks!
2014 May
-
I have an existing AWT Java desktop application. Is there a library or something I can use to have it respond to multitouch gestures (in Windows 7/8)? I see there's frameworks like MT4J or JavaFX that have multitouch support, but it seems these are separate UI frameworks that I can't use with my existing app?
-
I have a working Java SWING-based desktop application, and I'm being asked if it can be run on the Microsoft Surface Pro or Pro 2. As I understand it, these are using stock Windows 8/8.1 and will be able to run any Windows app normally, is this correct?
Are there any caveats or special considerations when running my app on these devices?
Edit: If it matters, the JRE would be distributed together with the application, so installing Java isnt an issue.
2013 March
-
I want to write a servlet that wraps around a set of resources and needs to protect them with basic HTTP auth; the submitted username/pass will be checked against the backend database before serving the file.
Does anyone have any working examples of this? I tried the sample at http://www.coderanch.com/t/352345/Servlets/java/HTTP-basic-authentication-Web-Applications but it kept returning an
IllegalStateException
in thesendError
call.
2012 August
-
I'm being asked to assess whether we can safely upgrade the java version on one of our production-deployed webapps. The codebase is fairly large and we want to avoid having to regression test everything (no automated tests sadly), but we've already encountered at least one problem during some manual testing (XmlStringReader.getLocalName now throws an IllegalStateExeption when it just used to return null) and higher-ups are pretty nervous about the upgrade.
The current suggested approach is to do a source compare of the JDK sources for each version and assess those changes to see which ones might have impact, but it seems there's a lot of changes to go through (and as mentioned the codebase is kinda large). Is it safe and easier to just review the java version changes for each version? Or is there an easier way to conduct this assessment?
Edit: I forgot to mention the version upgrade being considered is a minor version upgrade, i.e. 1.6.10 to 1.6.33
2012 January
-
I'm trying to get a sense of what are the most commonly-used Java web frameworks, with a focus on large, enterprisey projects. I'm interested in which one is most favored by companies/enterprises (which may not be the same as the one most favored by developers or the open source community I guess). I'd also like to be able to cite specific projects used by each framework, preferably big-ticket or well-known ones.
Anyone have any idea about this stuff or can point me in the right direction?
Thanks!
2011 December
-
💬 Reply to :
How are you redirecting to the login page? At that point you should store the originally requested URL somewhere (can be in session, or request param that you pass around) such that you can redirect back there after he logs in again
-
💬 Reply to :
"rowtype" here is an Oracle PL/SQL-specific type, I don't think it would be supported by JDBC. A quick search of the oracle forums (google "jdbc rowtype site:oracle.com") suggests the same. You're probably better off returning a cursor, or just execute the SQL from JDBC directly.
-
💬 Reply to :
ClassB extends from ClassA which also extends from Object. Therefore ClassB extends Object indirectly, through classA
"Every class extends class Object" just means if you don't specify the parent class, it takes on Object as the parent class
2010 January
-
💬 Reply to :
Not sure how clojure is run, but don't you just add the jar file to the classpath?
i.e.
/usr/share/java:/home/user/myjarfile.jar
-
I know the oci driver can perform transparent failover of the database, but does the thin driver have the same capability?
-
💬 Reply to :
You can assign it a value that is specific to the object instance, which you can't do with a static class variable.
-
I'm looking into screen sharing functionality - i.e. allowing remote users to view your desktop in real time, possibly control it and write annotations (text/drawings) on the shared screen. Something similar to what webex allows in its conferencing software. Preferably a Java-based api, possibly to run from an applet.
Any recommendations on a library/api to use?
-
💬 Reply to :
I would just choose a far-future date as the value for the constant NEVER. Then to check for deletion/expiry, just compare against NEVER.
-
We've always used the BouncyCastle library, I'm being asked if there are other viable alternatives, either open source or not. Or is the BouncyCastle library already the best one to use?
2009 December
-
I have an applet that is crashing Firefox on Linux.
Can anyone tell me how I can enable the java core dump log file for this applet and where the file would be generated?
2009 November
-
💬 Reply to :
The contents of WEB-INF aren't publicly accessible resources, why are you putting the other jsps there? Are those other jsps accessible?
If you want to hide the index.jsp, create a servlet mapped to the root path and have it forward to index.jsp.
-
While testing our setup for user acceptance testing, we got some reports that java applets in our web application would occasionally fail to load. The envt where it was reported was WinXP/IE6, and there were no errors found in the java console.
Obviously we'd like to avoid it. What sort of things should we be checking for here? On our local servers, everything seems fine. There's some turnaround time when sending questions to the on-site guy, so I'd look to cover as many possible causes as possible.
Some more info: We have multiple applets, in the instance that they fail loading, all of them fail loading. The applet jar files vary in size from 2MB to 8MB. I'm told it seems more likely to happen if the applet isn't cached yet, i.e. if they've been able to load the applets once on a given machine, further runs on that machine go smoothly. I'm wondering if there's some sort of network transfer error when downloading the applets, but I don't know how to verify that.
Any advise is welcome!
-
We have an Applet that can possibly display Chinese text. We are specifying a font for it (Arial), it works fine under both Windows and Mac OSX.
But in Firefox on Linux the Chinese characters are rendered as squares. Is there a way to work around this? Note that we can't assume the existence of a particular font file on the client.