Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to check if an array is initialized?

807601Dec 28 2007 — edited Dec 28 2007
Hi, this is my first post on this forums, and I have a question that I could not find the answer to using Google or the forum search feature.

My question is: How do I check to see if an array variable is initialized?

My goal here is to have something like:

// Somewhere in the program:
int[] foo;

// Somewhere else in the program:
if (foo is not initialized) {
// do stuff
}

Comments

534296
Hello,
I encountered the same problem. It seems ocfs2 doesnt recognize labels when not created on a partition.

Solution:

1. create a partition
2. format it with ocfs2 mkfs.ocfs2 /dev/sda1
3. tunefs.ocsf2 -L label /dev/sda1
4. mount it by that label

I'm still seeking a better solution
529633
I encountered this issue also i.e. not being able to mount an OCFS2 filesystem by label.

I was able to resolve this issue by updating the util-linux package on my Red Hat system. I had a fresh install of RHEL 4 release 4 and the version of util-linux that was present on my system was:

# rpm -qa | grep util-linux
util-linux-2.12a-16.EL4.6


So I grabbed the latest version of util-linux from Red Hat and updated the util-linux package. Now I am able to mount a OCFS2 filesystem by label.

So the version of util-linux on my system is now:

# rpm -qa | grep util-linux
util-linux-2.12a-16.EL4.20


Apparently, Oracle provided a patch for mounting OCFS2 by label which is included in this release of util-linux.

I hope this works for you.
548426
Hello!
I have the same problem with mount OCFS2 filesystem by label!
I have util-linux-2.12a-16.EL4.20 but nothing! :(
(Linux 2.6.9-42.ELlargesmp #1 SMP Wed Jul 12 23:46:39 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux)
Any idea?
Thank you!
KRC Eric
I have the same problem as well. I'll try the partition workaround tomorrow & let everyone know.
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 25 2008
Added on Dec 28 2007
5 comments
156 views