Java program run in Mac PowerBook
News No Comments »Yesterday, Sam brought his G4 PowerBook to office to try out some new things. He bought a Java book and wish to learn how to program in Java and run on Mac. Since Sun claim that Java support multi platform, so I also wan to try out one of my Java program in the Mac machine.
First try:
Execute one of my executable jar file in Mac. It pops up error and ask me to check the console for error. But there is no console!
Second try:
Compile my source file and run. Compilation is successful but when it run it shows error. At the end, I found out tat there is no JFrame.setDefaultLookAndFeel(true); in Mac!
Third try:
Commented setDefaultLookAndFeel line and compile
again. No error during the compilation. When it run the program it
shows error, "Class not found: sun:jdbc:odbc". After double check on
it, the error come from one of the error exception occur while
connecting database. So I went to java forum and search if there is
anyone has the same problem with me. The answer is Mac do not come with
the Free ODBC driver. You need to pay for the ODBC Driver.
At the end, I installed the mysql on that power book. Suprisingly, the
installation is so easy and the binary setup file is very small compare
to window setup file. Although I’ve setup the mysql, i havent have time to try out whether it come with the connection driver.
Hope sam will bring his Power Book next Monday and we can find out more about all this funny issue 🙂
Recent Comments