http://docs.oracle.com/javaee/6/tutorial/doc/bnahu.html
http://download.oracle.com/otndocs/jcp/expression_language-2.2-mrel-eval-oth-JSpec/
Mostrando postagens com marcador Java. Mostrar todas as postagens
Mostrando postagens com marcador Java. Mostrar todas as postagens
sábado, 14 de julho de 2012
terça-feira, 26 de junho de 2012
Examples of GoF Design Patterns
Examples of GoF Design Patterns [closed]
http://stackoverflow.com/questions/1673841/examples-of-gof-design-patterns/2707195#2707195
http://stackoverflow.com/questions/1673841/examples-of-gof-design-patterns/2707195#2707195
segunda-feira, 25 de junho de 2012
XML in Java and XML Identing
How to create XML file in Java – (DOM Parser)
http://www.mkyong.com/java/how-to-create-xml-file-in-java-dom/
Indenting XML Output in Java
http://techxplorer.com/2010/05/20/indenting-xml-output-in-java/
http://www.mkyong.com/java/how-to-create-xml-file-in-java-dom/
Indenting XML Output in Java
http://techxplorer.com/2010/05/20/indenting-xml-output-in-java/
segunda-feira, 5 de dezembro de 2011
JBoss Envers and Temporal Databases
It can be used in need of Temporal Databases[1]... It is a great option for historic data!
Envers: Easy Entity Auditing
"The Envers project aims to enable easy auditing/versioning of persistent classes. All that you have to do is annotate your persistent class or some of its properties, that you want to audit, with @Audited. For each audited entity, a table will be created, which will hold the history of changes made to the entity. You can then retrieve and query historical data without much effort." [2]
[1] http://en.wikipedia.org/wiki/Temporal_database
[2] http://www.jboss.org/envers
Envers: Easy Entity Auditing
"The Envers project aims to enable easy auditing/versioning of persistent classes. All that you have to do is annotate your persistent class or some of its properties, that you want to audit, with @Audited. For each audited entity, a table will be created, which will hold the history of changes made to the entity. You can then retrieve and query historical data without much effort." [2]
[1] http://en.wikipedia.org/wiki/Temporal_database
[2] http://www.jboss.org/envers
Marcadores:
Hibernate,
Java,
ORM,
Temporal Databases
Hibernate - the best choice
Ok, Hibernate [1] is the best choice for design applications!
"Hibernate is best used to leverage end-to-end OR mapping. It provides a complete ORM solution, but leaves you no control over queries. Hibernate is an ideal solution for situations where you have complete control over both the application and the database design. In such cases you may modify the application to suit the database, or vice versa. In these cases you could use Hibernate to build a fully object-relational application. Hibernate is the best option for object-oriented programmers who are less familiar with SQL." [2]
[1] Hibernate Documentation
http://www.hibernate.org/docs
[2] Comparison of iBatis, Hibernate and JPA
http://www.narendranaidu.com/2008/07/comparison-of-ibatis-hibernate-and-jpa.html
"Hibernate is best used to leverage end-to-end OR mapping. It provides a complete ORM solution, but leaves you no control over queries. Hibernate is an ideal solution for situations where you have complete control over both the application and the database design. In such cases you may modify the application to suit the database, or vice versa. In these cases you could use Hibernate to build a fully object-relational application. Hibernate is the best option for object-oriented programmers who are less familiar with SQL." [2]
[1] Hibernate Documentation
http://www.hibernate.org/docs
[2] Comparison of iBatis, Hibernate and JPA
http://www.narendranaidu.com/2008/07/comparison-of-ibatis-hibernate-and-jpa.html
domingo, 16 de outubro de 2011
"Primefaces is not defined" error
At starting with Primefaces, the error "Primefaces is not defined" happens. It's because Primefaces needs h:head JSF tag in the page.
To fix, just do that:
http://www.primefaces.org/faq.html
To fix, just do that:
- How can I fix the "PrimeFaces not found" javascript error?
Make sure to have h:head tag in your page.
http://www.primefaces.org/faq.html
Using Facelets and CSS
Start rightly:
Facelets fits JSF like a glove
http://www.ibm.com/developerworks/java/library/j-facelets/
30 CSS Best Practices for Beginners
http://net.tutsplus.com/tutorials/html-css-techniques/30-css-best-practices-for-beginners/
Facelets fits JSF like a glove
http://www.ibm.com/developerworks/java/library/j-facelets/
30 CSS Best Practices for Beginners
http://net.tutsplus.com/tutorials/html-css-techniques/30-css-best-practices-for-beginners/
sábado, 15 de outubro de 2011
Configurando Tomcat 7 no Eclipse Indigo
- Baixe o Tomcat em
- Em Server Locations
- Selecione a opção para que o Eclipse controle o Tomcat
- "Use Tomcat instalattion (takes control of Tomcat installation)
- Altere o Deploy Path para o diretório webapps dentro da instalação do Tomcat, assim o projeto vai corretamente para a pasta de auto deploy do Tomcat.
- Caso seu projeto seja em JSF, garanta que os diretórios estejam de acordo
- Pasta do Projeto
- WEB-INF
- lib
- (jars e afins da aplicação)
- faces-config.xml
- web.xml
- index.jsp (na pasta raiz)
sexta-feira, 14 de outubro de 2011
Configurando as Tags JSF 2.0 em arquivos .XHTML com Facelets no Eclipse
Ao utilizar .JSPX e .XHTML para JSF 2.0, o Facelets obriga que seja utilizado o .XHTML [1], porém o Eclipse não completa as Tags JSF no .XHTML. Mesmo com a tentativa em [2], configurando no Eclipse que .XHTML deve informar as Tags JSF, não deu certo. Um bug no Eclipse foi aberto para isso [3], e num comentário havia uma solução [4]. E finalmente consegui utilizar as Tags JSF em arquivos XHTML! Utilizei o Eclipse Indigo 3.7.1.
Steps overview: [4]
[...]
2) Create a Dynamic Web Project. Apply the JSF 2.0 facet.
3) Create a XHTML page. Open it in the Web Page Editor (optional)
4) Use content assist to add the namespace to the JSF 2.0 libs. See attachment,
CA-Namespace.png
5) Use content assist to add a JSF tag.[...]
[1] Facelets Tag Completion in Eclipsehttp://www.mojavelinux.com/blog/archives/2006/12/facelets_tag_completion_in_eclipse/
[2] Eclipse Galileo - JSF Content Assist for xhtml files
http://www-02.imixs.com/roller/ralphsjavablog/entry/eclipse_galileo_jsf_content_assist
[3] Bug 314098 - JSF Content Assist for xhtml files
https://bugs.eclipse.org/bugs/show_bug.cgi?id=314098
[4] Bug 314098 - JSF Content Assist for xhtml files - Comment 4
https://bugs.eclipse.org/bugs/show_bug.cgi?id=314098#c4
Marcadores:
Code Completion,
Eclipse,
Java,
JSF 2.0,
Taglib
segunda-feira, 10 de outubro de 2011
Best and complete JSF 2.0 Tutorial
The best and more complete JSF 2.0 tutorial on Web.
http://www.coreservlets.com/JSF-Tutorial/jsf2/
And starting with Eclipse Indigo...
http://eclipsesource.com/blogs/2011/06/22/top-10-eclipse-indigo-features/
http://www.coreservlets.com/JSF-Tutorial/jsf2/
And starting with Eclipse Indigo...
http://eclipsesource.com/blogs/2011/06/22/top-10-eclipse-indigo-features/
terça-feira, 4 de outubro de 2011
JSF 1.2 and JSF 2.0 Tag Library and API - Javadoc
It's useful for JSF development:
Javadoc - JSF 1.2 Tag Library
http://download.oracle.com/docs/cd/E17802_01/j2ee/javaee/javaserverfaces/1.2_MR1/docs/tlddocs/index.html
Javadoc - JavaServer Faces API
http://download.oracle.com/docs/cd/E17802_01/j2ee/javaee/javaserverfaces/1.2_MR1/docs/api/index.html
Javadoc - JSF 2.0 Tag Library
http://download.oracle.com/javaee/6/javaserverfaces/2.0/docs/pdldocs/facelets/
Tags from the book Core JavaServer Faces by David Geary and Cay Horstmann
http://www.horstmann.com/corejsf/jsf-tags.html
Javadoc - JSF 1.2 Tag Library
http://download.oracle.com/docs/cd/E17802_01/j2ee/javaee/javaserverfaces/1.2_MR1/docs/tlddocs/index.html
Javadoc - JavaServer Faces API
http://download.oracle.com/docs/cd/E17802_01/j2ee/javaee/javaserverfaces/1.2_MR1/docs/api/index.html
Javadoc - JSF 2.0 Tag Library
http://download.oracle.com/javaee/6/javaserverfaces/2.0/docs/pdldocs/facelets/
Tags from the book Core JavaServer Faces by David Geary and Cay Horstmann
http://www.horstmann.com/corejsf/jsf-tags.html
domingo, 2 de outubro de 2011
JUnit 4 vsTestNG
Creio que é hora de começar a usar TestNG...
JUnit 4 Vs TestNG – ComparisonIn pursuit of code quality: JUnit 4 vs. TestNG
Marcadores:
Java,
JUnit,
Testes de Software,
TestNG
sábado, 11 de julho de 2009
Instalando o JDK e NetBeans no OpenSolaris de uma vez só
Em http://java.sun.com/javase/downloads/netbeans.html
baixe ¨JDK 6u14 with NetBeans IDE 6.7 Bundle¨ para Solaris
o arquivo tera nome como "jdk-6u14-nb-6_7-solaris-x86-ml.sh".
Coloque permissao de executar o .sh:
chmod +x jdk-6u14-nb-6_7-solaris-x86-ml.sh
Execute o .sh, abrira o processo de instalacao:
./jdk-6u14-nb-6_7-solaris-x86-ml.sh
Siga os passos de instacao, e pronto!
baixe ¨JDK 6u14 with NetBeans IDE 6.7 Bundle¨ para Solaris
o arquivo tera nome como "jdk-6u14-nb-6_7-solaris-x86-ml.sh".
Coloque permissao de executar o .sh:
chmod +x jdk-6u14-nb-6_7-solaris-x86-ml.sh
Execute o .sh, abrira o processo de instalacao:
./jdk-6u14-nb-6_7-solaris-x86-ml.sh
Siga os passos de instacao, e pronto!
segunda-feira, 6 de julho de 2009
Instalando JDK no OpenSolaris 2009.06
Baixe o arquivo com o JDK (Java Development Kit):
jdk-6u6-solaris-i586.tar.Z
Após execute:
zcat jdk-6u14-solaris-i586.tar.Z | tar -xf -
Maiores informações em
http://weblogs.java.net/blog/bleonard/archive/2008/06/opensolaris_200_1.html
jdk-6u6-solaris-i586.tar.Z
Após execute:
zcat jdk-6u14-solaris-i586.tar.Z | tar -xf -
Maiores informações em
http://weblogs.java.net/blog/bleonard/archive/2008/06/opensolaris_200_1.html
quinta-feira, 26 de fevereiro de 2009
Center a JFrame or JDialog at Screen - Centralizando um JFrame ou um JDialog na tela
You just have to put the pack(); before!
-
Basta colocar o pack(); antes!
//...
this.pack();
//pack() before!
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension screenSize = tk.getScreenSize();
setLocation((screenSize.width - this.getWidth()) / 2, (screenSize.height - this.getHeight()) / 2);
//...
-
Basta colocar o pack(); antes!
//...
this.pack();
//pack() before!
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension screenSize = tk.getScreenSize();
setLocation((screenSize.width - this.getWidth()) / 2, (screenSize.height - this.getHeight()) / 2);
//...
quinta-feira, 4 de dezembro de 2008
Mudando o idioma do NetBeans 6.x

