I am trying to rearchitect my build technique for creating Java jar files which depend on common 3rd party jar files. (GlazedLists, Apache Commons, etc.)
I had been chucking them all into {Java JRE dir}/lib/ext so they would automatically be seen by the JRE, but that led to problems like not remembering that I need to distribute certain...
My Java application runs another Java application, by running the process "java -jar j.jar". J.jar is known to use a LOT of memory depending on the dataset it is given, and often gets an OutOfMemoryError heap. So I want to use -Xmx on it, so that I can allocate as much memory as possible (or close to). I was thinking of getting the total...
I wrote a simple hello world program to test the JDK installation. I can compile from Vim using:
:!javac Desktop\HelloWorld.java
That works just fine but when I try to run the program using:
:!java Desktop\HelloWorld
it gives me this error:
C:\Windows\system32\cmd.exe /c java "Desktop\HelloWorld"
Exception in thread "main" java....
BasicTreeUI (in JDK 1.5) handles key events on JTree by navigating to an item on the tree that starts with that letter. What is the most straight forward way to turn that behavior off?
...
This is a school problem I am working on for an intro Java class. The assignment is to write a program that generates an 8 x 8 matrix of randomly generated binary numbers and have the program check which, if any, columns are all 0's and if the major and minor diagonals are also comprised of zeroes. A major diagonal is the diagonal formed...
I am re-writing the core NIO server networking code for my project, and I'm trying to figure out when I should "store" connection information for future use. For example, once a client connects in the usual manner, I store and associate the SocketChannel object for that connected client so that I can write data to that client at any tim...
Okay, thus may seen kind of odd, but I wanted to get some suggestions from everyone here. I am a beginning Java developer (after 2 years of ASP.NET web development) and I have recently began working on my first Java project - a calculator. I realize that their are tons of calculators out there, but I thought it would be a good beginner...
Here is the thing : my webapp has loads of popups and my boss wants 'em closed on session expiry, coz when session expires and an user presses refresh on a popup, he is being shown the logon page -> user logs on -> user is directed to the dashboard. Now, a dashboard screen in a popup is totally uncool. Here is where google got me:
Have...
First here:
<html xmlns="http://www.w3.org/1999/xhtml">
I get the warning: "Undefined attribute name (xmlns)." What's the best way to solve this in Eclipse?
I also get an error here "Missing quotes for attribute value (it refers to center)
<table align=center>
<% if(action!=null && "sendemail".equals(action)){
if(!"".e...
I'm currently using JSON (compressed via gzip) in my Java project, in which I need to store a large number of objects (hundreds of millions) on disk. I have one JSON object per line, and disallow linebreaks within the JSON object. This way I can stream the data off disk line-by-line without having to read the entire file at once.
It t...
type Status report
message /mydirectory/index.jsp
description The requested resource (/mydirectory/index.jsp) is not available.
What could be the issue?
Here is the log file:
Jul 28, 2009 6:16:25 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting proper...
I have to auto generate timestamp when I am creating a new record and auto generate modified timestamp when I update a record.
can anybody tell me how do I implement this. I am using openJPA.
thanks in advance.
...
I use JUnit 3.x TestRunner that intantiates all tests at once before running them.
Is there a Test Runner available that would create each test (or at least each test suite's tests) just before running them?
I can use JUnit 4.x runners but my tests are 3.x tests.
...
Hi All,
I have a requirement in my application. My tables wont be defined beforehand.For Example,if the user creates a form by name Student,and adds its attributes like name,roll no,subject,class etc.. then on runtime,there should be a table created by name student with columns name,roll no,subject,class and also its related class and ...
I'm looking for some simple tasks like listing all the running process of a user, or kill a particular process by pid etc. Basic unix process management from Java. Is there a library out there that is relatively mature and documented? I could run a external command from the JVM and then parse the standard output/error but that seems like...
I've been writing Java web (JSF, Struts, JSR168) apps for a number of years. With the recent departure of a colleague, it looks like I'm going to be building more client applications. I've used Eclipse since the beginning and I'm really comfortable with it. It feels as though SWT is waning (just an opinion based on literature I can fi...
Let us say that one Thread is executing inside a Synchronized Function in Java and another Thread wants to access the same method but it will have to wait till the first Thread completes.
How can the second Thread know which Thread is having the Lock on the Object.
I would want to print the details of the first Thread and possibly from w...
Why didn't Sun say "You're using my name!"?
UPDATE Thanks for the answers, and not downvoting! :)
I knew it was called LiveScript at one stage, but the Wikipedia article must of drifted out of my memory.
Do you think the licensing name has helped Java at all with their marketing?
...
I need to translate a Microsoft locale ID, such as 1033 (for US English), into either an ISO 639 language code or directly into a Java Locale instance. (Edit: or even simply into the "Language - Country/Region" in Microsoft's table.)
Is this possible, and what's the easiest way? Preferably using only JDK standard libraries, of course, b...
If I have a bunch of DAO's with a bunch of getXXX methods and I want all or some explicit list of the methods cached is there any way I can do this transparently with Spring?
What I don't want is:
To change any source code / add
anotations
Manually have to create a number of proxy beans for a number of DAO's and rewire them all.
Ide...