UNC-Chapel Hill COMP 14 - How to Start a New Project in Java and Get It Working with Object Editor

Unformatted text preview:

How to Start a New Project in Java and get it workingwith Object Editor (For Comp 14) in the LabsStart Microsoft Visual J++Select File… New ProjectYou will see a dialog box as follows:You need to choose a name for your project and a path to store it in. Preferably the name will be somewhatdescriptive of your program. The location should be somewhere on the H: drive. This is your personal space, and is accessible by you and only you from any computer in the lab. For a project named TemperatureConverter, I would recommend using “H:\comp14\TemperatureConverter” as the location.Make sure the name and location are correct, then click on the Open button.Visual J++ should now look something like this:Look at the Project Explorer window. You should see that you have a solution with one project in it. Thereare no files in the project.You need to either add some java class files that you have already written to your project, or create some new ones. But first, let’s set up your project to use ObjectEditor.Click once on your Project Name in the project explorer Window. Then Click on the Project Menu. The last item in that menu should be <Your Project Name> Properties… Click on it. You should see a window that looks something like this:There are a few changes you want to make, and they are already done in the above screenshot.About 2/3 of the way down the window there is an option button that says Custom. Click on it.Below that, there is a text box with the label “Program:”Change it’s contents from WJView.exe to JView.exeAdd the following to the text box labeled “Arguments:” bus.uigen.ObjectEditorMake sure you include the correct capitalization.Click on apply if you like, to save the changes. Near the top of the window is a row of tabs. Click on the fourth one, which says “Classpath”.You need to add the following three jar files to your classpathC:\program files\java\oe\lib\swingall.jarC:\program files\java\oe\lib\oe.jarC:\program files\java\oe\lib\shapes.jarTo add one of these files, simply click on the new button and type in the filename, then hit enter. If you get a message that says that classpath was unavailable and asks you yes or no, then you typed it in wrong or your computer isn’t set up correctly. Hit no, and try again, making sure you type in the filename correctly. Repeat this process for the other files three files. When you are done the window should look like the screenshot on the following page:Click on OK.Now you need to add some java class files to your project. These are the files with your code.In the project explorer, select your project by clicking on the project name. Click on the project menu, and select Add Class…You should see the following window:If you need to create a new file, type in the filename for the new file in the text box that says “Class1.java” This needs to be the same as what you are going to name the class. In other words, if you are writing the TemperatureConverter class, type in “TemperatureConverter.java”When you have typed in your filename, Click on Open.If you already have a file with some code in it that you have written for this assignment, click on the existing tab at the top of the window. Find your file, and click on open. If you have problems with this it’s probably best just to create a new file as described above, and then copy and paste the information from one file to the other.Now you can get down to


View Full Document

UNC-Chapel Hill COMP 14 - How to Start a New Project in Java and Get It Working with Object Editor

Download How to Start a New Project in Java and Get It Working with Object Editor
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view How to Start a New Project in Java and Get It Working with Object Editor and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view How to Start a New Project in Java and Get It Working with Object Editor 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?