Decompile .smali files on an APK [duplicate]

No, APK Manager decompiles the .dex file into .smali and binary .xml to human readable xml. The sequence (based on APK Manager 4.9) is 22 to select the package, and then 9 to decompile it. If you press 1 instead of 9, then you will just unpack it (useful only if you want to exchange … Read more

Difference between jar and war in Java

From Java Tips: Difference between ear jar and war files: These files are simply zipped files using the java jar tool. These files are created for different purposes. Here is the description of these files: .jar files: The .jar files contain libraries, resources and accessories files like property files. .war files: The war file contains … Read more

-XX:MaxPermSize with or without -XX:PermSize

We’ve run into a Java.lang.OutOfMemoryError: PermGen space error and looking at the tomcat JVM params, other than the -Xms and -Xmx params we also specify -XX:MaxPermSize=128m. After a bit of profiling I can see occasionally garbage collection happening on the PermGen space saving it from running full. My question is: other than increasing the -XX:MaxPermSize … Read more

Multiple assignment at once in java

tl;dr: No, there isn’t such a thing in Java. You can assign initial values to variables like this: But if your want (1, 2, 3) to be the result of a method call, this is not possible in Java. Java does not allow returning multiple values. Python allows this: The main point, why this does … Read more

Which Eclipse IDE version to choose?

What I would like to do is use Eclipse for (…) The Eclipse IDE for Java EE Developers allows to do what you’re asking for out of the box. Should I download a totally new version from Eclipse site or can I just ADD necessary features/plugins to my current Eclipse setup. Both would work, although … Read more

How to determine day of week by passing specific date?

Yes. Depending on your exact case: You can use java.util.Calendar: Calendar c = Calendar.getInstance(); c.setTime(yourDate); int dayOfWeek = c.get(Calendar.DAY_OF_WEEK); if you need the output to be Tue rather than 3 (Days of week are indexed starting at 1 for Sunday, see Calendar.SUNDAY), instead of going through a calendar, just reformat the string: new SimpleDateFormat(“EE”).format(date) (EE … Read more

Java error “Value of local variable is not used”

Well, the error “The value of local variable p is not used.”, Is not actually an error. It’s your IDE (Eclipse), warning you that you aren’t actually reading that variable, so you aren’t receiving any input from it. And the other problem with your class is, you don’t have a main method. Like this, And … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)