I'm having trouble understanding why java secure coding is important. For example, why is it important to declare variables private? I mean I get that it will make it impossible to access those variables from outside the class, but I could simply decompile the class to get the value.
Similarly, defining a class as final will make it impo...
I am writing some JSP 2.x tag files. I have searched for a few hours now, but I was not able to find doctype/schema definitions/dtds for jsp based tag files.
Does anybody knows if there are dtd/schema files to ease the pain of writing those tag files?
It's pretty painful to not have auto completion and so on in eclipse. I have to check ...
We have a postgres DB with postgres enums. We are starting to build JPA into our application. We also have Java enums which mirror the postgres enums. Now the big question is how to get JPA to understand Java enums on one side and postgres enums on the other? The Java side should be fairly easy but I'm not sure how to do the postgres sid...
The twitter API site lists 3 java twitter libaries.
Twitter4j
java-twitter
jtwitter
Do you know others? What are your experiences in support, ease of use, stability, community, etc.
...
Currently I have a String object that contains XML elements:
String carsInGarage = garage.getCars();
I now want to pass this String as an input/stream source (or some kind of source), but am unsure which one to choose and how to implement it.
Most of the solutions I have looked at import the package: javax.xml.transform and accept a ...
Is it possible to make a method that will take anything, including objects, Integers etc? I have a method checking the value if it is null and I was thinking perhaps it could be done with generics instead of overloading. Unfortunately, trying
nullChecking(Class<? extends Object> value){
...
}
won't allow Integers as they extend Number...
Hello there.
I have the following problem:
I've deployed in Tomcat a JNLP and an executable JAR files. JNLP file should automatically download the JAR file and execute it. The JAR file is signed and verified.
This is done (the downloading part).
But when to execute the JAR main class (specified in the JNLP file), a problem occurs:
A part...
What is the process I should use to accomplish the goal of building a version of FreeBSD that is capable of running a Java VM but not capable of any other functionality including, but not limited to:
Running any process other than the Java VM
Disabling any/all shell access
When the Java VM exits, the OS shuts down
I need to support J...
Currently, the XACML specification defines a protocol for request / response but leaves it up to interpretation as to how it can be integrated into an enterprise application. I believe that the value of XACML won't be realized unless there is the creation of a new open source project that attempts to develop/standardize around a set of c...
I have 3 class with relation:
Member 1-n Tracker
Link 1-n Tracker
with owned one-to-many bidirectional relationship
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Member {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent(ma...
Setting aside the heap's capacity, are there ways to go beyond Integer.MAX_VALUE constraints in Java?
Examples are:
Collections limit themselves to Integer.MAX_VALUE.
StringBuilder / StringBuffer limit themselves to Integer.MAX_VALUE.
...
Is there a way to use the xpointer() scheme with JAXP? The Xcerces FAQ states that only element() is supported (http://xerces.apache.org/xerces2-j/faq-xinclude.html). But i need to resolve those XIncludes because i have to deal with "legacy" documents.
...
I am thinking of executing multiple instances of same java binary (a socket application) with different configuration files (As a command line parameter). Does the JVM correctly handles this situation? In other words If I haven't any common resources (Files that can be locked etc.) will this approach make any problems? If so what are thi...
How the methods invocation works in Python?
I mean, how the python virtual machine interpret it.
It's true that the python method resolution could be slower in Python that in Java.
What is late binding?
What are the differences on the reflection mechanism in these two languages?
Where to find good resources explaining these aspects?
...
Hi,
I'd like to start using iReport (netbeans edition) and replace the good old classic iReport 3.0.x. Seems like the classic iReport won't be improved anymore and abandoned at some point.
The point is that I need to start iReport from another java application. With iReport 3.0 it was pretty easy and straightforward: just invoke it.bu...
Hi, I am using java-jasper report and ireport to build the report. I want to make my report sortable by column. Can any one help me with this..?? m waiting for reply asap
...
I have a requirement to collect statistics of a JVM in regular time intervals using. Later, i need to log the JVM available memory/free memory, used memory, total memory.
Following are the two options i have thought of.
ManagementFactory.getMemoryPoolMXBeans() and iterating through each MemoryPoolMXBean and finally collecting the stat...
The following bit of code sets the Locale from lang param on querystring.
<c:if test="${param['lang'] != null}">
<fmt:setLocale value="${param['lang']}" scope="session"/>
</c:if>
How do I now read that variable?
I know its a bit noobish.
I need a bit of conditional logic to display one language link if the local hasn't been set ...
I used to be a Java nerd back in college, but ever since then I haven't touched it. My work for the last 3-4 years has mostly been in Python and C++, and I have forgotten a lot of in's and out's of Java.
So, what is the best (and fastest) way to get back in the groove with a language? Any suggestions on small projects that make you use ...
I am trying to figure out what some legacy code is doing. What exactly is this line doing, and why would I need it this way?
String lineSeparator = (String) java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("line.separator"));
I found it in the logger implementation of the web/ejb applicatio...