How to Start a New Project in Java and get it working with Object Editor For Comp 14 in the Labs Start Microsoft Visual J Select File New Project You 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 somewhat descriptive 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 There are 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 exe Add the following to the text box labeled Arguments bus uigen ObjectEditor Make 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 classpath C program files java oe lib swingall jar C program files java oe lib oe jar C program files java oe lib shapes jar To 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 programming
View Full Document