Way to compile the project

Hi,
what to choose below
https://dl.dropboxusercontent.com/u/40211031/tt199.png

to compile the project for having the .jar file?
LVL 11
HuaMin ChenProblem resolverAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gurpsbassiCommented:
makes no sense to me.
what do you exactly want to do? package your code as a jar file?
I would use something like Ant / Maven.
0
Kanti PrasadCommented:
Hi

I am assuming you copied the code into the IDE and want to compile \  run it

Look at the menu Run you will find the options

Below are some videos to show it

https://www.youtube.com/watch?v=mMu-JlBrYXo
http://eclipsetutorial.sourceforge.net/totalbegginer01/lesson01.html
0
HuaMin ChenProblem resolverAuthor Commented:
Kanti,
if I choose

Run Menu > Run

I get the following


3
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

HuaMin ChenProblem resolverAuthor Commented:
Any other help?
0
Kanti PrasadCommented:
Hi

To Compile \ Run
      You can click the triangular icon to run your program.
      or
      Press Ctrl+F11.
      or
       Click "Run" from the main menu  then select "Run" again in the drop-down.  

To create Jar files follow the below samples
      https://www.cs.utexas.edu/~scottm/cs307/handouts/Eclipse%20Help/jarInEclipse.htm
      http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-37.htm

To debug follow the below sample

      http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-37.htm


Sample video
      http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftasks-37.htm
0
HuaMin ChenProblem resolverAuthor Commented:
Hi,
I choose

Menu Run > Run

and then click "OK" below
3a
but I've got this
3b
0
Kanti PrasadCommented:
Hi

Please follow the below video and name you java file accordingly and copy your code and run it the same way the test program runs.

https://www.youtube.com/watch?v=23tAK5zdQ9c

If you want to run it with ant then follow the below steps but it is better to initially run your programs as above.

http://progrepo.blogspot.ie/2012/10/eclipse-unable-to-find-ant-file-to-run.html
0
HuaMin ChenProblem resolverAuthor Commented:
Hi,
How can I run the following?
6
0
gurpsbassiCommented:
right click >> Run As >> Java Application
0
HuaMin ChenProblem resolverAuthor Commented:
Hi,
I choose the path like
6fwhen accessing Eclipse Juno version

but then I get this
6gand do not have the way to choose the java file to run
0
gurpsbassiCommented:
In your previous post you wrote
How can I run the following?

In the screen shot there was a java class.

Why can't you right click on the contents of the editor? It should give you a context menu from which you can go run as >> java application.
0
HuaMin ChenProblem resolverAuthor Commented:
Thanks. I expect to run the highlighted java file below
6mhow?
0
gurpsbassiCommented:
point your mouse to the contents of the editor pane.

Right click and a pop up menu should appear
0
HuaMin ChenProblem resolverAuthor Commented:
Do you mean the following?
6mwhat to further choose in above?
0
gurpsbassiCommented:
hmm strange.

What happens when you click in the editor window and do CTRL ALT X ?
0
HuaMin ChenProblem resolverAuthor Commented:
Nothing happens if I click Ctl+Alt+X
0
gurpsbassiCommented:
something not right with you IDE set up. Not sure what.
Can you show the build path of your project?

Right click on project root > build path >  configure buildpath
0
HuaMin ChenProblem resolverAuthor Commented:
where to choose "project root" below?
6n
0
gurpsbassiCommented:
interesting. you don't even have a project.
How did you get the code into eclipse?
0
HuaMin ChenProblem resolverAuthor Commented:
Here is the project
6oand I do not know how to open it by Eclipse Juno version.
0
Kanti PrasadCommented:
Hi

Why don't just follow the steps in the below video and then create a java class instead of that Helloworld class and then copy your code and click the triangle button.

