Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Running Java viewer standalone?

Post Reply
Ripcord
8
8
Posts: 16
Joined: 2004-07-16 04:58

Running Java viewer standalone?

Post by Ripcord »

Hi,

Does anyone have an easy way to get the the Java viewer to run it standalone? I'd like to take advantage of its multiplatform features and run it on OS X and Linux, but not to connect to UltraVNC servers.

(I also wouldn't want to run it in a browser on my Windows client as the browser consumes too much screen real estate).

Really I just need the .jar, I believe, but I haven't found a way of retrieving it. I see it's not for separate download, and I haven't found a way to extract it from the source tree (I assume I'd have to javac it).

Is the only way to get the .jar to build it myself or to install UltraVNC server somewhere temporarily and pull it out?
Last edited by Ripcord on 2005-09-11 16:05, edited 1 time in total.
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Post by redge »

I'm interesting too to know how to start java vncviewer 1.0.1 runtime ;-)
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
roadrunner

Post by roadrunner »

Point your browser (or curl, wget, whatever) at http://<vnc-server>:5800/VncViewer.jar and save to a file.
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Post by redge »

Thank you for your hint
successfully saved but when is opened the file


Java Virtual Machine Luncher:
Failed to load Main-Class manifest attribute from z:\folder\VncViewer.jar
forgotten something to do?
need only a special release of Sun Java or MS Java for work ?

tested with Sun JRE 1.5.0_04
msjava.dll not exist in the system.
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
roadrunner

Post by roadrunner »

Run with: java -classpath VncViewer.jar VncViewer HOST ... PORT ...
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Post by redge »

variable: value
CLASSPATH: C:\Program Files\Java\jre1.5.0_04\lib\ext\QTJava.zip
QTJAVA: C:\Program Files\Java\jre1.5.0_04\lib\ext\QTJava.zip

cmd>java VncViewer.jar HOST hostname PORT port (display number)

cmd>java VncViewer.jar HOST hostname PORT 5800
cmd>java VncViewer.jar HOST hostname PORT 0
cmd>java VncViewer.zip HOST hostname PORT 5800
cmd>java VncViewer.zip HOST hostname PORT 0

all have same error:
Exception in thread "main" java.lang.NoClassDefFoundError: VncViewer/zip
Exception in thread "main" java.lang.NoClassDefFoundError: VncViewer/jar


Can't start java vncviewer alone (without web browser or JDK) ?
so I must have JDK 1.4 for start java vncviewer as below like Linux Suse 8.0 tell ?
Installation of VNC java client over Linux Suse 8.0

To run the vncviewer java version run on linux, you need the JDK 1.4 or higher. The procedure to installing an running it is as follows:

1. Download the compiled package.
2. Make sure you have your java virtual machine from the JDK 1.4 in your PATH.
3. Make sure you have set the CLASSPATH
4. Type the next commands.
>tar -zxvf vncjavaIPv6.tgz
>cd vnc_javasrc
5. To run vncviewer, type:
>java vncviewer HOST host PORT port (display number)
source:
http://jungla.dit.upm.es/~acosta/paginas/vncIPv6.html
Last edited by redge on 2005-10-15 22:58, edited 4 times in total.
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
roadrunner

Post by roadrunner »

Of course you need a JDK or JRE installed; but any 1.2 or later will do. Just follow my instructions exactly. The other instructions, while not wrong, are more complicated than necessary, as you can specify the classpath on the command line ("VncViewer.jar" has got to go into the classpath, and "VncViewer" is the class to run).
redge
1000
1000
Posts: 6797
Joined: 2004-07-03 17:05
Location: Switzerland - Geneva

Post by redge »

finally:
successfully connected :-) with JRE 1.4.2_09-b05
successfully connected :-) with JRE 1.5.0_04-b05


the mistake was only "PORT 5800" replaced with "PORT 5900" and it work fine !
Sorry for beginner error of java ;-)
I was forgot to consider only 5900 redirected by vncserver to 5800 for java

java -classpath VncViewer.jar VncViewer HOST myremote PORT 5900

roadrunner,
Thank you for your time to Java beginner support and your time for update/create and help UltraVNC Java code.
Last edited by redge on 2006-03-30 21:01, edited 1 time in total.
UltraVNC 1.0.9.6.1 (built 20110518)
OS Win: xp home + vista business + 7 home
only experienced user, not developer
Post Reply