Generating partner.jar for Salesforce API Integration

󰃭 2014-11-12

I ran into a small issue recently when setting up a Java project to use the Salesforce APIs.

Basically, you need to download a WSDL file from Salesforce, then use a tool made by them to generate a jar that you then include in your Java program.

They instruct you to download force-wsc.jar and then run it, but when you run it you realize they didn’t pack the dependencies within the jar!

To solve this problem, you need to download the following jars:

And then run force-wsc.jar, including the dependencies in the classpath:

$ java -classpath force-wsc-32.1.1.jar:js-1.7R2.jar:ST-4.0.7.jar \
  com.sforce.ws.tools.wsdlc partner.wsdl partner-32.1.1.jar

Please note these were the versions that worked for me. If your force-wsc.jar is a different version, check if you need to include other version of its dependencies.



More posts like this

Publishing an App on F-Droid

󰃭 2021-08-03 | #android #f-droid #tips #tutorials

I made some small apps for Android and I wanted to distribute them. I also care a lot about software freedom, so F-Droid is the best place for me to publish my apps. Disclaimer! You are not able to sell your app on F-Droid. If you want to make money with it, you would need to allow users to pay through another method. Please see this StackExchange question if you’re interested in monetization.

Continue reading 


Starfield visualization in JavaScript

󰃭 2024-08-31 | #canvas #javascript #programming-projects #tutorials

This is a simple, straightforward implementation of a visualization reminiscent of the classic Windows 95 starfield screensaver. It is also interactive: you can touch the screen or use the accelerometer to influence the direction of the movement. This is how it works: Create a bunch of particles (100), each in a random position. Every frame, move each particle further away from the center*. The further the particle is from the center, the more visible it will become.

Continue reading 