Question OrbConnect Setup Questions

soundmackdaddy

New member
Joined
Dec 9, 2008
Messages
15
Reaction score
0
Points
0
hey guys,

I have been trying to install OrbConnect to my computer to test it out and was having a bit of trouble with it all. I am sure I am just missing a step somewhere but I have been following the instructions for the Java client setup. It says:

1. Download and Install the Java runtime (JRE). It can be downloaded from www.java.sun.com, specifically
https://cds.sun.com/is-bin/INTERSHO...?ProductRef=jdk-6u6-oth-JPR@CDS-CDS_Developer
2. Create an environment variable called JAVA_HOME. Point it at the directory where
you installed JAVA.
3. Add %JAVA_HOME%\bin (windows) or $JAVA_HOME/bin (*nix) to your path.
4. Go to the Orbiter plugins/OrbConnect folder and double click on OrbConnectClient.jar
Now I have downloaded the file specified in step 1 and installed it. I then went to create the environment variable. Now is that done by going Control Panel>System>Advanced System Settings>Advanced>Environment Variables then new (user or system?) variable named JAVA_HOME with the variable value being the file address to where I installed java. Now would that be the entire root folder, eg:C:\Program Files\Java or including the version number eg:C:\Program Files\Java\jdk1.6.0_06 ?

And at about step 3 I start to get a little more lost... When it says to add %JAVA_HOME%\bin to your path, is that adding to the value for the JAVA_HOME variable (ie: are path the same as a file address) or is it talking about the pre-defined User or System variables named 'Path' and adding this to the value for one of those variables. Or is that completely wrong?

Finally unless I have (quite possibly) made a mistake in the installation of OrbConnect, the OrbConnectClient.jar is only found in the Doc file rather than Modules>Plugin, which only contains the OrbConnect.dll. Is that right or wrong, and either way each time I click on it the computer requests that I specify a program to open the file.

If it helps I am running Vista Ultimate 32 bit.

Sorry for the long winded post, and if there are any other things I have missed please let me know. A pointer in the right direction would be appreciated.

Many Thanks,

Soundmackdaddy
 
hey guys,

I have been trying to install OrbConnect to my computer to test it out and was having a bit of trouble with it all. I am sure I am just missing a step somewhere but I have been following the instructions for the Java client setup. It says:

Now I have downloaded the file specified in step 1 and installed it. I then went to create the environment variable. Now is that done by going Control Panel>System>Advanced System Settings>Advanced>Environment Variables then new (user or system?) variable named JAVA_HOME with the variable value being the file address to where I installed java. Now would that be the entire root folder, eg:C:\Program Files\Java or including the version number eg:C:\Program Files\Java\jdk1.6.0_06 ?

And at about step 3 I start to get a little more lost... When it says to add %JAVA_HOME%\bin to your path, is that adding to the value for the JAVA_HOME variable (ie: are path the same as a file address) or is it talking about the pre-defined User or System variables named 'Path' and adding this to the value for one of those variables. Or is that completely wrong?

Finally unless I have (quite possibly) made a mistake in the installation of OrbConnect, the OrbConnectClient.jar is only found in the Doc file rather than Modules>Plugin, which only contains the OrbConnect.dll. Is that right or wrong, and either way each time I click on it the computer requests that I specify a program to open the file.

If it helps I am running Vista Ultimate 32 bit.

Sorry for the long winded post, and if there are any other things I have missed please let me know. A pointer in the right direction would be appreciated.

Many Thanks,

Soundmackdaddy
Try just installing the JRE: http://java.com/en/download/

The link in those instructions is to the development kit, which you shouldn't need. You also shouldn't need to mess with environment variables.
 
ok thanks that seems to make things a bit simpler.

