Showing posts with label IDE. Show all posts
Showing posts with label IDE. Show all posts

November 27, 2019

Virtual Reality (VR), Augmented Reality (AR), 3D Application Development Tools and Platforms

Hi folks,

Most of the developers think Unity is only the development platform to develop Virtual Reality (VR), Augmented Reality (AR), 3D Applications.

Here is the list which might be useful you to explore based on your skillset.


  1. Unity - C#
  2. Unreal - C++
  3. Apple SceneKit - Swift / Objective-C
  4. Google Sceneform - Android
  5. Amazon Sumerian - JavaScript
  6. Babylon - JavaScript - Try online Playground
  7. A-Frame - HTML JavaScript
  8. Three - JavaScript - Examples
Hope this information is useful for you to create your own applications based on your knowledge.

Make your dreams to real using the VR, AR, 3D technologies.

Please send your feedback and comments to psrdotcom@gmail.com

May 03, 2017

Eclipse reset/enable workspace preference on startup

Hi all,

Today, I have come across a situation where I want to choose the one of the workspaces i have worked before.

In general, eclipse will prompt for workspace location on startup
But, if you have checked "Consider this as default workspace and don't ask again" option, then next time when you start eclipse, you won't get the prompt for workspace selection.

Re-enable/Reset workspace preference on eclipse startup


  1. Click on eclipse "Window->Preferences"
  2. Go to "General->Startup/Shutdown->Workspaces"
  3. Check "Prompt for workspace on startup" or use keyboard shortcut "Alt+w" 
  4. Now, exit the eclipse
  5. Start the eclipse
You should be able to see the workspace selection on eclipse startup screen.

Happy coding!!

Please send your comments and feedback to psrdotcom@gmail.com

December 19, 2014

Reverse Engineering .apk file (or) Getting Java source code from .apk by extracting

Hi friends,

Today we are going to see how the .apk can be reverse engineered to see the original source code

Procedure

  1. Get the .apk file (Here I'm taking example apk called psr.apk)
  2. Rename the extention from psr.apk to psr.zip file
  3. Extract the psr.zip file
  4. It will create folder named "psr" and contents will be inside that
  5. Download the tool "dex2jar" from the official link
  6. Extract the downloaded "dex2jar" zip
  7. Navigate to the "dex2jar" extracted directory
  8. Execute the following command
    • ./d2j-dex2jar.sh psr/classes.dex
  9. Now it will generate classes-dex2jar.jar file
  10. Extract the jar file, it will create "classes-dex2jar" folder
  11. Now, open you "intelliJ IDEA"
    • Install "Java Decompiler IntelliJ Plugin" in "intelliJ IDEA"
    • In IDE, click "File->Open"
    • Select the "classes-dex2jar" folder path
  12. Now, click on any of the .class file, then you should be able to see the original java source code of it

Isn't it awesome guys :)

Keep enjoying the coding :)

Please send your feedback and comments to psrdotcom@gmail.com

December 27, 2011

Java Native Interface (JNI) in Netbeans with C/C++ and Java Hello World Sample Source Code

Hi all,

Today I configured the Netbeans IDE to work with Java Native Interface (JNI).

Pre-Requisites:
  1. Java Development Kit (JDK)
  2. Cygwin (or) MinGW & MSYS
  3. NetBeans IDE with Java and C/C++ Bundle

Installation:
  • Install JDK
  • Install Cygwin (or) MinGW&MSYS
  • Note: While installing please choose the destination directory name without spaces
  • I have installed NetBeans IDE All Version, because I thought, I will need all the technologies. That is different approach.

Configuration:
  • Set the environment variables like JAVA_HOME and PATH with Java Installation Directory and JDK bin, Cygwin/MinGW&MSYS bin directories respectively
  • Cygwin/MinGW integration with NetBeans
  • Configure the C/C++ with Tools MinGW bin directory, which automatically fills the corresponding compilers

Source Code:

  • Create a sample java application with the following detail

package javaapp1.JavaApp1;

