java »» Core »
Recent update: 2008-5-9

How many package in Java 1.1?

49 byte By ltmloana at 2008-2-20
Do you know, How many package in Java 1.1?

logging.properties

1081 byte By bashdrewa at 2008-2-15
hi,i used a message-driven bean for logging. logs are generated quite well. i am explicitly defining the FileHandler and Formatter in my MDB code. but i decided to use the default logging.properites file in the jre/lib directory and commented out my FileHandler and Formatter in my code. i ...

Defining MBeans as XML

182 byte By wsnyder6a at 2008-1-28
Hello,Not sure if this is out of scope of the JMX spec - but is it possible to define MBeans with XML and register them into the MBeanServer?Thanks!--Bill

BacNet using Java

373 byte By VisionSuresha at 2008-1-28
BacNet Protocol Support====================My application uses Real-Time devices. Hence I prefer to use BacNet protocol for monitoring via Remote.But I don't have any idea about Java's support about Bacnet.Let me know if we have any support in Java.You can very well send a mail to ...

Sun One Application Server 7 Performance monitoring

366 byte By yijmartinsona at 2008-1-26
I am trying to find out the exact performance monitoring capabilities of the Sun ONE Application Server 7. The link to documentation for version 7 is broken. I have foundand read through documentation for version 8. Is there much difference between the performance monitoring capabilities ...

Error in compilation satge of java files

272 byte By srinath944a at 2008-1-22
Hi allWhenever i m trying to compile java files i m getting this error .I have no idea how to go about fixing this issue. Can any one help me out with this.Error occurred during initialization of VMCould not reserve enough space for object heap

J2EE SDK/1.3.1 - HTTP Status 500 - Internal Server Error

3386 byte By gitika.sooda at 2008-1-21
J2EE SDK/1.3.1 - HTTP Status 500 - Internal Server Error--type Exception reportmessage Internal Server Errordescription The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.exception java.lang.NullPointerExceptionat ...

Getting a native thread Id from JMX?

507 byte By Ian_Fora at 2008-1-21
(by mistake I originally posted this to Java Programming forum, my apologies for cross-posting)I am trying to match the native and java threads in Hotspot VM - this is easy when I have the text of the VM thread dump, as for each thread the VM dumps both its Java id (tid=xxx) and native thread ...

How to get active sessions in tomcat 5.0?

524 byte By jeff_marsha at 2008-1-13
Hi,As I am working on monitoring related requirement, I need to get no. Of active sessions,sessions created, etc.I found interesting code in ManagerServlet, As it has some protected methods, I cant call it from its object, I need to create servlet for my work, So I even can't extend ...

jdb fails to connect to running java application over sockets

1820 byte By Th.Maucha at 2008-1-6
I'm trying to use jdb to connect to a running instance of a java program.If I use dt_shmem:> java -agentlib:jdwp=transport=dt_shmem,address=shmem,server=y,suspend=n JDBTest>jdb -attach shmemSet uncaught java.lang.ThrowableSet deferred uncaught java.lang.ThrowableInitializing jdb ...> ...

Timing and scheduling.

890 byte By MichaelCoucka at 2007-12-30
Hi,I need to schedule jobs, and don't want to use Quartz, I would rather use the standard JMX timing service. I don't seem to be able to find any good documentation with nice examples that I can adopt.I have some vanilla code that registers a Timer object with the MBean server, then you add ...

Java 5 update 6 bluescreen with firefox + during deinstallation of java

971 byte By _Mr.Mr_a at 2007-12-27
Hi,I have a resisting problem on xp sp2 which really makes me almost go mad. However, you Java experts are my last hope before I go.Since the update from Java 5 update 2 to update 6 I have bluescreens. First time it happened while surfing on a java-based website with firefox whereafter I closed ...

jconsole classpath

53 byte By jevans123a at 2007-12-27
How do I add jar files to jconsoles classpath?

using CompositeData

