niedenzu

Hints and tricks for developers

Martins Amazon Wunschliste

Maven-Konfiguration mit Eclipse 6. December 2016

Damit Eclipse mit der Maven-Verzeichnisstruktur arbeitetn kann muß man Maven innerhalb von Eclipse kongigurieren.

Als erstes muß man maven auf sein Sytem kopieren und ein paar Umgebungsvariablen einstellen.

M2_HOME: C:/Programme/Apache Software Foundation/apache-maven-2.2.1
JAVA_HOME: C:/Programme/IBM/SDP/jdk
Path: %M2_HOME%bin

Installation von Maven muß ein einem Verzeichnis ein.

das zweite bild

zweites bild

No Comments on Maven-Konfiguration mit Eclipse
Tags: ,
Categories: Maven

SimpleProxyServer 5. December 2016

You need a Proxy-Server to track the traffic.
But you are not allowed to install one.
All you have is Java.

Here ist the a solution.

No Comments on SimpleProxyServer
Tags: ,
Categories: Java

Replace tabs with whitspaces 6. October 2016

Our code was analysed by the sonar tool. One rule says that you should not use tab-characters.
So I needed to replace all tab-characters by 4 spaces

I used the sfk.exe .

converts the tabs of all Java-Files in the src-directory to 4 space-character.

No Comments on Replace tabs with whitspaces
Tags: ,
Categories: Uncategorized

PreparedStatementWrapper 23. April 2015

No Comments on PreparedStatementWrapper
Tags: ,
Categories: DB2 Java

log4j – where are my logs? 29. January 2015

Create a Servlet that shows you the log4j-configuration

String configurationOptionStr = OptionConverter.getSystemProperty(
  LogManager.DEFAULT_CONFIGURATION_KEY, 
  null);
		
String configuratorClassName = OptionConverter.getSystemProperty(
  LogManager.CONFIGURATOR_CLASS_KEY, 
  null);
						
writer.write("configurationOptionStr:" +configurationOptionStr+"n");
writer.write("configuratorClassName:" +configuratorClassName+"n");
No Comments on log4j – where are my logs?
Tags: ,
Categories: Java

Install maven on Mac OS X 23. January 2015

  • Download the archiv from apache
  • cd ~/Downloads
  • unzip apache-maven-3.3.3-bin.zip
  • cd /usr/local
  • sudo mkdir apache-maven
  • sudo mv ~/Downloads/apache-maven-3.3.3 /usr/local/apache-maven
  • cd /Library/Java/JavaVirtualMachines/
  • ls
  • cd ~
  • vi .bash_profile

1.Extract the distribution archive, i.e. apache-maven-3.2.5-bin.tar.gz to the directory you wish to install Maven 3.2.5. These instructions assume you chose /usr/local/apache-maven. The subdirectory apache-maven-3.2.5 will be created from the archive.
In a command terminal, add the M2_HOME environment variable, e.g. export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.5.
Add the M2 environment variable, e.g. export M2=$M2_HOME/bin.
Optional: Add the MAVEN_OPTS environment variable to specify JVM properties, e.g. export MAVEN_OPTS=”-Xms256m -Xmx512m”. This environment variable can be used to supply extra options to Maven.
Add M2 environment variable to your path, e.g. export PATH=$M2:$PATH.
Make sure that JAVA_HOME is set to the location of your JDK, e.g. export JAVA_HOME=/usr/java/jdk1.7.0_51 and that $JAVA_HOME/bin is in your PATH environment variable.
Run mvn –version to verify that it is correctly installed.

To set environmen variable on mac:
/bin/launchctl setenv FOO BAR
echo $FOO

edit the .bach_profile in your home directory

export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home

Finde out where java is
Use /usr/libexec/java_home -v 1.7 command on a terminal shell to figure out where is your java 1.7 home directory

thats it. you are set up

The local repositoy will be created in following folder:

/Users/martin/.m2/repository

if you perform

mvn install

install – install the package into the local repository, for use as a dependency in other projects locally

No Comments on Install maven on Mac OS X
Tags: , ,
Categories: Uncategorized

STATE_SAVING_METHOD 7. April 2010

JSF-Komponenten einer JSF-Seite werden in einem Komponentenbau verwaltet. In jedem Request-Response-Cyclus muß dieser Baum wieder aufgebaut werden.
Es gibt 2 Möglichkeiten.

No Comments on STATE_SAVING_METHOD
Tags: ,
Categories: Uncategorized
Martin Rocks