Archive for the ‘Java’ Category

Google Cloud: first create project, then create application

April 23, 2019

It seems quite obvious, first you create a project and eventually the application.
Well, as I could see it is not 100% clear.
If you just create the project, no app can be deployed and you would get something like

Beginning interaction for module default…
Feb 29, 2019 9:45:35 AM com.google.appengine.tools.admin.AbstractServerConnection send1
WARNING: Error posting to URL: https://appengine.google.com/api/appversion/getresourcelimits?app_id=helloworlddummyname-123456&version=1&
404 Not Found
This application does not exist (project_id=u’helloworlddummyname-123456′). To create an App Engine application in this project, run “gcloud app create” in your console.
This is try #0

As by the log, action is clear but some details are missing; here are 2 readymade options :
open Google Cloud Console, select your project and you should see something like this
GoogleCloud_CreateApplication

(clear enough? ;)) press “Create Application” and select the region you prefer
GoogleCloud_CreateApplication2-Region

or run the command from the Google Cloud SDK Shell
gcloud app create --project=[your project id] --region=[a region id]

I went for the cmd line 🙂

read more here “gcloud app creat ” needed permission?

Netbeans, Google Cloud and Java7-8

April 22, 2019

Again, this is just a reminder for myself … and maybe helpful for other Java-beginners 😉

Wanted to try Google Cloud … with Java…and Netbeans.

I have been forwarded this helpfull tutorial: How to Setup Google App Engine Server in NetBeans IDE

Found two issues, relative small if you are in Java world for quite a while … but I start as a total beginner:

First: JAVA_HOME was missing.
I installed the JDK 1.8 (this jdk-8u212-windows-x64.exe here) and JAVA_HOME was missing, so for the 100% beginners out there a good tutorial is How to set JAVA_HOME on Windows 10

Second: could not deploy the hello world app and had this error messagE:

com.google.apphosting.utils.config.AppEngineConfigException: GAE Java7 is not supported anymore.
Unable to update app: GAE Java7 is not supported anymore.

Workaround seems well known: in my WebApplication edited appengine-web.xml and added

<runtime>java8</runtime>

more info on appengine-web.xml Reference

That’s all! 🙂

Thinking in Java (4th Edition) by Bruce Eckel

February 19, 2008

Thinking in Java (4th Edition) by Bruce Eckel

Amazon.com:
Thinking in Java is a printed version of Bruce Eckel’s online materials that provides a useful perspective on mastering Java for those with previous programming experience. The author’s take on the essence of Java as a new programming language and the thorough introduction to Java’s features make this a worthwhile tutorial.

Thinking in Java begins a little esoterically, with the author’s reflections on why Java is new and better. (This book’s choice of font for chapter headings is remarkably hard on the eyes.) The author outlines his thoughts on why Java will make you a better programmer, without all the complexity. The book is better when he presents actual language features. There’s a tutorial to basic Java types, keywords, and operators. The guide includes extensive source code that is sometimes daunting (as with the author’s sample code for all the Java operators in one listing.) As such, this text will be most useful for the experienced developer.

The text then moves on to class design issues, when to use inheritance and composition, and related topics of information hiding and polymorphism. (The treatment of inner classes and scoping will likely seem a bit overdone for most readers.) The chapter on Java collection classes for both Java Developer’s Kit (JDK) 1.1 and the new classes, such as sets, lists, and maps, are much better. There’s material in this chapter that you are unlikely to find anywhere else.

Chapters on exception handling and programming with type information are also worthwhile, as are the chapters on the new Swing interface classes and network programming. Although it adopts somewhat of a mixed-bag approach, Thinking in Java contains some excellent material for the object-oriented developer who wants to see what all the fuss is about with Java. –This text refers to an out of print or unavailable edition of this title.

Book Description
The legendary author Bruce Eckel brings Java to life with this extraordinarily insightful, opinionated and downright funny introduction. Thinking in Java introduces all of the language’s fundamentals, one step at a time, using to-the-point code examples. More than virtually any other book, Thinking in Java helps you understand not just what to do — but why. Eckel introduces all the basics of objects as Java uses them; then walks carefully through the fundamental concepts underlying all Java programming — including program flow, initialization and cleanup, hiding implementations, reusing classes and polymorphism. Using extensive, to-the-point examples, he introduces error handling, exceptions, Java I/O, run-time type identification, and passing and returning objects. He covers the Java AWT, multithreading, network programming with Java — even design patterns. The best way to understand the real value of this book is to hear what readers of the online version have been saying about it: “much better than any other Java book I’ve seen, by an order of magnitude…” “mature, consistent, intellectually honest, well-written and precise…” “a thoughtful, penetrating analytical tutorial which doesn’t kowtow to the manufacturers…” “Thank you again for your awesome book. I was really floundering, but your book has brought me up to speed as quickly as I could read it!”For both beginner and experienced C and C++ programmers who want to learn Java.

