Stellar offers path-payment.
This means that an user can trade ASSET1 directly to ASSET2 in 2 case:
There is a specific trading pair ASSET1/ASSET2 in Stellar Decentralized Exchange
There is a "trading path" available for the 2 asset specified (ASSET1/ASSET_X -> ASSET_X/ASSET2)
You can look to official documentation and found an example that directly ...
The other two answers are totally correct, but I wanted to add some color.
Technically, you can create a path payment in Stellar to trade assets using any bridge, but generally you need to use a bridge asset that has some kind of value. So, just issuing an asset randomly and "putting it out there" would technically function as a bridge, but what does that ...
You can trade any asset for another when a matching offer exists.
It is also possible to do cross-asset payments with up to 6 different hops.
This process of finding the best path of a payment is called pathfinding. Pathfinding involves looking at the current orderbooks and finding which series of conversions gives you the best rate. It is handled ...
It sounds to me like you are unfamiliar with the available methods in the SDK. In addition to what Orbit Lens said, you'll need to create a transaction, sign it, and then submit it to the network.
Because there aren't very many step-by-step examples out there, I'll try to "solve" this for you.
Starting with the Asset. Assuming you correctly issued an asset,...
The ledger is a collection of entries. Currently there are 4 types of ledger entries. They’re specified in src/xdr/Stellar-ledger-entries.x.
This entry represents an account. In Stellar, everything is built around accounts: transactions are performed by accounts, and ...
Have you checked the Java SDK docs?
But createNonNativeAsset requires an KeyPair object. So, I'll need to find the issuing public ID of whatever asset I want to trade, and make a KeyPair?
Yes, any custom asset in the Stellar network is described by code and issuer public key. Actually, there is also an asset type (AlphaNum4 or AlphaNum12), but the ...