However I am still a little confused about getting OrbConnect to work. I have downloaded Java and installed it. I have also enabled the OrbConnect Module in the Orbiter launchpad but I am not really sure what I need to do to access OrbConnect controls. I assume that is done through some Command Prompt window or something, should that popup when an Orbiter scenario is started or do I have to start it manually or configure it in any way with Java? (When I start orbiter I don't notice anything) How is it supposed to be accessed?

Thanks for all your help
 
Yes, the jar file in the docs/OrbConnect folder is the correct one. Double clicking the OrbConnectClient.jar should open up a small GUI window on your screen. It will try to automatically connect to Orbiter on the same box. If Orb:Connect is activated and Orbiter is running a scenario the "Send" button should turn green and the text darken after a few seconds as it connects to Orb:Connect.

To send a command, you can use one of the other buttons to create a command in the text box, or type one in manually. Click the send button and you should receive a response.

To attach to Obiter running on a different machine, you'll have to execute the client from the command line.
Open a command window
cd to the directory the client jar is in
type: java -jar OrbConnectClient.jar -addr 192.168.1.1 (or whatever the IP address is that Orbiter is running on.

I'll expand on this documentation more with the next release. Thanks for pointing this out.
 
that seems to make sense, however for some reason my computer has not recognised a default program for the .jar file. I have used the Open With window and tried a number of the applications in the java folder but have not been able to open the file with one that starts up a small GUI window that you mention. Would you happen to know which application in the program files is supposed to be used to open OrbConnectClient.jar?

thanks again
 
Java (<java install dir>/bin/java.exe) is the program that should be associated to the jar. Open a command window and type:
Code:
java -version
If you get something like:
Code:
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Client VM (build 11.0-b15, mixed mode, sharing)
your PATH environment variable is correctly set up. If it says something like:
Code:
'java' is not recognized as an internal or external command,
operable program or batch file.
Then you will need to do that. I don't use Vista, but it looks like http://www.andrew.cmu.edu/user/mfuge/15-100/Windows_Vista_Path_Variables.pdf should help.

It's a small window that opens in the top left corner of the screen, and may show just a frame for a while. Can be easy to miss. What folder is java.exe in?
 
Last edited:
hmm this is a bit weird...

When I try to open the java.exe in the bin file a command window does open up, some text flashes onto the window and then the window closes, all in a very short amount of time. No java icon appears in the bottom right-hand system try either. I managed to take an ok screenshot of the text shown in the command window before the window closes if that helps at all (the attached file 'Java Error').
A similar thing happens when I try to open the OrbConnectClient.jar with java.exe but a slightly different message appears, shown in the second screenshot (the other attached file 'Java Error OrbConnect') - on some occasions the window opens and remains blank for a while but you aren't able to type into it - it is as if it is taking a bit longer to load then some text appears and the window closes... This still happens after trying to add the java bin directory to user and system environment variables as described on the pdf.

I don’t really know what the problem is but I will try at java installation and setup information tomorrow when I get a chance to check that I haven’t missed anything. I realise now that this is a problem with my JRE rather than OrbConnect but if anyone has had a similar experience or knows what this means I would appreciate any idea to fix it?
I might also try adding the address to one of the other java versions I have installed that is development kit to see if that makes any difference otherwise just do an extensive google search. I realise now that this is a problem with my JRE rather than OrbConnect so will try to work that out
 

Attachments

  • Java Error.png
    Java Error.png
    304.8 KB · Views: 9
  • Java Error OrbConnect.png
    Java Error OrbConnect.png
    223 KB · Views: 9
hmm this is a bit weird...

When I try to open the java.exe in the bin file a command window does open up, some text flashes onto the window and then the window closes, all in a very short amount of time. No java icon appears in the bottom right-hand system try either. I managed to take an ok screenshot of the text shown in the command window before the window closes if that helps at all (the attached file 'Java Error').
A similar thing happens when I try to open the OrbConnectClient.jar with java.exe but a slightly different message appears, shown in the second screenshot (the other attached file 'Java Error OrbConnect') - on some occasions the window opens and remains blank for a while but you aren't able to type into it - it is as if it is taking a bit longer to load then some text appears and the window closes... This still happens after trying to add the java bin directory to user and system environment variables as described on the pdf.

I don’t really know what the problem is but I will try at java installation and setup information tomorrow when I get a chance to check that I haven’t missed anything. I realise now that this is a problem with my JRE rather than OrbConnect but if anyone has had a similar experience or knows what this means I would appreciate any idea to fix it?
I might also try adding the address to one of the other java versions I have installed that is development kit to see if that makes any difference otherwise just do an extensive google search. I realise now that this is a problem with my JRE rather than OrbConnect so will try to work that out

oh... oh dear. you DO need the development kit, those appear to be runtimes.
 
open a command window
cd to the directory where the jar file is
type
Code:
java -jar OrbConnectClient.jar
Snapshot any error that occurs.

---------- Post added at 04:30 PM ---------- Previous post was at 10:49 AM ----------

oh... oh dear. you DO need the development kit, those appear to be runtimes.
No, you should not need the SDK. The first set of error messages are the help messages from executing Java without any parameters. The second error shows the -jar argument is missing.
Code:
>java \programs\Orbiter2010\Doc\OrbConnect\OrbConnectClient.jar
instead of:
Code:
>java[B] -jar[/B] \programs\Orbiter2010\Doc\OrbConnect\OrbConnectClient.jar
You can't forget that -jar argument.

If the window is opening, then the program is starting. It may take up to a minute to start on some machines, but you do have to wait for it to connect to Orbiter before it will accept input. If started from inside a command wiindow, you should see some "checking connection" messages, which will continue to appear until the connection is made.
 
hey!

The first time I tried it I must have minimised it or something inbetween checking the window because after entering the string into command prompt a window did come up but appeared completely transparent. However I just tried it again and I think it worked! The GUI came up and a couple of errors first appeared on the command prompt window about the connection but they disappeared once I had started up Orbiter. I have included a screenie just to check that is how everything should look. Now I just have to read through the manual and learn the coding structure.

Thanks for all your help!
 

Attachments

  • OrbConnect.png
    OrbConnect.png
    255.4 KB · Views: 8
You're fine. It will appear transparent as it starts up, which as I said, may take a while. I always make it a habit to have Orbiter running before I start any clients.
 
hmmm its funny, I tried it again just now and for some reason opening the file directly using java still doesn't seem to work. However using your method with command prompt still brings up the window. The odd thing is that maybe I haven't left it long enough or my computer is a bit busy without me realising but it has not yet filled out the window and is stuck on the first line of "checking connection". I will try again later to see if it is just my erratic computer.

Having a closer look at OrbConnect when I got it working before I just had a couple of extra questions:

Firstly it was kind of curious to find each time I typed in a command to request some data with orbiter minimised in the background, a response did not seem to appear until I had switched focus from OrbConnect to Orbiter and back again. Is that just by chance that I happened to switch windows when the response was generated or is that how OrbConnect operates?

More importantly is there an easy way of exporting the responses found by OrbConnect into conventional code like C or something so that it can be used for other purpose-simpit functions or does that require looking into the C++ source code?

The final question I have is how hard would it be to try and expose the links to the kind of data OrbConnect deals with given another spacecraft and the source code. My main thoughts here relate to the NASSP project which allows access to the source code of the spacecraft - or would it just be easier to write a direct bit of code specific to that spacecraft and bypass OrbConnect?

Many thanks once again for all your help and patience

---------- Post added at 11:14 AM ---------- Previous post was at 09:30 AM ----------

I just tried it again and it started up almost instantly and worked perfectly via command prompt as 3 posts ago where it successfully connected. I closed the window and command prompt and reopened them to try a second time and the window remained transparent and the first attempt at connecting going for a few minutes. Ah well at least I know that it works and it is just a matter of waiting until my computer is in a good mood :)
 
It won't work with Orbiter minimized.

Exporting responses from Orb:Connect requires coding, but it doesn't have to be C++. The Java client sources or RemoteMFD at http://sourceforge.net/projects/remotemfd/ are a couple of existing clients.

Orb:Connect deals with spacecraft through the Vessel2 or XRVesselCtrl interface. It only sends responses to the requesting client (it doesn't broadcast), so you would need something to generate the messages not just listen for responses.

You could use Orb:Connect as a framework and add a class to handle any NASSP-specific messages you wanted.

As far as the difficulty with subsequent connections, check Task Manager and make sure there isn't a javaw or java process still lurking about.
 
Last edited:
thanks for answering those questions and thanks again for all your help!
Keep up the good work and congrats for developing such a unique orbiter interface!
 
Back
Top