227 byte By vgena at 2007-12-23
Hello All,I am trying to expose data using Complex Data. I have encountered that JMX consoles do not allow to edit such properties. Has anybody encountered the same thing or I am missing something?Thank you

Configuring external applications with java.

283 byte By Rookie_95a at 2007-12-23
hi allI would like to know that if their is any way of Configuring external applications with java.what my requirement is that i have to scan the files to be uploaded in java application and before storing them i have to scan them using antivirus software.thanks

Error when trying to execute .class file.

301 byte By colea at 2007-12-18
Hello,I downloaded jdk 1.5 from the official java website and have installed it properly. I tried compyling my java program and it gets compilde. But when I try to execute it I keep getting the error "Exception in thread "main" java.lang.NoClassDef Found Error". Please help me ...

Cannot Retrieve from Hashtable to Create a List

4540 byte By jiapei_jena at 2007-11-15
I receive a Hashtable from people working on the back end of the application. I am trying to convert the Hashtable with key/value pairs into an ArrayList, which is an array of a bean class with two properties: country code and country name.I do not have compilation error nor runtime error. But, ...

[ASK] Important java program for my carier

277 byte By v-va at 2007-11-15
hello.I wanna ask to u all. how to create the program in java to monitor the connection in example with ip 13.196.252.82 is disconnect or not.and i wanna ask how to get the bandwidth that flow in ip 13.196.252.82?help me ok?im newbie in java.

JMX with Kerberos

207 byte By syntern@sch.bme.hua at 2007-11-15
Hello,Is there any example how we could secure the JMX management and monitoring with Kerberos based authentication? At least what steps are required to achieve this?Thanks,Istvan

SSLHandshakeException with jconsole

2856 byte By DieselDavea at 2007-11-15
I am trying to get JMX over SSL to work with a standalone server java app using jconsole as the client. I am configuring JMX via a file specified with the com.sun.management.config.file system property on the command line.I have it working fine without SSL, but with SSL enabled ...

Syndication with RMI?

1329 byte By Fascisticidea at 2007-11-15
I am not sure if syndication if the proper term. Syndication usually refers to rss, but what we want to do is not rss.So here is what we want to do, and I'd like your opinion on the use of RMI to do it.It is a application that will run on users computers, active in the system tray, and that ...

I'm desperate :( cannot track memory leak.

1251 byte By kipodusha at 2007-11-15
Hello.Maybe someone can help me on this because I have tried already everything.Basically we have an application that after running about for 3 weeks it reaches a state of "Out of Memory Error" and stops functioning. I tried to compare dumps of JMAP tracking out every day that passes but ...

Controlling the case of an attribute name