https://www.youtube.com/watch?v=23tAK5zdQ9c
0
HuaMin ChenProblem resolverAuthor Commented:
Sorry, the point is I have to follow the project and to have the way to run the current project.
0
mccarlIT Business Systems Analyst / Software DeveloperCommented:
You need to click File and then Import... and the Import an existing project. Then navigate to the parent directory that holds all the project files, and then it should show up in the Project Explorer, and then you should be able to follow the other comments to run the file.
0
HuaMin ChenProblem resolverAuthor Commented:
Many thanks. which file should I choose below to import?

6m
0
gurpsbassiCommented:
just do it through eclipse. Import existing projects into workspace. and select on the project root directory.
0
HuaMin ChenProblem resolverAuthor Commented:
can you please tell me what I should choose below, if I'm to do the import?

7
0
HuaMin ChenProblem resolverAuthor Commented:
Any other help?
0
gurpsbassiCommented:
Select General and then Existing Projects into Workspace.

then browse to the project root directory
0
HuaMin ChenProblem resolverAuthor Commented:
Sorry to that I've got the below issue

7b
when following your advice
0
gurpsbassiCommented:
Look at the recommended solution here
0
HuaMin ChenProblem resolverAuthor Commented:
I'm able to import the project and originally I have one .java file, within src folder, that is the one to start run the project.
7e
can you please advise, how I can refer to this .java file, in above?
0
gurpsbassiCommented:
open the java file like you did last time.
0
HuaMin ChenProblem resolverAuthor Commented:
previously the .java file was already open when I use the relevant project path as the workspace. But now within the current attached screenshot, I do not see the relevant .java file.
0
gurpsbassiCommented:
CTRL + SHIFT + T
will open up a dialog box.
type in the name of the java class.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HuaMin ChenProblem resolverAuthor Commented:
I only get the following
7gif I've pressed CTL+SHIFT+T
0
gurpsbassiCommented:
you have to type in the name of the class now.
Please don't tell me you don't know the name of the class. Otherwise no one can help you.
0
HuaMin ChenProblem resolverAuthor Commented:
Many many thanks.

I can refer to the file below.
7h
how to start to run the .java file below?
0
gurpsbassiCommented:
use the same instructions I gave you before.
Right click > run as > java application
0
HuaMin ChenProblem resolverAuthor Commented:
Sorry, the point is, within Project Explorer, I do not see such .java file.
0
HuaMin ChenProblem resolverAuthor Commented:
Sorry, the point is, within Project Explorer of the current attached file, I do not see such .java file.
0
gurpsbassiCommented:
I don't understand.
Are you saying you cannot search for class WQS_sfhkshop  in the dialog box?
0
HuaMin ChenProblem resolverAuthor Commented:
Many many thanks.

I can now run the .java file. And can you please advise to these errors?

Description	Resource	Path	Location	Type
Project 'WQS_sfhkshop' is missing required library: 'C:\Program Files\eclipse\plugins\javax.wsdl_1.6.2.v201012040545.jar'	WQS_sfhkshop		Build path	Build Path Problem
Project 'WQS_sfhkshop' is missing required library: 'C:\Program Files\eclipse\plugins\org.apache.commons.logging_1.0.4.v201101211617.jar'	WQS_sfhkshop		Build path	Build Path Problem
The project cannot be built until build path errors are resolved	WQS_sfhkshop		Unknown	Java Problem

Open in new window

0
gurpsbassiCommented:
For some reason those jars are not present in your eclipse installation. I've never had to touch these files before. Normally works out of the box with a new eclipse installation.
0
gurpsbassiCommented:
Can you go to Window > Show View > Problems from the main menu?
This will show if any compilation errors.
0
HuaMin ChenProblem resolverAuthor Commented:
Normally works out of the box with a new eclipse installation.

what do you mean?

I'm now directly call Eclipse, after I've unzipped the whole downloaded Eclipse tool file.
0
gurpsbassiCommented:
Normally works out of the box with a new eclipse installation.
I mean the plugins directory in eclipse normally has those jar files in it when you install eclipse.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.