Steve Campbell

Ranch Hand
+ Follow
since Dec 18, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Steve Campbell

Everytime I use the "Add Class Folder" option, the "Ok" button never comes on to allow me to close the dialog box. I'll look further into this option if this is the correct way to do this.
When I click on "Add Class Folder", it show mw the 2 projects I've created with this tool, one of them being the project to which I want to add the path to the class. Since the .class file is along another path, I then clicked the "Create New Folder", then "Advanced", then I checked the "Link to folder in the file system" checkbox, and bring the folder.
I was typing in the above commands, and now it's working.
Thanks for you help,
Steve
I thought I had it figured out, but....
I have a Java program (without a package statement) which references a class which is in a package. Using NetBeans I'm able to use the code in the class (for which I don't have the source code, only a .class file).
When I try to use Eclipse, I'm having a problem using the .class file in the project. In Eclipse I added a variable (under Windows / Preferences) which pointed to the base of the package. I then added this variable into the Project (using project properties). No matter how I tweak the variable path, or try every different way, I'm unable to reference the class in the .class file. I've read through the help file many time to no avail.
Does anyone know how to do this?
Thanks,
Steve
I just got it working. I still need to play around with this tool (Eclipse) to try to figure out the quirks.
I'm trying to create my first program using Eclipse (just downloaded 2.1). I have a .class file (given to me without any source) which I'm trying to reference. I created a .java file without a package name and will instantiate the class in the .class file. The .class file has a package name of com.xx.yy.
I've tried to bring it in using "Import" and the Java Build Path. I went thru the tutorial & help files, and tried every combination of things I could think of. I got this working using NetBeans, but wanted to see how easy this is using Eclipse. Under NetBeans I didn't need to import the .class files since the Java program I created already had the same package.
Can anyone help me get this working?
Thanks,
Steve
I'm able to use the thin client to connect to the db, but can't figure out the syntax for connecting using TNS. Our db group here has put the TNS files onto a common server, and instucted us to us the TNS name only. It works ok using Toad, and when I write C# programs I don't have a problem.
Does anyone know how to connect his way?
Thanks,
Steve
Thanks for the info. I think I may try the Jar within a Jar.
Thanks,
Steve
16 years ago
This may be more appropriate for the IDE's section, but I took the TableExample Java programs from the j2sdk folders, and created a project in Eclipse. I was able to add the correct files to make it run properly in Eclipse.
My question is when I create a Jar file in Eclipse (or any IDE), would I create a reference to the external jar file containing the Oracle db drivers in the project, and try to distribute it as part of the Jar file, or, if I wanted to distribute to coworkers, would I have to modify the classpath variable on their machines for my Jar file (in addition to the Oracle Jar). I wasn't able to figure out how to add a Classpath line in the Manifest file in the Jar file using Eclipse.
How do people usually do this?
Thanks,
Steve
16 years ago
That fixed it. Thanks for your help!
Steve
16 years ago
I'm trying to use the TableExample.jar which is part of the j2sdk samples (in jdk1.4\mode\jfc\TableExample).
I downloaded the latest oracle thin driver and created a classpath statement (in Windows XP) of "c:\oracle\ojdbc14.jar".
When I try to execute (via dos command box) using: java -jar TableExample.jar, The dialog window pops up, and I enter the name, password, db url (jdbc racle:thin:@eaidev1:1527 evexe), and driver (oracle.jdbc.driver.OracleDriver).
I get:
Cannot find the database driver classes.
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
Can someone please tell me what I doing wrong?
16 years ago
I already have a try / catch block around the code with a generic "exception" catch last. Whenever I have these types of problems, the application completely halts on the instruction that is executing. I can get a dialogue box to pop up prior to the instruction, but any dialogue box in any exception is never displayed.
I use an editor and compile my programs in a command window (I use Windows 2000). Perhaps if I used an integrated environment I could figure the problem.
18 years ago
Thanks for the reply!
I wrote a java application which opens a URLConnection to send data to a servlet under Webstart. One of the problems I have is that when something like this doesn't work, my application just stops working without any error messages. I end up putting "JOptionPane.showMessageDialog" statements before and after the instruction to ensure that this is the failing statement.
For some reason my program "stops" when "sQuery = URLEncoder.encode(sQuery1, "UTF-8" );" is executed.
I'm certain that others will run into this in the near future when they try the new syntax.
18 years ago
Thanks for the reply!
The previous version didn't include the encoding as a parameter.
The problem is that when I include the encoding Sun recommends (UTF-8), the line errors out.
The question was: does anyone know if the way I formatted the instruction " URLEncoder.encode( string, "UTF-8" ) " is correct. Should I hardcode the encoding parm the way I have listed it in the example?
18 years ago
I just loaded the new jdk 1.4 and when I compiled an existing program, the URLEncoder.encode(string) came up as deprecated. I tried to change it to their suggesion - URLEncoder.encode( string, "UTF-8" ).
This doesn't seem to work properly. Has anyone already done this conversion and can help me understand where I went wrong?
Thanks
18 years ago
There are several examples contained within the JDK. If you look under "demo\jfc\TableExample\src" at the .java files you should find what you need.
18 years ago
Check out the SimpleDateFormat class.
18 years ago