Compile & Run Java within Sublime Text 3

Build script for Sublime Text to compile & run the Java file within Sublime Text.
You can create new build script as below:

Sublime Text Custom Build System

Sublime Text Custom Build System

Before executing build, you need to save your Java file.

By default it’ll compile & run your Java file.
But you can perform individual task with the following commands:
1) Compile Java
2) Run Java

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
    "cmd": ["javac", "-Xlint", "$file"],
    "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
    "selector": "source.java",
    "cmd": ["java", "$file_base_name"],
 
    "variants": [
        {
            "cmd": ["javac", "-Xlint", "$file"],
            "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
            "selector": "source.java",
            "name": "Compile Java"
        },
        {
            "cmd": ["java", "$file_base_name"],
            "name": "Run Java"
        }
    ]
}

Hide WildFly 8 (JBoss) Header

Here’s a quick way to hide WildFly (JBoss CE) header details.

Here I assume this is your dev environment & you’ve not altered any directory structure from it’s downloaded version.
Open your server config..

WildFly Root Directory/standalone/configuration/standalone.xml

Search for the following tag:
<subsystem xmlns=”urn:jboss:domain:undertow:1.1″>

under which you can remove/modify/comment-out following tags:

1
2
3
4
5
<!-- <filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/> -->
...
<!-- <response-header name="server-header" header-name="Server" header-value="WildFly/8"/>
<response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/> -->

Jersey 2.x deployment issue on WildFly 8 / JBoss

I am playing around Jersey 2.x, Spring 4.x & Hibernate 4.x… Initially I started with Tomcat & then I move to WildFly 8 (JBoss CE).
But WildFly was not able to deploy it… and was throwing error something like this:

Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type ServiceLocator with qualifiers @Default

In case if anyone facing issue, deploying jersey 2.x app on WildFly/JBoss… Here is a quick fix.
Add a following maven dependency and that’s it..

1
2
3
4
5
<dependency>
  <groupId>org.glassfish.jersey.containers.glassfish</groupId>
  <artifactId>jersey-gf-cdi</artifactId>
  <version>${jersey.version}</version>
</dependency>

This module tells the WildFly container to let Jersey handles the stuffs…

Straight From The Coder’s Heart

4 baj gaye lekin code abhi baaki he..
biwi he naraz lekin code abhi baaki he..
mummy gaye aake, aur munna gaya sone.. lekin code abhi baaki he..

code ho gaya to sala testing abhi baki he..

NginX chala, aur Lua bhi chala..
sala REDIS he naraz bola code abhi baaki he..

aa aa aage kya karenge mitros..
google down he.. up karo..
google down he.. up karo..
alya network na chhe locha !!! WTF !!! e…)

testing ho gaya to bug fixing abhi baki he..

— yeah it’s F.A.L.T.U

 

Introduction to Planning Poker ( Agile )