Netbeans importing projects from github - java

I am trying to build this demo program (github and website below) in netbeans. I cannot seem to get it to run properly. How do i go about importing both SQLInject and SQLInject1?
SQLInject1 gives errors regarding build.xml ant files.
How do i create these projects in netbeans properly?
https://www.javacodegeeks.com/2012/11/sql-injection-in-java-application.html?fbclid=IwAR10XX-PWMdRdhyQfce_613kmhszUZxj_gyg3h_0VJmY1dgXEAss8Ksuhcc
https://github.com/ramkicse/Sql-Injection-in-Java

First, install git. You can do that here: https://git-scm.com/downloads
Then, clone the desired repository. You can do this by opening a git Bash shell and executing this command:
git clone <the repository here>
For example:
git clone https://github.com/ramkicse/Sql-Injection-in-Java.git
Then, open the project in NetBeans. This can be done by following the "Setting Up a Java Project Based on Existing Sources" instructions described here.

Related

How to configure a project imported from GIT to be a Java project in Eclipse?

I've imported a project from Git in Eclipse using this method:
File > Import > Git > Projects from Git > Next > Clone URL .
At this point I inserted the URI like this https://github.com/mygituser/My-Project .
Then my user and password, and the project was imported.
The problem is that Eclipse didn't recognize it as a Java project, and I really don't know why.
As consequence, I can't see errors or warnings on my project and neither use autocomplete, I'm getting this message "This compilation unit is not on the build path of a Java project".
Also, right click on My-Project > Build path shows the message "No actions avaliable".
If you need more information to help me, could you ask me on comments, please?
I appreciate your attention!
Most people don't include build files in repositories, only source. What you need to do is create a new Eclipse project the create a Git repo on top of that:
Create a new Eclipse project, and go to it with your terminal.
git init to initialize a repo.
git remote add origin https://github.com/mygituser/My-Project to add the remote.
git pull -u origin master to pull the changes.
Also, make sure that when you commit, you don't add build files that the author kept out. You can do this via a .gitignore file. Simply take this file and add it to your project directory.
This method applies to most Git repositories, as build and compiled files are usually left out.
Note that this method requires that you install Git for command line (or Git Bash). You can get Git at their website.
Since you already have the source code downloaded from the git repository, you should be able to create an Eclipse project from the existing source code.

Trouble creating Eclipse/Java projects from Git repo

I am brand new to Git and EGit. I have been asked to troubleshoot a project stored in a Git repo located at http://com.myorg.gitrepo/githome/myapp.git.
First I tried just doing this on the Git command-line. From a terminal, I executed:
git clone http://com.myorg.gitrepo/githome/myapp.git myapp
The command was successful and I can now see a project checked out under /home/myuser/myapp (I'm on Ubuntu 14.04).
Now I'm trying to load the checked out project into Eclipse as a Java project. Here are the steps I'm taking:
1. Right-click Package Explorer>> Import >> Git >> Projects from Git >> Next
2. Existing local repository >> Next
3. Select `myapp` project to import >> Next
4. No project found!?!?
As you can see, EGit is looking for some config that isn't there, or perhaps I'm just using it incorrectly.
My questions:
What am I doing wrong, and what can I do to fix this and get the project imported?
How could I improve this process in the future, by using EGit to do the initial clone (bypassing the need to use the raw Git command line)?
Are you sure the project you are importing contains the files eclipse uses for project management?
How does the .gitignore look like? Does it include .metadata/, .project/ for example?
If it does, it means that repo is configured to ignore the configuration files eclipse uses for managing the project, and you should use the wizard to create the project.
I think it is considered good practice to not include any editor specific files in the repos, as these cause a lot of conflicts, and the project shouldn't really depend on the editor like that anyways.

Android- How to clone a git repo and init submodules

I am trying to complete the Google Android Sample App - DrEdit. See link: DrEdit Google Android App.
My question: How do I "Clone DrEdit's git repo and init submodules"? It is step 2 in the link. Please advise. I am using Eclipse. Also, I am a new to Android.
What I've tried: I've opened Eclipse, then clicked on Window->Open Perspective->Other->Git Respository Exploring->Clone a Git Repository. But I am not sure where to go or what to enter from there.
Please help.
run the follinw in your command line:
git clone https://github.com/googledrive/dredit.git
cd dredit
git submodule init
git submodule update
I guess, there are equivalent buttons in egit. But I never used it. Command line is more intuitive for git.
In the end, you need to import/create the eclipse project from the folder created above.
you've just to execute git submodule init and git submodule update after cloning your project.

Trying to move GIT Project from IntelliJ IDEA to Eclipse with EGit?

My firm is making me move back to Eclipse and I am trying to move GIT Project from IntelliJ IDEA to Eclipse with EGit?. The issue I am having is that I access my project from the command line with the following command:
git clone git#git:common.git
That's how I clone it and then I just work in IntelliJ without a issue, In Eclipse with EGit I am getting the following screen and every setting I am trying down work
Can someone please tell me based on the command line what options I should be using.. thanks
I've always had problems cloning via EGit. Here's what works for me:
Clone via the command-line as usual.
Create or import your project into an Eclipse workspace.
Right-click the project in the Navigator or Package Explorer.
Team > Share Project > Git > Next.
Since there will already be .git repo there, select 'Use or create repo in parent...".
Finish. Give it a few seconds and you should see your project files decorated with Git repo information.

IntelliJ Plugin Dev - Cannot prepare plugin for deployment

I am trying to download the source of an IntelliJ IDEA Plugin (for JBehave integration) from a github repo, and basically build it into a jar, which I can distribute to my team (which they can then drop into their plugin directory for installation).
What I have done so far:
configured the IDEA SDK (I downloaded the source for latest version of the community edition and built it)
Downloaded the source from the repo via zip, as well as git clone
Created the project from scratch, as well as trying to "Import"
Ran mvn install in the command line, ran "Make Project"
Then I looked for the command (according to this tutorial) to
Build | Prepare Plugin Module for Deployment.
As you can see, the command is not there.
What am I doing wrong? I have tried fiddling with the project/module settings ad nauseum and I feel like I'm getting nowhere.
It seems like I was using an outdated version of IntelliJ (10.5). I ran IntelliJ Idea 12, and I created the project IntelliJ Platform Plugin (as #CrazyCoder suggested). From there I was able to build it.

Categories

Resources