I'm trying to create a zip file from a directory in Java, then place that file on a remote server (a network share). I'm currently getting an error because the Java File object cannot reference a remote location and I'm not really sure where to go from there.
Is there a way to zip a directory in Java to a remote location without using ...
Does anyone know a reference for the .hprof (binary heap dumps) file format?
Does anyone know libraries that handle .hprof files? I know that hat does that and also VisualVM through a NetBeans plugin. But are there others?
...
I want to improve the cross platform behavior of a java application. However, its test suite currently assumes the existence of the /tmp directory.
What is the best equivalent location on the windows platform? N.B. I most definitely do not want to assume the user has admin rights but I do want it to work on at least XP, Vista & Windows7...
I have a new application written in java that needs to read encrypted values out of a db. The problem is that all the values in the db were encrypted by .NET code that uses the ANSI x923 padding scheme. I have done some research and it doesn't look like the Java TripleDes libraries have a way to specify this padding scheme. I was wond...
I'm trying to make a scroll panel that has relative size parameters. But the
ScrollPanel.setSize(String, String)
is impossible to work with if you have int values such as those returned by Window.getHeight, etc. Also when I do something like
ScrollPanel.setSize("100%", "150px");
it doesn't change the ...
Please help me
How to prevent an object from getting garbage collected
is there any approaches by finalize or phantom reference and is there any other approaches?
UPDATED:I was asked a ques in an interview he was referring something can be done in finalize()
...
Hey Guys,
I am having a problem deploying an ear with bundled wars, jars, and configuration files (.properties files) on JBoss 4.3-eap. Here is my ear structure:
+app.ear
+lib
*.jar libraries that the war's use
+classes
*.properties and other configuration files
+META-INF
application.xml
jbos-a...
I'm searching for a library similar in functionality to the Perl Lingua::EN::NameParse module.
Essentially, I'd like to parse strings like 'Mr. Bob R. Smith' into prefix, first name, last name, and name suffix components. Google hasn't been much help in finding something like this and I'd prefer not to roll my own if possible. Anyone k...
What is the equivalent of Java's default (package) access in C#? Is there one? Is there anyway to restrict access to a particular namespace?
The Problem:
I'm trying to restrict access to certain methods to just my NUnit tests - in JUnit I would do this by making the methods package access and having the test in the same package but un...
Hello,
I have a struts2 webapp running under tomcat6 app server. The mode is https. The entire site is currently being served on https. But what I would really like to do is setup https only for certain operations like purchase and login. Is there any configuration in tomcat that can help me do this easily?
Are there any code changes r...
I see a lot of references to this in Java software discussions specifically those talking about Hibernate. I cannot find any definition of what it is and why I care about it. Any one got a good definition for it?
...
Possible Duplicate:
Java: how to clone ArrayList but also clone its items?
I have a sample program like the following:
ArrayList orginalInvoice = new ArrayList();
//add some items into it here
ArrayList copiedInvoice = new ArrayList();
copiedInvoice.addAll(orginalInvoice);
I thought I can modify items inside the copiedInvoi...
Is there an easy way to invoke a GWT RPC service endpoint directly from Java code? I mean real Java code, not Java code compiled down into javascript.
I ask because we want to run performance benchmarks/stress tests against a GWT RPC interface. I would like to write the test harness in Java and run it in a JVM (as opposed to javascrip...
I need to just read the value of a single attribute inside an XML file using java. The XML would look something like this:
<behavior name="Fred" version="2.0" ....>
and I just need to read out the version. Can someone point in the direction of a resource that would show me how to do this?
...
How can I use the BeanUtils setProperty method with Maps.
For example, this method:
public void setAddress(String type, Address address);
Can be setted using:
BeanUtils.setProperty(beanObject, "address(home)", addressObject );
But if the object I want to set is a Map, is it possible? how?
...
Not too long ago, I installed a java web application on a Red Hat server running JBOSS.
After a recent reboot, I realized that the site did not start up automatically when the machine was booted.
Is there an easy way to ensure that this happens? There are shell scripts to start and stop the application, something like :
/opt/myApp/St...
I am looking for regular expression in java that matches the following pattern:
two alternating numeric or alpha values Example: 12121212 or adadadad
numeric or alpha sequences with at least 4 sequential digits Example: cdefgh or 123456
thanks
...
I have looked at a few JSON libraries for Java, but few of them seem to follow the same serialization pattern as core Java serialization patterns. I would like to use a native Java JSON serialization object, but in the absence of that what third party library matches Native serialization and preferably will serialize anything marked ser...
I am writing a Java program that wants to do 3 things, and I don't know how to do them or if it's even possible with Java.
1 - I want to ensure that the computer whether running mac OS or windows xp/vista, doesn't go to sleep whilst running my app.
2 - I want my app to be able to turn the volume to full on all of the above OS's before ...
I have a Cone I drew in Java 3D with the following code:
Cone cone = new Cone(2f, 3f);
Transform3D t3d = new Transform3D();
TransformGroup coneTransform = new TransformGroup(t3d);
coneTransform.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
t3d.setTranslation(new Vector3f(0f,0f,0f);
coneTransform.setTransform(t3d);
coneTransform...