I have tried every possible form of the CLASSPATH system variable including the path to another version of mm_mysql-2_0_4-bin.jar to no avail. My problem is something other than the CLASSPATH.
Thanks....
User Profile
Collapse
-
Program can't find class in .jar file
I have a Java program that is deployed as a .jar file in which is another .jar file with the mysql library. Here is the appropriate section of code:
...Code:/** * Makes the connection to the database. */ protected static Connection makeConnection() { try { Class.forName("org.gjt.mm.mysql.Driver"); database = DriverManager.getConnection( dataBaseName, -
Thanks, this will do. I can live with templates in the header file. I just wish I knew why the nongeneric code wouldn't separate. I just can't stand loose ends....Leave a comment:
-
Dividing a namespace into declaration and elaboration parts
We started out using Tornado because it worked with 5.4 and the Motorola M68040 board. Other programmers on this project had been using Tornado with ADA on a companion system. I didn't put much effort into Tornado because I knew I would have to use Workbench when we converted to the PPC board and vxWorks 6.3. I began coding my section using Eclipse, CDT, and mingw on a...Leave a comment:
-
I am using the gnu complier for the PPC604 which creates a partially linked object. Final linking happens during load. The IDE is Eclipse 3.1.2 using Wind River Systems Workbench 2.5b plugins. The target system uses vxWorks 6.3....Leave a comment:
-
Adrain:
I tried both methods you suggested, putting elaboration code in a .cpp file. It compiled fine, but failed to link. There must be some step I am leaving out....Leave a comment:
-
Dividing a namespace into declaration and elaboration parts
I have this namespace which works fine if I put everything in the header file:
...Code:namespace util { float getFloat(char* buf, int from); bool getBool(char* buf, int from); short getShort(char* buf, int from); float getFloat(char* buf, int from) { buf+=from; float tempVal; memcpy(&tempVal, buf , sizeof(float)); return tempVal; -
I am getting data from the user interface (a Java program running on a PC) via TCP. When I received Mach which I know to be 0.63, the routine displayed 63. The altitude was 24905, but displayed 70.
I finally got it to work using the following:
...Code:float IcInterface::getMach() { return getFloat(buffer_, 0); //mach } float IcInterface::getAltitude() { return getFloat(buffer_,Leave a comment:
-
I couldn't get past:
float mach = float(*inBufr);
I tried casting, but didn't get any farther. Moving the data into an array didn't help either. The only one that worked was:
bufrPtr = reinterpret_cas t<bool *>( inBufr );
But it only casts a char to bool....Leave a comment:
-
Combining char array into other data types
It's me again:
I have to write some classes that have a pointer to chars and must combine them into other data types. For example:
Every method I tried gave me a run-time error on the target machine (a PPC...Code:void IcInterface::setData(char *inBufr) { float mach = *inBufr; inBufr += 4; float altitude = *inBufr; inBufr += 4; short runwayNumber = *inBufr; } -
The professor and I have looked at this other post several times. Althought it looks similar, there are perhaps several differences. Here is my caller:
...Code://Check if the socket is connected if (commandClient->isConnected() == true) cout << "connected to port 3940 by client "<< commandClient->getClientAddress() << endl; else cout << "Not connected
Leave a comment:
-
I finally got my 15 or 20 minutes on the target. After adding the reserve instruction, the result was the same. The professor suggested I loop a back_inserter, but this seems an ugly solution. I want copy to work. What should I look for that is screwing up my copy?...Leave a comment:
-
He's not my inststructor. I call him the professor because he teaches at the local college. I am an old assembly language programmer forced to write C++ code. About half of the suggestions he gives me don't work. We are on this task together. Of course, the code with the reserve instruction compiles; this is a run-time error and I can only check it out in the lab, on the target machine. I am concerned that, even if the revised code works, it...Leave a comment:
-
Do I need to size a vector before copying.
I am getting an alignment error when I copy data from a buffer into a vector.
The professor tells me I need to use reserve (size_type n) to set the size of the vector before copying. Is this necessary?Code:std::copy(inBufr, inBufr+(size * sizeof(WindsTableElement)), windIterator_=wt_.begin());
Thanks in advance. -
Thanks, your analysis was partially right; it set me on the right track. I defined the problem code above the class definition. I moved this:
inside the class definition. The typedef defining WindTable had to remain where it was. I am not sure why, but now it works....Code:WindTable wt_; WindTable::iterator windIterator_;
Leave a comment:
-
That's what I would have thought, but a search shows that these variables only show up in one .cpp file....Leave a comment:
-
Problem defining vector iterator
I have defined a vector and its iterator as such:
I get no errors during compile, but during linking I get:Code:typedef std::vector< WindsTableElement > WindTable; WindTable wt_; WindTable::iterator windIterator_;
What am I doing wrong?
Thanks in advance.... -
This site isn't much help as my problem is with the VxWorks libraries. I am hoping somebody on the forum knows of a VxWorks specific socket class.
I will keep looking.
Thanks for your help....Leave a comment:
-
VxWorks socket class
Hi All:
I need some help with TCP sockets on VxWorks.
Does anybody know of a C++ socket class that works on VxWorks. This would be dead easy with Java, but management over my objections, decided to use C++ and I have to make the code work.
All help is appreciated. -
Incrementing a pointer
Here is the error mesage:
d:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stl_algobase.h: 247: error: no match for 'operator=' in '(&__result)->std::ostream_i terator<_Tp, _CharT, _Traits>::opera tor* [with _Tp = float, _CharT = char, _Traits = std::char_trait s<char>]() = *__first'
d:/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/stream_iterator .h:192:...Leave a comment:
No activity results to display
Show More
Leave a comment: