Richard Anderson

Ranch Hand
+ Follow
since May 20, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Richard Anderson

You can't do much once you've got an OutOfMemoryException. The JVM is...out of memory! I would try and think of ways to prevent this in the first place. Have you played around with the min and max heap size? Run your program in a profiler like JProbe and find out what's taking up the most memory.

Hope that helps!

-Rich
16 years ago
My application is structured like so:

myapp
---- css
---- META-INF
---- WEB-INF
--------classes
--------jsp
--------lib - contains jars

My problem is that whenever I deploy the app through the Weblogic administration console and then access my application I get CNF errors for the classes in the JAR files in lib. If I just drop the war into the appropriate location and restart the server, everything is fine. Is there something I'm doing wrong? I'm using WL 8.1 (unknown SP) with Java 1.4.2_05. I am able able to access JSPs in both instances that do not make reference to classes in the JARs, but once I hit a JSP that does, I'm toast - in the admin console deployed app, that is.

-Rich
17 years ago
Hello all,

I've been fighting and Googling trying to figure out a little issue I've got, but to no avail. I create a zip file with a 'deploy' target in my Ant script. The problem I'm running into is that I want to have two empty diretories created in the zip file by the script. Does anyone have any ideas?

Thanks,
Rich
17 years ago
Interfaces, no. Abstract classes, yes, but why would you ever want to?
17 years ago
Just curious, but why are you using such a dated version of Java EE. The most up-to-date SDK is Java EE 5 available at:

http://java.sun.com/javaee/downloads/index.jsp
17 years ago
Typically the classes are found in the lib directory within JAR files. I don't know what IDE you are using, but from the command line you would need to specify the individual jars in the CLASSPATH system variable (not the PATH variable) and the compile the class with the -classpath flag.

Example, on Windows:

javac -classpath "%CLASSPATH%" MyClass.java

Please note that you would need to specify all of the jars you need in the CLASSPATH variable prior to compilation. Multiple jars can be specified in the variable my separating them with a semicolon (Windows platform).

Hope that helps,
Rich
17 years ago
Ok, aside from pointing to a link to Google that attempts to defend your position, which I may note, I can do with almost any search term, EXPLAIN to me why YOU think it's an antipattern.
18 years ago

Originally posted by Tony Morris:
Aside from the less obvious fact that a singleton is an implicit requirement defect, it might yield some insight by reflecting on the statement "You can define multiple singletons" with emphasis on the term "multiple singletons". Spot the contradction in requirements?

Granted, the JLS does talk about "constant variables" or was it "variable constants"? so all bets are off with respect to making sense



Are you saying that by using Singletons, you're using an antipattern?
18 years ago
I have the 64 bit version installed, but I believe by default it runs in 32 bit mode. I think you have to pass an argument into the JVM to make it run in 64 bit mode.

The argument is -d64. I discovered this after perusing several Google posts. Thanks for making this clear, Sun!
[ October 26, 2005: Message edited by: Richard Anderson ]
18 years ago
Hi gang.

How can I determine what mode (32 or 64 bit) I'm running in? I've tried
java -version but see nothing except for the actual version #. And I heard a rumor a long long time ago that even though the JRE is installed on a 64 bit machine, you still have to force Java to run in 64 bit mode by passing in an argument, otherwise, it will run in 32 by default.

Correct or incorrect? I'm using 1.4.2.
18 years ago
There is also an Eclipse plugin that I use frequently for this:

Jar Class Finder
18 years ago
You must add %JAVA_HOME%\bin to your system %PATH% variable.
19 years ago
Are you passing the min and max heap size arguments to the JVM?

You can do that by....

java -Xms256M -Xmx1G MYCLASS

where -Xms256M allocates 256MB for the mininum heap size and -Xmx1G allocates 1G for the max heap size. I believe by default the JVM sets the max heap size at 256M. Can someone verify this?

Sorry....looks like the default is only 64M.
[ August 11, 2005: Message edited by: Richard Anderson ]
19 years ago

Originally posted by Jean-Sebastien Abella:
He,


I totally agree with Peter here. I never used them but isnt BitSet usefull for those situation???



Okay, normally I would agree with you guys, but I take issue with this because you're assuming that we all build apps on PCs with enough RAM. However, when developing apps on wireless devices, you have to think about memory usage, and saving a few bytes can make all the difference.
[ August 11, 2005: Message edited by: Richard Anderson ]
19 years ago