Gerard Gauthier

Ranch Hand
+ Follow
since Mar 19, 2019
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Gerard Gauthier

First I would break this task down into smaller steps.

1. Write a program that prompts the user for a string.
2. Update program to accept and save string into a variable.
3. Update program to loop through the string displaying each character.
4. Find a way to skip every other character while looping through string.
4 years ago

Paul Clapham wrote:Nitpick:

Gerard Gauthier wrote:This question is aimed at Java programmers who have experience with the language...



But "greenhorns" are "beginners", so your question wasn't aimed at them.



Yes question wasn't aimed at them but the answers were.
4 years ago

Stephan van Hulst wrote:What's wrong with the Maven in 5 Minutes guide and the Getting Started guide?



There is nothing wring with them. I learned plenty but they start with mvn archetype:generate.... and as you said you can start you projects from scratch or without calling a prebuilt archetype.
4 years ago
I'm new to Java but I'm not new to programming and I'm wondering what areas of Java programming do rookie Java programmers tend to overlook or not give enough attention to?

This question is aimed at Java programmers who have experience with the language and writing real Java programs.Hopefully the answer will help us rookies on certain overlooked topics.

If I had to choose one area that surprised me with its lack of coverage in the intro materials -> the class path. I'm surprised how much(implicitly and explicitly) class path shows up in real java programs. Its everywhere but intro materials don't really emphasize its importance.


4 years ago

Stephan van Hulst wrote:I don't know what the purpose of the archetype is. When I looked at the directory structure it generates it seems pretty useless to me.

I never really use archetypes. I suggest you learn the Maven POM reference and set up your projects manually. It's not very difficult.



I started doing some introductory reading on how Maven expects directories and files to be set up... And you are right. It's not very difficult to set up your own projects but it is very tedious and takes a lot of reading.

I'm surprised they(Apache Maven) don't have a Maven tutorial called from the ground up -> Building your own Maven projects <-.  
4 years ago

Monica Shiralkar wrote:

Gerard Gauthier wrote: areas of memory that can hold data.



What does areas of memory that can hold data mean. Even a string is also an area of memory that can hold data.



And a string is a data structure. A integer is a data structure.
4 years ago
Data structures are pretty much the same across languages.. They are(in the simplest terms) areas of memory that can hold data.
4 years ago

Stephan van Hulst wrote:I don't know what the purpose of the archetype is. When I looked at the directory structure it generates it seems pretty useless to me.

I never really use archetypes. I suggest you learn the Maven POM reference and set up your projects manually. It's not very difficult.



Well I'm very new to Maven and its a little overwhelming right now... Maybe when I get a little traction in the topic.

BTW. The posted dependency worked. I dropped the war file into my tomcat server and it worked.
4 years ago
I hate to be that guy but....

Isn't the whole purpose of this web-app to compile and generate Java servlets and jsp's? You'd think that dependency would be a default.

Sorry for the gripes. Thanks for the help.
4 years ago
Here's the the pom.xml

4 years ago
Now its just a pile of errors when I call mvn package.



dir tree


What's wrong now? Do I have to add a class path or does this maven project know how to compile a servlet?
4 years ago
I'm using this site's example to build simple Maven webapp project:

https://maven.apache.org/archetypes/maven-archetype-webapp/

Now the above works but I want to add a servlet off the WEB-INF/classes folder and have that included in the war file. It doesn't compile the servlet and I have no idea why.

Here's my dir tree after I call mvn package



As you can see the MyHelloWorld.java did not compile and its the same in the Demo.war. Any pointers?
4 years ago
I'm just wondering if anyone has tried VS Code's Java plugin? It supports Maven too.

I used it(VS Code + Java plugin) but I didn't realize it also supports Maven too.

https://code.visualstudio.com/

Has anyone tried Maven with VS Code?
4 years ago

Rob Spoor wrote:... Just remember that any project using the dependency cannot be built by others that don't have the dependency.



So basically(since the dependency is local) I can only build I it on my machine. Right?

I kind of figured out how dependencies work by exploring my ~/.m2 folder and the pom.xml's dependency section.



I just walked into my ./m2 folder using the tags for junit as steps.
4 years ago
I just created a SnapShot and installed it on my local repository and now what? I can see it in my ~/.m2/repository folder but how do I use in my next maven project?

I want to call mvn archetype:generate and use my new SnapShot there but I'm not sure how to add it and import it into App.java.

Need some simple guidance. Hopefully simple.
4 years ago