public class JavaApp1
{
public static void main(String [] args)
{
  new JavaApp1.nativePrint();
}

private native void nativePrint();
}

  • Clean and Build the java project
  • In Command Prompt, Navigate to Netbeans Project Directory
    • cmd> cd Netbeans/ProjectDir
  • Create the Java header file
    • cmd> javah -o JavaApp1.h -classpath JavaApp1\build\classes javaapp1.JavaApp1

  • Create a C/C++ Dynamic Library Project in Netbeans (In this example, it is CppDll1)
  • Change some of the project properties
  • Make sure that, you have downloaded and configured the proper Cygwin/MinGW with exact Architecture 32bit/64bit
  •  Make sure that you are using proper gcc for 32bit/64bit dll creation
  • Linker must be of same architecture, 32bit/64bit


  • Include the Java header file, which we have created in Java Project.
    • Right click on the "Source Files"-> Select "Add an Existing Item"
    • Select the created header file from Project Home Directory
    • (OR)
    • Manually copy the created header file from Project home directory to CppDll directory
  • Create a C Source file in "Source Files" in CppDll1 project
 #include "JavaApp1.h"

JNIEXPORT void JNICALL Java_javaapp1_JavaApp1_nativePrint(JNIEnv *env, jobject obj)
{
    printf("\nHello World from C\n");  
}
  • Clean and Build the C code. I have faced the following issue.
    • Issues Faced:
      • I am using Windows 7 64-bit and installed Jdk 64-bit. But initially I have installed MinGW 32 bit and it is generating only 32 bit DLL which is not suitable to run the Java application in NetBeans.
    • Resolution:
      • Downloaded MinGW 64 bit and configured in the NetBeans C/C++ Options
  • Copy the .dll file path
  • In Java project, open the main class and add the following content
package javaapp1.JavaApp1;

public class JavaApp1
{
static
{
  System.load("dll file path");
}
public static void main(String [] args)
{
  new JavaApp1.nativePrint();
}

private native void nativePrint();
}
  • Clean and Build the project
  • Run the Java project to see the final JNI output.

References:
http://java.sun.com/docs/books/jni/html/jniTOC.html
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html
http://www.cygwin.com/
http://sourceforge.net/projects/mingw-w64/
http://netbeans.org/community/releases/71/install.html

Please send your feedback to psrdotcom@gmail.com

December 22, 2011

Netbeans Plugin Install, Update, Problem, Troubleshoot

Dear all,

I was facing an issue while updating my netbeans. It was showing the following screen


I tried to  resolve this problem by checking the proxy configuration, firewall configuration, refreshing the content. None of them solved my problem.
Note: You please try all those settings, it may work for you. If none the above configuration solves your problem then follow the below solutions.


I have found 2 solutions to resolve/troubleshoot this problem.

a) Manual Update
  1. Copy the path of the networking problem link
  2. Download the .nbm file
  3. In Netbeans, Click on Tools (Menu) -> Select "Plugins" option
  4. Select the tab "Downloaded" -> Click "Add Plugins"
  5. Choose the appropriate .nbm file from the downloaded directory
  6. Click "Open" to view in the "Downloaded" tab
  7. Check the plugin and Click on "Install" button
  8. Now the Netbeans plugin will be updated and it will auto download the dependencies
Note: Above Screens are of Netbeans IDE 7.0.1. For your netbeans IDE the options may be different menus but the procedure is same.
  • Pros: Easy to install the specified/chosen plugin and update
  • Cons:
    • Issue: While updating, if it was not able to get the dependency, then it will show the same "Networking Problem"
    • Resolution: Follow the same procedure from step 1

b) Automatic Update:

  1. In Netbeans, Click on Tools (Menu) -> Select "Plugins" option
  2. Select the tab "Settings"
  3.  
  4. Click "Add" button to add a plugin update center
  5.  
  6. Enter the name and path of the plugin update center and Click on "OK"
  7. It will auto-refresh the plugins available
Install Plugin:
You can download many netbeans plugins from "Available Plugins" tab of "Plugins" window.
Install your own choice of plugins and enjoy application development with Netbeans.

If you have any queries, please contact me on psrdotcom@gmail.com

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com