Utilizar IDE para programar em Java com português e inglês misturado é ruim demais!
Altere o arquivo netbeans.conf que se encontra na pasta etc na pasta do NetBeans.
No meu computador, esse arquivo se encontra em (sim, windows, sou obrigado a usar):
C:\Arquivos de programas\NetBeans 6.x\etc\netbeans.conf
Adicione os dois parâmetros no atributo netbeans_default_options do arquivo netbeans.conf:
-J-Duser.language=en -J-Duser.region=US
(Não esqueça de fechar as aspas do valor to atributo!)
Reinicie o NetBeans e pronto, terá uma IDE de verdade.
* Será que o pessoal da Sun não sabe ainda que programadores não gostam de ferramentas em português? Pelo menos não em português e inglês misturados... ;)
domingo, 16 de novembro de 2008
Um bug de software pode mudar a vida de uma pessoa?
Um bug de software pode mudar a vida de uma pessoa?
Sim, por exemplo próprio:
Fiz o curso Student to Business (S2B) do Centro de Inovação da Microsoft, mais de 1000 candidatos, 3 fases de provas e seleção, cerca de 50 alunos restantes para a etapa final. Com o fim das aulas teóricas, é preciso fazer um trabalho completo de implementação. Windows XP e Visual Studio 2008 instalado, tudo configurado e ok. Trabalho iniciado e salvo. E então, fui abrir o trabalho hoje e ocorreu o seguinte bug:
Ok, Microsoft e bugs, tudo normal. Mas já tentei diversos métodos e nada de obter o meu projeto. Ok, não fiz backup porque meu trabalho que eu fiz até o momento era bem pequeno. E se fosse um projeto grande? E se eu tivesse um prazo e apenas restaurar backup e ficar debugando mensagens sem semântica nenhuma levasse tanto tempo que eu não conseguisse entregar o projeto a tempo?Acho que isso é um sinal, não tenho tempo para me dedicar a esse trabalho, tenho muitas coisas para fazer. Continuarei na minha área (Java) que eu sei que eu serei mais feliz... :)
Só me restou uma dúvida...
.NET = 0.48*Delphi + 0.52*Java ?
Assinar:
Postagens (Atom)
