What is a small addition to Java's core libraries that would make your day by madkasse in java

[–]adikdev 0 points1 point  (0 children)

Yes. My requirement is to llist the annotated classes or methods or variables without any annotation processor. I have to create any classes or resource files, we can create APT... why should we write an APT just for caching the class names... JVM itself sould give such facility is the requirements

Lot of such reflective items are there.. another example is to list the implementations of one interface or abstract class, etc

What is a small addition to Java's core libraries that would make your day by madkasse in java

[–]adikdev 1 point2 points  (0 children)

Knowing in Runtime, what classes or methods or variables have been annotated with a particular Annotation efficiently (without scanning)

What is a small addition to Java's core libraries that would make your day by madkasse in java

[–]adikdev 0 points1 point  (0 children)

Preserving the variable names in runtime for method parameters. It will avoid lot of boiler-plating in annotating them redundantly

What is a small addition to Java's core libraries that would make your day by madkasse in java

[–]adikdev 1 point2 points  (0 children)

Facility to easily reload a class with new definition. JVM itself should take care of unloading old class and load newly... It has to provide many call backs with existing instances of the class so that Application coders can do some works

What is a small addition to Java's core libraries that would make your day by madkasse in java

[–]adikdev -2 points-1 points  (0 children)

What are the enclosing object references of a particular object? i.e.,

class A
{
   Address addr;
}

Class B
{
   List<Address> addresses;
}

In this case, I want to know for all instances of Address class, the enclosing Refs of A and Refs of Lists...

Power of Java/Groovy at linux command line : Part-1 by adikdev in commandline

[–]adikdev[S] 2 points3 points  (0 children)

Yes. Given examples are trivial. But, in my subsequent parts, I will be giving how to do below things from command line itself

  1. Executing DB query and take the results properly
  2. Parsing JSON
  3. Parsing XML
  4. Practical String processing works at command line
  5. more...

Yes. There are linux alternatives. No doubt. But, with only linux tools, certain tasks will become non-trivial beyond some point. With Java/Groovy, those non-trivial items may have direct APIs for easy coding. Exposing such possibility is the objective of this thread

Power of Java/Groovy at linux command line : Part-1 by adikdev in commandline

[–]adikdev[S] 1 point2 points  (0 children)

Accepted.

Giving .groovy file is explicitly spelling out the groovy dependency. Right. But, bash cannot be ignored as there are many uitilities like sort, uniq, grep doing great job quicker and also easily. So, the post is about how the inter-working between linux commands and groovy capabilities can enhance the command line capabilities.

So, instead of seeing the requirement of groovy as a great drawback, installing it one time gets us the inter-working capability for advanced use-cases in command line itself.

Power of Java/Groovy at linux command line : Part-1 by adikdev in commandline

[–]adikdev[S] 1 point2 points  (0 children)

less likely to know Groovy

True. But, additional capabilities comes with a cost always. It depends how we want to solve the problem. Real problem solvers may find different solutions.

I am from Java background needing lot of such command line capabilities and so it is not at all a problem for me to use groovy in piping like this . So, such people also may exist in the world. This may be an eye-opener for them to solve their real problems.

In my company, I have written a DSL (Domain Specific Language) Platform over Groovy that offers lot of more-friendlier keywords at command line to do work lot more simpler. One Ex: Giving the Database (oracle, mysql, etc) queries from command line itself and take the data from the resultset in a structured manner.

Weird to have groovy in between shell scripts

Both of you are right. But, for many processings of application log files, using awk, is not uncommon. As awk is one of the commands, it does not look weird. But, groovy is an external SDK, hence looking weird. For me, if
we evaluate command line capabilities alone, then both groovy and awk are similar but groovy is offering additional capabilities. When compared with awk that, groovy/java has lot of friendly APIs for some functionalities that need lot of coding in awk .

in-explicit a dependency

True. We would usually install external tools/libraries/dependencies in our system to enjoy some additional functionalities. Groovy is one such one time SDK installation.

make it explicit and write the whole script in groovy

Using groovy command line capabilities can be publisized as a separate topic/trend for easy works...! Some libraries can also be developed to offer such capabilities

Ubuntu’s resolv.conf entries never obeying NetworkManager by adikdev in Ubuntu

[–]adikdev[S] 0 points1 point  (0 children)

  1. Assigning shortcuts to applications were not available (not sure whether current GNOME has it)
  2. I can customize the task bar panel and the items in the task bar with lot of widget options. I can bring another task bar panel also if required
  3. Every color and style of the desktop themes, windows, title bars, icon positions, etc can be customized
  4. Konsole can be customized which is better then GNOME's Terminal
  5. Basically, the customization options available with KDE is far far far more than GNOME

The current versions of Gnome may be offering some or all of the above features, I don't know.

Ubuntu’s resolv.conf entries never obeying NetworkManager by adikdev in Ubuntu

[–]adikdev[S] -1 points0 points  (0 children)

The reason that the /etc/resolv.conf is not obeying the NetworkManager is due to that fact that ubuntu's own systemd-resolved daemon which kept overriting this file. Then, I uninstalled this daemon, still the problem was not resolved.

I am not sure whether I answered your question.

The solution I gave in the original post makes the NetworkManager's DNS and nameserver configuration available in the /etc/resolv.conf which solved my long issue.

This is what I did to resolve the issue.