How to move all modules to new version of Python (from 3.6 to 3.7)

Even if the old python version has been removed, it is possible to use the pip of the current python version with the –path option to list all the modules installed in the previous version. For example, migrating all my user installed python modules from 3.7 to 3.8 pip freeze –path ~/.local/lib/python3.7/site-packages > requirements.txt pip … Read more

What is the default package in which my classes are put if I don’t specify it?

A class that is not in a named package is in an unnamed package. Thus the full class name is Main. Such classes cannot be used from a named package, except via reflection. The JLS says that: Unnamed packages are provided by the Java SE platform principally for convenience when developing small or temporary applications … Read more

What Does a Standard “Installation” actually do?

You’re really looking at a lot of legacy reasons all rolled into what has become standard practice in the Windows world. First, some contrast, because it isn’t always this way. An “application” in Mac OS X is simply a directory with a certain structure inside it, named with a .app extension. Installing an application is … Read more

Same class name in different packages

Yes, you can have two classes with the same name in multiple packages. However, you can’t import both classes in the same file using two import statements. You’ll have to fully qualify one of the class names if you really need to reference both of them. Example: Suppose you have pkg1/SomeClass.java package pkg1; public class … Read more

Package name is different than the folder structure but still Java code compiles

The Java language specification doesn’t force files to be in a certain directory. It optionally allows the compiler to require that public classes are in files with the same name of the class, but I don’t think there’s anything similar for packages. Section 7.2.1 talks about possible storage options in a file system, but it … Read more

ant task to remove files from a jar

Have you tried using the zipfileset task? <jar destfile=”stripped.jar”> <zipfileset src=”full.jar” excludes=”files/to/exclude/**/*.file” /> </jar> Example <property name=”library.dir” value=”dist” /> <property name=”library.file” value=”YourJavaArchive.jar” /> <property name=”library.path” value=”${library.dir}/${library.file}” /> <property name=”library.path.new” value=”${library.dir}/new-${library.file}” /> <target name=”purge-superfluous”> <echo>Removing superfluous files from Java archive.</echo> <jar destfile=”${library.path.new}”> <zipfileset src=”${library.path}” excludes=”**/ComicSans.ttf” /> </jar> <delete file=”${library.path}” /> <move file=”${library.path.new}” tofile=”${library.path}” /> </target>

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