1682 byte By aakturea at 2007-11-15
Is it possible in a standard mbean to control the case of the attribute name? For example, I have a simple MBean:public interface EJBMBean { public Stats getstats(); public void setstats(Stats stats);}public class EJB implements EJBMBean { public Stats stats; public EJB(Stats stats) {this.stats ...

Jar creation and usage problem

396 byte By Ajoya at 2007-11-15
I have a jar file which contains 60 files. This jar actually consists of 2 files which are not needed anymore. Using this jar as is is working fine. But when I am removing these files and creating the jar it is giving problem at runtime in screens where this library is used.Please tell me how ...

how can I read generic-type object with object stream?

1504 byte By enoaa at 2007-11-15
I declared a class like thisclass Storage<K extedns Key, D extends Data> implements Serializable {}class Key implements Serializable {}interface Data extends Serializable {}and I used ObjectOutputStream to save.Storage<MyKey, MyData> storage = new Storage<MyKey, ...

Eclipse error.

812 byte By getoraam@gmail.coma at 2007-11-15
I have installed Java Eclipse on Solaris for the first time and i get the following error when i start the Eclipse.......JVM terminated. Exit code=1/usr/bin/java-jar /export/home/omcadm/ram/eclipse/startup.jar-os solaris-ws gtk-arch sparc-launcher /export/home/omcadm/ram/eclipse/eclipse-name ...

running program.java

714 byte By fazaia at 2007-11-15
hi!i try to execute *.java using the command line java *.classusually i find this error Exception in thread "main" java.lang.NoClassDefFoundError: workspace/freespace/os/class.the compilation is done correctly(no error).the class os exit and it is correctly specifiedi 'am using eclipse3.2java ...

need explanation on isUsageThresholdSupported() in jconsole

600 byte By Samantha at 2007-11-14
Hi,I was looking at the jconsole memory monitoring and managing tool and found that isUsageThresholdSupported() for the edenspace is true, but what I understand from http://java.sun.com/javase/6/docs/technotes/guides/management/mxbeans.htmlis that it should be false. Can you please let me know ...

Monitoring, Management, Debugging, and Profiling APIs - Generic Exception Handler/Listener

246 byte By subas11a at 2007-11-14
All,I have a web application and I want to create a generic exception handler/listener which will listen to all the exception(checked and runtime) which are thrown by web application.Any idea how can I do this?Regards.

method call recording without third-party profiler

906 byte By jerosa at 2007-11-14
hi all,*method call recording without third-party profiler*I would like to add basic profiler capability to my application, in order to monitor another java programI would like to be able to record method calls on a jvm instance, of another program's methods.I would like to do this without a ...

How to print values in a HashMap

1132 byte By Tammareddya at 2007-11-14
HiI am new to JavaI am using a HashMap where key is a String and the Value is again a HashMap..Firstly can I use it this way ...If not could you please suggest an alternative...If I can use it ...I am unable to print the values in the HashMap..Here "map" is a HasMap I am using..and I used ...

Is sockets and input/output-streams thread-safe?

679 byte By invictus2a at 2007-11-14
HiWhen creating a simple socket client application I would usually use BufferedReader on the inputstream, PrintWriter on the outputstream and a regular socket as the foundation running within its own thread and responding to events from the Swing UI. Now the question is:Is for instance the ...

Diagnosing out of memory errors

930 byte By nathan.michael.rosea at 2007-11-14
I'm working on a project that uses a number of applets on different HTML pages. I'm seeing "OutOfMemroy" errors after long periods of use on a Linux Mozilla Firefox client using Java 1.6.0. I have attempted to analyze the jmap heap dump, and it seems like many character arrays, byte arrays, ...

Very stange Behavior with JMX remote

652 byte By richiegra at 2007-11-14
HiI've an application written with Spring. JMX support works good locally bu I'm unable to connect from remote computer.I'm starting with :-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=4099 -Dcom.sun.management.jmxremote.authenticate=false ...

Foo and FooMBean must be in the same package ?

358 byte By chihiroa at 2007-11-14
When I register my MBean into the server, I got this exception:server.container.Container does not implement the server.container.ContainerMBeanNote that the interface ContainerMBean actually resides in a different package, namely server.api.ContainerMBean.Is this a real JMX Specification ...

(Best Practice) Declaring IOExceptions in MBean interface

537 byte By chihiroa at 2007-11-14
Hi,It is good practice for every method in a Standard MBean interface to be declared to throw java.io.IOException as shown here. This forces the code using the proxy to handle this exception explicitly. Otherwise, a communication problem while using the proxy will show up as the unchecked ...

Simple authentication.

643 byte By donaldwa at 2007-11-14
I want to do something which seems like it should be simple. I want to setup -Dcom.sun.management.jmxremote.port=51017 and have it so that either 1) No password is required but access is readonlyor 2) A password is required, which I shall configure in jxmremote.password but I don't have to ...

Jar won't run after using profiler

259 byte By Ni_Mina at 2007-11-14
I have an executable jar file in my dist directory, it used to run when I double click it, but after I tried the Profiler 5.5, it can't run any more, it says "Can't find main class", can someone tell me what happened ? And how to fix it ?Frank

I need help installing Java!!

