Writing_a_Java_Component.docx

looneyvillestaticΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 4 χρόνια και 4 μήνες)

280 εμφανίσεις

Derek Hearn

Writing a Java Component:

I installed Netbeans. It looks like a decent IDE. I got a running program and now I begin making my java
component. I plan to somehow integrate this with my calculator experiment. I started my project and I
had no
idea how to connect the project to the needed librarie
s from T
race
L
ab. I poked around through
the Wiki and I didn’t find anything that
told me what to do. I questioned what this IKVM was and if it
was a necessary first step. I went to the IKVM site and I s
till don’t know what it’s supposed to do for me.
I did not download it because I don’t know why I would want to
.

Once you get to the bottom of the page
you realize why you want this program, but the user is told to download it without

first

being told why.

I downloaded the sample java component after giving up on making one from scratch. Netbeans pointed
out what different references were missing and exactly what they were called. I searched around in my
computer to find the proper references and through th
e tools within Netbeans.

I’ve been editing the sample to recreate my importer for my calculator. I hit a big problem though. I
have no idea how to tell the component that it will Import a String.

Annnd I just figured it out. It was a
missing import and Str
ing.class. So now that’s working. But now for a quick refresher on java file IO.

And
that should do it. Now I need to make my .jar file. How do I do that? Ok I
compiled it. The .jar file should
have been

made. Now to find it =/ I can’t find it.

Ok, it wasn
’t made. After installing IKVM… kinda
installing it.

I’m not sure if there was anything else to do. I d
idn’t know what exactly to do with that. I got
the build to… make the jar file. The build failed because it couldn’t find the .dll that ikvm is supposed
to
make. I’m so confused. Ok so I need to use the one compiler. I’m guessing I need to use the cmd line for
this program.
After not getting the cmd line to correctly find the files (Problem on my end),
I went
upstairs and asked for help
. Adam came down and

showed me the
Ant script

that I needed to change.
After the broken references were fixed within the Ant script the .dll was build and the component
worked perfectly within tracelab.

The wiki was confusing in regards to building the .dll.

After understand
ing what I needed to do with the Ant script, making another component was simple.

The first component is a large hurdle for the user at this point. The task seams daunting at first and each
drawback makes it harder for the user to want to continue. Once th
e user makes their first component
the next ones become extremely easy. A step by step video tutorial would be extremely helpful for the
user.