My problem is that I have to set a variable in a try statement otherwise I get a compile error.
Later on I need to use that variable but it is now out of scope, or so I believe. I initialise the variable outside the try statement and set it to null, I thought that it might then be accessible outside, but I still get a NullPointerExcepti...
Question:
I have a library contains a bunch of static *lib files, I wish to access them from JNA (a Java library that allows one to dynamically call `dll's from JAVA Code), so is there a way to magically change static lib to dll?
Code was compiled using Visual studio (hope that is relevant), and I also have appropriate header files.
...
Hello
i know i can write c++ back end and use xul(runner) as the front end
but can i use java as back end and still use xul as front end ( executing java code ) ?
...
Hi,
I am trying to achieve reading variables from a Java applet out of process from my C# program. Apart from reading memory addresses, is there any way I can obtain values of variables from a java applet? This java applet will be running inside a browser. If it is not possible to do this from C#, would it be possible to do it from a dif...
Hello,
public class Main3 {
public static void main(String[] args) {
Integer min = Integer.MIN_VALUE;
String minHex = Integer.toHexString(Integer.MIN_VALUE);
System.out.println(min + " " + minHex);
System.out.println(Integer.parseInt(minHex, 16));
}
}
Gives
-2147483648 80000000
Exception in thread "main"...
Hello
I wonder if someone could help me figure out how to parse a string having the following format:
;field1-field2-fieldN;field1-field2-fieldN;
Each record is delimited by ';' and each field within a record is delimited by '-'. The complication is that the individual fields may contain escaped delimiter characters like so "\;" or "...
I have an installer program that lets the user choose a directory in which to install. The JFileChooser implementation on MacOS uses a native dialog (or at least it looks native). That's great.
The only problem is there's no way to create a directory from this dialog ... you can only choose a pre-existing one, which is clunky. Is there...
Can anyone suggest me any library/jar files which I can use to export my table to excel/pdf/word.
Please tell me if there is any library by which I can create reports in jsp.
...
i want the code to export tables/ reports to excel and word uisng POI
i saw the examples that came with POI but cuoldnot understand.Can anyone provide me a small/easy code to do the same.
...
My Java program needs lots of memory to run, the 32-bit version of Java max out at 1.5 GB, my system has 4 GB of RAM, so I decided to run it under the 64-bit version of Java, and yet the JDIC won't work, which affects my program, so I wonder if anyone knows when the 64-bit JDIC will be available ?
...
Hi all,
What is the simplest way to call a program from with a piece of Java code? (The program I want to run is aiSee and it can be run from command line or from Windows GUI; and I am on Vista but the code will also be run on Linux systems).
...
Hi,
Lately I have been trying my hands on Eclipse IDE for java development. I am mostly a novice to java programming. I am trying a servlet project, using Tomcat5.5 as container. I am getting issues when I give import javax.servlet.* statement in my class files, as Eclipse complains that it cannot find that particular package. I am work...
I've been checking out Spring MVC tutorial and copied this small JSP code from there:
<%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head><title>Training, Inc.</title></head>
<body>
<h2><c:out value="${message}" /></h2>
</body>
</html>
There is a string set for ...
Hi there I'm facing a problem, anyone can help me??
The Problem is : I'm trying to open MS Word 2003 document in java, search for a specified String and replace it with a new String. I use APACHE POI for to do that. My Code is like the Following :
public void searchAndReplace(String inputFilename, String outputFilename,
HashMap<...
Let's suppose that have a stream of text (or Reader in Java) that I'd like to check for a particular string. The stream of text might be very large so as soon as the search string is found I'd like to return true and also try to avoid storing the entire input in memory.
Naively, I might try to do something like this (in Java):
public b...
Hello, I've got lots of JTree in my app, all using different instances (with different options) of the same custom TreeModel class. I'm trying to add some threading to speed things up, since the getChildren() member takes a while to run, I added a SwingWorker subclass to the TreeModel and in my getChildren() I create an instance of that...
A requirement of the product that we are building is that its URL endpoints are semantically meaningful to users in their native language. This means that we need UTF-8 encoded URLs to support every alphabet under the sun.
We would also not like to have to provide installation configuration documentation for every application server and...
I've played around with the netbeans visual editor for java and it seems very intuitive and simple to use but I can't help but think: is this detrimental to my learning? Should I be getting my hands dirty and doing everything manually? How do professionals in the field handle user interface design?
What would you guys recommend I do?...
I love eclipse and java. And i want to code my entire web application using eclipse .. right from designing html files to servlets.. I have zero experience in developing web apps .. So How to to setup eclipse for web apps and How do i get started ???
...
I am using a PacketListener to receive XMPP packets.
If I receive the following:
<presence from="[email protected]" to="[email protected]" type="subscribe"/>
is the XMPP server expecting me to respond immediately ?
Motivation: I want to cache all these subscription requests and allow the recipient to selectively ACCEPT/DENY (à la face...