* From the basics of object development, all the way to design patterns and other advanced topics.

* By the author of the best-selling Thinking in C++ — winner of the 1995 Jolt Cola Award!

* On-line version has already received tens of thousands of hits — there’s a huge built-in demand for this book! –This text refers to an out of print or unavailable edition of this title.

Java2 Tecniche Avanzate

February 15, 2008

Java2 Tecniche Avanzate by Horstmann Cay S.; Cornell Gary

english version: Core Java(TM) 2, Volume II–Advanced Features (see below)

Gorilla.it:
Complemento indispensabile del libro Java 2 – I Fondamenti, questo volume fornisce la guida necessaria per risolvere anche i problemi di programmazione più complessi incontrati dagli sviluppatori Java esperti. Giunto alla sua quinta edizione, Java 2 – Tecniche avanzate offre un nuovo capitolo su XML e Java, oltre a descrizioni completamente riorganizzate di molte funzionalità avanzate: dalle collection ai metodi nativi, dalla sicurezza a Swing. Inoltre, presenta informazioni allo stato dell’arte per gli sviluppatori Java:
Una descrizione completamente aggiornata di multithreading, collection e reti.
Una descrizione degli oggetti remoti completamente rivista.
Nuove sofisticate tecniche per l’utilizzo dell’architettura dei componenti JavaBeans.
Tecniche di realizzazione di GUI avanzate basate su Swing e AWT.
Cay Horstmann identifica i problemi incontrati più spesso e fornisce una guida completa per risolverli, oltre al codice sempre più robusto che ha reso Java 2 – Tecniche avanzate un bestseller internazionale negli ultimi cinque anni. Il lettore avrà una migliore comprensione di reti, oggetti remoti, API JDBC, internazionalizzazione e molto altro.
Il CD-ROM contiene il codice sorgente completo degli esempi, Forte per Java 2, versione 2.0, Community Edition e Java 2 SDK, Standard Edition.

English Version

Core Java(TM) 2, Volume II–Advanced Features
Amazon.com:
Picking up where the authors’ first volume on Java left off, Core Java 2, Volume 2 covers the more advanced features of the Java 2 platform that can add polish and power to your Java programs. The authors’ accessible–yet thorough–coverage of essential Java APIs help make this book an attractive choice for any working Java developer.

Several chapters here are especially useful for getting control of new and important Java 2 features. Sections on the new Java 2 collection classes and using advanced Swing classes (like tables and trees) are particularly good. (While many other books just list Swing APIs, this volume provides short examples and effective commentary, which will let you master these complex Swing controls.) When it comes to Java2D graphics, the authors do a nice job of comparing the old AWT to the new Java2D, including drawing basic shapes and doing text output. (These operations are surprisingly tricky in this new API). A section on the new JDBC 2 standard shows off new features like ResultSets and scrollable cursors to good effect.

More advanced topics include multithreading, internationalization, and security. Throughout, this text introduces important concepts illustrated with comprehensible examples. The APIs for individual classes are listed too, making it possible to use this book as a reference, but it is the tutorial sections that stand out here. (The authors also aren’t afraid to point out where Java 2 is lacking–for example, in its printing support.)

Readers of the first volume will naturally want the second volume of Core Java 2 too. It’s also a great choice for any Java developer with JDK 1.1 experience who wants a tour of new Java 2 features that are essential for serious corporate development. –Richard Dragan

Topics covered: Java 2 advanced APIs, multithreading and synchronization, Java 2 collections, networking, databases and JDBC 2 (cursors and result sets), RMI and remote objects, Swing user interface classes, printing, tables and trees, JavaBeans, security and deployment, internationalization issues, JNI and native methods. –This text refers to an out of print or unavailable edition of this title.

Book Info
Provides advanced topics and real-world code for experienced developers, a thoroughly revised coverage of multithreading, networking, JDBC API, remote objects, and fully updated and tested code for the Java 2 platform. Softcover. CD-ROM included. –This text refers to an out of print or unavailable edition of this title.

Naming Convention bookmarks: .Net & Java

January 23, 2008

Naming conventions are very important in programming stantards;.Net and Java have some common basics, and some big differences.It you work mainly or only with one of them, you may want to know where they differ.Here are 2 bookmark to naming conventions.NET Framework Developer’s Guide Guidelines for NamesJava Naming Conventions

Technorati tags: Java, .Net, Naming Conventions