-tsa or -tsacert timestamp for applet jar self-signed

The Java 7 release provides a (courtesy?) warning about something which has been in place for a decade… Trusted Timestamping was introducing in Java 5 (2004). The motivation was so that developers would not be forced “to re-sign deployed JAR files annually” when the certificates expired. → http://docs.oracle.com/javase/1.5.0/docs/guide/security/time-of-signing.html A URL-based Time Stamp Authority (TSA) is … Read more

Creating a jar file from a Scala file

Sample directory structure: X:\scala\bin X:\scala\build.bat X:\scala\MANIFEST.MF X:\scala\src X:\scala\src\foo X:\scala\src\foo\HelloWorld.scala HelloWorld.scala: //file: foo/HelloWorld.scala package foo { object HelloWorld { def main(args: Array[String]) { println(“Hello, world!”) } } } MANIFEST.MF: Main-Class: foo.HelloWorld Class-Path: scala-library.jar build.bat: @ECHO OFF IF EXIST hellow.jar DEL hellow.jar IF NOT EXIST scala-library.jar COPY %SCALA_HOME%\lib\scala-library.jar . CALL scalac -sourcepath src -d bin src\foo\HelloWorld.scala CD … Read more

Maven JAR Plugin 3.0.2 Error: You have to use a classifier to attach supplemental artifacts to the project instead of replacing them

The Jar Plugin is actually getting executed twice with the configuration: <plugin> <artifactId>maven-jar-plugin</artifactId> <version>3.0.2</version> <executions> <execution> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> If you check the logs with such a configuration, you will have something like: [INFO] — maven-jar-plugin:3.0.2:jar (default-jar) @ test — [INFO] Building jar: …\test\target\test-0.0.1-SNAPSHOT.jar [INFO] [INFO] — maven-jar-plugin:3.0.2:jar (default) @ test — … Read more

Set folder for classpath [duplicate]

If you are using Java 6 or higher you can use wildcards of this form: java -classpath “.;c:\mylibs\*;c:\extlibs\*” MyApp If you would like to add all subdirectories: lib\a\, lib\b\, lib\c\, there is no mechanism for this in except: java -classpath “.;c:\lib\a\*;c:\lib\b\*;c:\lib\c\*” MyApp There is nothing like lib\*\* or lib\** wildcard for the kind of job … Read more

Maven Error: Could not find or load main class

I got this error using Maven, and I discovered the solution. Error: Could not find or load main class com.mycompany.testapifactory.Main I’m using java JDK version 1.7 on Linux, my pom.xml file was the default generated by Netbeans and I was using these commands to compile, which do work fine with a normal hello-world java application: … Read more

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