276 byte By ShadowThundera at 2007-11-14
Hello. Sorry if this is in the wrong place.I'm trying to install Java, but windows (SP2) says that it is already installed. What's up with this?I did a full system scan for "java" and "jdk" and deleted every file, but I still have the same error. HELP!!

Xmx set to 256m, but getRuntime().totalMemory() returns 900MB after 1 day

380 byte By chanronny01a at 2007-11-14
We use Websphere Application Server 4, and set -Xmx256m and -Xms256m to our application.After 1 day, we found that the value returned by Runtime.getRuntime().totalMemory() is 900MB.I just wonder why the heapSize will be 3 times more than we set at -Xmx ?Is it possible the bugs of JVM or WAS4 ? ...

Handling OS Functionalities

192 byte By Kunal_V_Ta at 2007-11-14
Hi,IM tryin to build a network management system in java. can anyone tell me how can i call operating system(Windows) functionalities i.e. like Windows task manager, etc in java?

Sensible GC timestamps?

413 byte By preaneya at 2007-11-14
From what I can tell, the gc timestamps only output the number of seconds since the start of the program. IMHO, this is not very useful, especially if you're trying to find the exact time of some event.For example, this: Wed Jan 10 09:10:56 CST 2007seems a lot more useful than :2533.925Is ...

updating already flushed data

687 byte By Joja at 2007-11-14
Using OutputWriter, is there anyway to update already flushed data ?Suppose i have run a java program from command prompt . Depending upon the notification from another program, this program has to write "current status=1" to the command line.Now , when the next notification from the other ...

Error running jstack on linux 64 bit (Java 5.0 update 10)

2630 byte By sshalabia at 2007-11-14
I need to debug a problem in production and jstack is not helping.. Please help!Thanks,SamiLinux version:Linux 2.6.15-1.2054_FC5 #1 SMP Tue Mar 14 15:48:20 EST 2006 x86_64 x86_64 x86_64 GNU/LinuxJava version:java version "1.5.0_10"Java(TM) 2 Runtime Environment, Standard Edition (build ...

JMXConnector.getMBeanServerConnection() returns null

730 byte By Peter212a at 2007-11-14
Hi,I have the following problem. I'm using MX4J (3.0.2) implementation of JMX. The MBean server is running on Java 1.4. I exposed a JSR-160 JMXConnectorServer correctly bounded to "service:jmx:rmi://localhost/jndi/rmi://localhost:9099/jmxrmi" using Spring JMX support.I have a java client (to ...

Java Applications running as Windows Service

219 byte By klalith18@rediffmail.coma at 2007-11-14
Hi All,Does anyone have any idea with reference to running Java Applications as Windows Service and shutting down the same gracefully or on demand?Any i/ps would be greatly appreciated.Thanks

SUN JES 8.1 Q2UR2: Intermittently application server jvm crashed.

1548 byte By csgan97a at 2007-9-25
Application server jvm intermittently crashed but due to the feature in SUN JES 8.1 ur2 the application server will auto restarts the service. Most of the JVM crashes were due to memory corruption.The following are SUN findings:1)Multithreading issue that causes 2 threads writing on the same ...

get Roles realm/active directory

435 byte By hyrogen32a at 2007-9-25
Hi There,I've been making some progress recently with this, and Im just at the last hurdle. Im basically wanting cycle through the roles that a user belongs to, I've used request.isUserInRole(role) to check a user belongs to a given role. But, we have alot of roles and I just want to list ...

Finished Task

20 byte By martin_ms1985a at 2007-9-25
Finished Task

Invalid initial heap size in JVM 1.4.2_04 on solaris 9

380 byte By Vasanthana at 2007-9-25
Hi,While running this command.# java -Xms8096m -Xmx8096m newserver.shI am getting the following error:Invalid initial heap size: -Xms5000mCould not create the Java virtual machineI tried with - server option also. But same error. Can any one tell me what is the limit of heap size allowed in ...