Feeds:
Posts
Comments

Archive for the ‘Java’ Category

When there are lot of classes to be loaded, we may come across this error; Solution is simple; Open \jboss-4.2.0.GA\bin\run.conf and update as follows; if [ "x$JAVA_OPTS" = "x" ]; then JAVA_OPTS=”-Xms256m -Xmx1024m -XX:MaxPermSize=512m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000″ fi That will fix the issue.

Read Full Post »

1. Make sure you have defined result name input in your struts.xml file. <action name=”tes” method=”testPhase”> <result name=”input”>/Project.jsp</result> </action> 2. Give fully qualified name under the tag class=”” in struts.xml for the particular action.  

Read Full Post »

If you see the error; Error: no `server’ JVM at `C:\Program Files\Java\jre1.6.0\bin\server\jvm.dll’ There is a little trick to get the server JVM up and running: Copy ‘server’ folder from the JDK’s JRE’s bin folder (example: C:\Program Files\Java\jdk1.6.0\jre\bin\server) and Paste the ‘server’ folder to JRE’s bin folder(example: C:\Program Files\Java\jre1.6.0\bin) Done!

Read Full Post »

Java Constructor Properties

1. Constructor cannot return a value. 2. Interface cannot have constructor. 3. “A constructor cannot be abstract, static, final, native, strictfp, or synchronized”. 4. A constructor can be private. 5. Abstract class can have constructor. 6. A constructor can be overloaded. 7. Constructors are not members of a class. For this reason, constructors cannot be [...]

Read Full Post »

A static initializer block will execute when a class is initialized — right after the class is loaded. This will happen (basically) the first time the class is referenced in the program. No instances need to be created. The static block will only be executed once (or in any case, only once each time the [...]

Read Full Post »

[Java] Path vs ClassPath

The PATH variable contains directories where binary files (e.g. EXE files in Windows) will be looked for. If you open a command prompt and type “javac”, you’re supposed to have the “bin” directory of your sdk into the PATH, otherwise you’ll get an infamous “Command not found” error message. The CLASSPATH contains directories (or JAR [...]

Read Full Post »

Portability Each kind of computer has its unique instruction set. While some processors include the instructions for their predecessors, it’s generally true that a program that runs on one kind of computer won’t run on any other. Add in the services provided by the operating system, which each system describes in its own unique way, [...]

Read Full Post »

Java as a platform

A platform is the hardware or software environment in which a program runs. We’ve already mentioned some of the most popular platforms like Microsoft Windows, Linux, Solaris OS, and Mac OS. Most platforms can be described as a combination of the operating system and underlying hardware. The Java platform differs from most other platforms in [...]

Read Full Post »

Why Java?

Get started quickly Although the Java programming language is a powerful object-oriented language, it’s easy to learn, especially for programmers already familiar with C or C++. Write less code Comparisons of program metrics (class counts, method counts, and so on) suggest that a program written in the Java programming language can be four times smaller [...]

Read Full Post »

JVM: The use of the JVM is simple : – To change the byte code into the machine specific code. So the JVM converts the byte code(ie the code which we get when we compile the .java class) into the code that your machine/OS understands. JVM is machine specific. So JVM for windows will be [...]

Read Full Post »

Older Posts »