Skip to main content

Posts

Showing posts with the label Java

JDK Version 21 Setup in Windows 11

Learn how to download and install java development kit version 21 from the oracle website and set the path in environment variables and then verify the java & javac commands are  recognized in command prompt.

How To Fix Resolve This Dependency In Android Studio

Solution For An Error : Resolve this dependency for ':app@debug/compileClasspath': Could not resolve com.android.support.appcompact. Your computer must be connected to internet to resolve this problem. Android Studio > File >  Settings > Build, Execution, Deployment  Gradle Uncheck the offline work and click OK to exit from Settings window  Go to Build Menu > Rebuild project Click the Try again link in Gradle notification and your pc will download the required library files from the internet and your problem will be resolved.

Gradle project sync failed. Basic functionality (e.g, editing, debugging) will not work properly.

Gradle is an open source build tool which help us to accelerate developer productivity. Go to Gradle Services website(http://services.gradle.org/distributions/) and download the latest version Download the latest version gradle-4.7-rc-1-all.zip ( Latest version while writing this article) and you can download greater than 4.7 if available and make sure the zip file contains "all" keyword (gradle-*.*-rc-*-all.zip). Go to your download location and unzip the downloaded file Android Studio > File >  Settings > Build, Execution, Deployment  Gradle Project-level settings -> Select Use local gradle distribution -> Select the unzip folder of downloaded gradle version -> Click OK button to exit from the Settings window. Please Wait until Gradle build completes and your problem have been resolved.   If gradle build failed, follow few more steps to get resolved Final step to resolve this error Go to your project -> Gradle script -...

Error:CreateProcess error=216 - Android Studion Gradle Error

Error:CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher This above problem is only occured to 32 bit edition of windows. Follow the below steps to resolve the error Click your Project in Android Studio Go to File Menu >  Project Structure SDK Location > JDK Location Uncheck the "Use embedded JDK " Select the installed jdk location After that create process error will be resolved but the new error Gradle Sync error will appear like this "Gradle sync failed: CreateProcess error=216, This version of %1 is not compatible with the version of Windows you're running. Check your computer's system information and then contact the software publisher" To fix the new problem reduce the memory Xmx768m in gradle.properties (Your Android Project > Gradle Scripts > gradle.properties  ) Thats it. Now en...

Android Studio Not Starting in Windows 10 - 32 Bit

Java Development Kit 9 (JDK) is available for 64 bit edition but not available for 32 bit edition. Many people are facing this issue that they have installed the android studio successfully and when they try to launch, no error occurred and no splash screen of android studio. The real solution is you have to install JDK 8 (32 bit) and install JDK 9 if you have 64 bit edition and then you have to setup the java path in system environment variable s.

How Do I Decompile Java Class Files

Learn how you can decompile the compiled java class file or java archive. Java decompiler is a software that helps you to view the java code by using compiled java classes or java archives . Support for decompiling and analyzing Java 5 byte code Amazing Graphical User interface  .

Image compression using java

There are no specific API is available for compressing the images. Supported format files are JPG (Joint Photography Experts Group) and PNG (Portable Network Graphics) Download Jar (Java Archive) which is developed by Java Query API Create a instance using ImageResize Class and using that object call the method compressImage Sample ImageResize ir = new ImageResize();  ir.compressImage("Source Location", "Destination ", width, height); String Parameter: Source Location and Destination Integer Parameter: width and height Parameters Description: ·          1 st Parameter : Source Location , Example c:\\demo\\image.jpg ·          2 nd Parameter : if you mention “default” then it will compress the original image and if you mention the destination location then it will create a new compressed image ·          3 rd Parameter  ...

Java Mail on Jboss 7 or above

Learn how to work your Java mail on Jboss 7. Most of the people have implemented Java mail for system updates or system notification using SMTP protocals and java mail was working fine on jboss 5 and  jboss6 then why the same code is not working with Jboss7 because the jboss 7 architecture completely changed for making the server bootup fast. All you have to do is add the latest Java mail 1.4.4 jar in the modules and also you have add the javax.api into your java mail module.xml Step by step procedure for you 1. Navigate jboss-as-web-7.0.0.Final\modules\javax\mail\api\main 2.Stop the server if it running 3.Remove the existing java mail jar and find the java mail 1.4.4 jar on the internet and put it in same directory where you deleted the existing version java mail jar 4.Now open the module.xml file in some note editor like notepad or notepad++ 5.Add new module name javax.api like this  under the dependencies ...

EJB Timer or Scheduler or Batch - Cron Quartz

Quartz Scheduler is an open source job scheduling service for your Java EE or Java SE. Every task cannot be done manually but some task like notification or important alerts have to perform based on time and date. In this article you will learn how to write EJB Timer for your Enterprise applications. CronJob.java - CronJob is used to execute the method for the given interval period package com.demo; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; //CronJob implements the Job interface - Add Quartz jar into your project build path public class CronJob implements Job { public void execute(JobExecutionContext arg0) throws JobExecutionException {  // Your Code Here System.out.println("Technology Innovation "); } } CronEJB.java - is used to set the scheduler time, date and time based region package  com.demo; import java.util.TimeZone; import javax.annotation.PostConstruct; import jav...

Java coding Standards - Code convention

In this tutorial you will learn how to make more strength to you java classes by adding code convention. What is Code Convention? Code convention place a important role while you are writing a simple Hello World java class or Software project. Code conventions are at the following places 1. File Names > File name should be a minimum of 8 character . > Every word should be begin with Upper case letter like MyDevice.java, HelloWorld.java , LearnProgrammingJava.java 2.Packages Names > Package should be always in lowercase letters like itsmypackage or com.project.ui or com.client or com.server 3.Class Names > Class Name are very similar to file name else your jvm (Java virtual Machine) will not recognize.. 4.Interface Names > Interface are like a small method which doesn't have implementation within a method and you can write interface like a method variables. > Every java will have atleast on class or interface ...

Inheritance In GWT - Tutorial

Google Web Toolkit is a great tool kit for developing Ajax based applications. Inheritance : Creating a new class from the base or existing class. I have created two separate project and now i want to inherit the one project source to another project so that i can reuse the class i.e, the concept of Object Oriented Programming Language. To Inherit the One Project code to another Project simply follow the below steps. 1.Export the first project as a jar but make sure to comment on the Entry Point of first Project i.e, the filename.gwt.xml. 2.Copy the Exported Java archive (jar) to the second project and add it in property build path. 3.Now Inherit first project module in the Second Project Entry Point. 4.Now Drive the new class from first project class. 5.Compile And Run It.

How To Install Sun Java (JDK/JRE) in Ubuntu , Fedora and OpenSuse Terminal

Learn how you can install Sun Java JDK (Java Developement Kit) / JRE ( Java Runtime Environment ) in Open source operating system like Ubuntu , Fedora and Open  Suse. JDK - Is used to develope the java application with the help of Java Libraries. JRE - Is used to run the java application Java is Independent platform and also more secure. To Install Sun Java (JDK/JRE) in Ubuntu sudo apt-get install sun-java6-jre sun-java6-plugin sudo update-alternatives –config java To Install Sun Java (JDK/JRE) in Fedora yum install sun-java6-jre sun-java6-plugin To Install Sun Java (JDK/JRE) in Open Suse yast install sun-java6-jre sun-java6-plugin

Java Apps No Sound - Nokia Symbian

Java Apps doesn't produce sound on Nokia Symbian series but the same apps are perfectly producing sound on other device. Why Java apps not produce sound in Nokia Symbian phones because Nokia series is default set the Java apps sounds are warning sound. To Produce Java apps and Games sounds on Nokia Mobile. Just Go to profiles and set the warning sound "on" then definitely it will produce sounds.

Mobile Flash Player - Download Flash RunTime

Flash Lite is a application from Adobe.It's a powerful runtime environment from mobile electronics to run the flash content on mobile web browser so that we can view the video's streaming , animation and slide show that works on web platform. Key Features of Mobile Adobe Flash Lite Flash Video(FLV ) Supports Flash 8 content supports on mobile web browser Faster performance Video Streaming Multiplatform Supports

Mobile Free Calls ,Chat / IM - Download

Nimbuzz mobile application makes you to make free calls ,chat / IM and free text messaging with all your friends over the mobile internet via GPRS,Wifi or 3G . Nimbuzz allows you to do simultaneously social network chatting with Gtalk, Skype, Windows Live Messenger, Yahoo Messenger, ICQ ,facebook ,twitter , hispace ,AIM and many more... What you can do with Nimbuzz Be always online Make free calls Free text messages Share picture and video file Chat with your buddy