≡ Menu

Java VM Issues While Installing Eclipse Neon on macOS Sierra

When installing the Eclipse IDE, one must be running a version of the Java Virtual Machine (JVM) that is compatible with the version of Eclipse that is being installed.

I was trying to install Eclipse Neon on macOS Sierra, which is the most recent major release. Sierra ships with Java, but not the version which is required by Neon, which is 1.8.

As a result, upon trying to install Eclipse Neon, you will likely see a box that looks like this (except it will say 1.8 rather than 1.7):

unsuitable JVM

Though there are multiple ways to upgrade Java on the Mac, it seems getting it from Oracle is the only one that works from what I’ve seen.

To upgrade the JVM on macOS to 1.8, go to the Oracle Java SE Runtime Environment downloads page and get the file for Mac; I prefer getting the dmg package file:

Java SE downloads page

Install the Java SE package like any other Mac application and Eclipse can then be installed.

Connecting to Oracle 12g with the Instant Client and Excel VBA

One rather old application I’ve supported for several years loads data from Excel spreadsheets into a reporting database. These Excel spreadsheets have always been manually updated by several users. However, because the data that the users are entering into these spreadsheets are first being entered into another separate application database, these users have been doing double-entry – a redundant process which can be easily remedied by various means.

Ideally, the solution for this problem would be to extract the data from the application database and load it into the reporting database using an SSIS package. Unfortunately, that would require some redevelopment of the application which loads data into the reporting database, and we (and the customers) have no bandwidth for that. So I came up with a quick workaround that made everyone happy – using a VBA macro to automatically populate the spreadsheets with data when the users open them.

The tricky part here was getting Excel to connect to Oracle with the least amount of work having to be done on the users’ PCs, which are remote from my location.

First of all, since these users don’t require SQL Plus or any development tools for Oracle, the full client software was unnecessary. Also, the Oracle Instant Client could be pushed to the users with Altiris Deployment Solution.

I had the Instant Client software installed on the PCs, then I added the requisite database connection information to the tnsnames.ora file.

Nota bene: In the Instant Client (or at least in our setup, using version the tnsnames file is in
C:\oracle\instantclient_11_2_0_4 rather than in C:\oracle\product\\client_1\NETWORK\ADMIN as it often would be in the full Oracle client.

The connection in VBA was simple enough, but not immediately obvious – notice that the connection string includes “Microsoft ODBC Driver for Oracle” rather than an Oracle driver; even though this is used, no ODBC connection needs to be set up in the ODBC Data Source Administrator. It is only imperative that the proper entries exist in the tnsnames.ora file, and that the Microsoft ActiveX Data Object Library is installed and referenced in Excel. (Add References by navigating to Tools –> References in the VBA editor in Excel.)

Excel References

In a subroutine, this code was used to connect to the database and pull data.

    Dim SQL_String As String
    Dim dbConnectStr As String
    Dim con As New ADODB.Connection
    Dim recset As New ADODB.Recordset
    Dim strUid As String
    Dim strPwd As String
    Dim strEnv As String
    Dim strDSN As String
    Dim iRow As Integer    

    strEnv = "prod"
    strUid = "username"
    strPwd = "password"

    If strEnv = "prod" Then
        strDSN = "(prod database net_service_name* from tnsnames)"
        strDSN = "(dev database net_service_name* from tnsnames)"
    End If
    dbConnectStr = "Driver={Microsoft ODBC for Oracle}; " & _
            "Server=" & strDSN & ";" & _
            "uid=" & strUid & ";pwd=" & strPwd & ";"
    con.ConnectionString = dbConnectStr    
    SQL_String = "(insert SQL query here)"
    recset.Open SQL_String, con

    iRow = 0 
    Do While Not recset.EOF
         'Have a loop here to go through all the fields
        Sheet1.Range("A" & iRow).Value = recset.Fields("colname") ' colname = Column Name from SQL query
        ' &c. ...

        iRow = iRow + 1


* net_service_name

DataCamp for Learning Data Science

I have long been a fan of sites that use gamification to teach technology-related skills such as programming languages and database concepts.

I have used various free sites (such as Codecademy and Khan Academy) and premium sites like Code School. Each of these sites have strong and weak points, but all of them have been useful to some degree, and well worth the time and money (when necessary) invested.

A new site that I’ve just recently discovered is DataCamp. This site teaches both R (with which I currently have very little experience) and Python (which I’ve used much more extensively) as they are used for data analysis, especially in the realm of Big Data and data science. This site is not free; it currently costs $300 per year or $29 per month. I have signed up and will begin learning R. As I progress, I’ll report my thoughts on the site – especially as to its value, both from a monetary and time cost perspective.

Relation Between Games and Studies
Co-produced by :Game Period & Deep In The Code
Article from GamePeriod.com

PSA: Be Wary of Unsolicited Business Loans and Other Offers of Money

This is my first post that is completely unrelated to the topic of software development or information technology, but I decided to write this public service announcement since anyone who runs a website is likely to be targeted by these types of scams.

Over the last several days, I have received numerous calls per day from a phone with a New York City area code: 347-352-7696. The caller always identifies himself or herself as representing a company called “MCE Financials”. No company by that name shows up in Google, so my suspicion about their legitimacy as a business is confirmed.

In each case, the caller does not know my name, but mentions the name of this website, and then says they can make me a business loan. If I say “I’m not interested” or “put me on your Do Not Call list”, they hang up with no response – usually before I can finish my sentence – and then call back a few hours later with the same routine. A truly odd scamming technique, especially since they call back from the same number each time.

I ran the phone number through 800Notes to see if anyone else had reported them. A few other people mentioned experiences similar to mine.

Since I never told them I was interested in anything they had to offer, I never got to the stage where they would have asked about bank account or Social Security information. I imagine that would have been the next step.

Should you be confronted with these unwanted calls, and you live in the United States of America, you can report them to the Federal Trade Commission. Even before that, make sure that your number is on the National Do Not Call Registry.

FTC phone scams page