Hi:
I am trying to make some small changes to the JavaViewer source code and need to repackage everything.
I'm a little confused since in the downloaded package of UltraVnc there are a few dlls and a few executables but no .class files! In the final product (compiled and everything) where are the .class files? How does the server sends an applet to the client browser?
Some help would be greatly appreciated.
Shawn
Celebrating the 22th anniversary of the UltraVNC: https://forum.uvnc.com/viewtopic.php?t=38031
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
- Bluesky/AT Protocol: https://bsky.app/profile/ultravnc.bsky.social
- 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
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
- Bluesky/AT Protocol: https://bsky.app/profile/ultravnc.bsky.social
- 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
How to repackage everything...
The .class files and the .jar are in WinVNC\res subdirectory...
They are actually embedded in the .rc thus .res as binary resources.
So when WinVNC is compiled, all the JavaViewer is embedded in winvnc.exe.
The WinVNC server embeds a small HTTP server that listens on port 5800.
when a http request arrives on this port, the small embedded Http server sends a small Html page response containing a Applet tag with the vncviewer.jar file. Then it sends the .jar file and the .class files. All this is loaded in the connected web browser then the user is prompted for VNC password...
How to modify the embedded JavaViewer:
1. Make your modifs in the .java files
2. Compile the .java to obtain the .class files
3. Create the vncviewer.jar archive
4. Copy all these files in WinVNC/res subdirectory, replacing the "old" ones if necessary.
5. Compile WinVNC.exe
That's it.
Now if you add new .java files to the viewer (thus new .class files), don't forget to add them in winvnc.rc file belong the others.
hope this helps
They are actually embedded in the .rc thus .res as binary resources.
So when WinVNC is compiled, all the JavaViewer is embedded in winvnc.exe.
The WinVNC server embeds a small HTTP server that listens on port 5800.
when a http request arrives on this port, the small embedded Http server sends a small Html page response containing a Applet tag with the vncviewer.jar file. Then it sends the .jar file and the .class files. All this is loaded in the connected web browser then the user is prompted for VNC password...
How to modify the embedded JavaViewer:
1. Make your modifs in the .java files
2. Compile the .java to obtain the .class files
3. Create the vncviewer.jar archive
4. Copy all these files in WinVNC/res subdirectory, replacing the "old" ones if necessary.
5. Compile WinVNC.exe
That's it.
Now if you add new .java files to the viewer (thus new .class files), don't forget to add them in winvnc.rc file belong the others.
hope this helps
UltraSam
'Forgot to mention:
When you add new Java classes to the viewer, you have to add their references in 2 files:
***
*** WinVNC.rc:
***
IDR_VNCVIEWER_JAR JAVAARCHIVE DISCARDABLE "res\\vncviewer.jar"
IDR_AUTHPANEL_CLASS JAVACLASS DISCARDABLE "res\\AuthPanel.class"
IDR_CLIPBOARDFRAME_CLASS JAVACLASS DISCARDABLE "res\\clipboardFrame.class"
IDR_OPTIONSFRAME_CLASS JAVACLASS DISCARDABLE "res\\optionsFrame.class"
IDR_RFBPROTO_CLASS JAVACLASS DISCARDABLE "res\\rfbProto.class"
IDR_VNCCANVAS_CLASS JAVACLASS DISCARDABLE "res\\vncCanvas.class"
IDR_VNCVIEWER_CLASS JAVACLASS DISCARDABLE "res\\vncviewer.class"
IDR_BUTTONPANEL_CLASS JAVACLASS DISCARDABLE "res\\ButtonPanel.class"
IDR_DESCIPHER_CLASS JAVACLASS DISCARDABLE "res\\DesCipher.class"
IDR_RECFRAME_CLASS JAVACLASS DISCARDABLE "res\\RecordingFrame.class"
IDR_SESSIONREC_CLASS JAVACLASS DISCARDABLE "res\\SessionRecorder.class"
***
*** vnchttpconnect.cpp: (the small http server)
***
const FileMap filemapping [] ={
{"/vncviewer.jar", "JavaArchive", IDR_VNCVIEWER_JAR},
{"/authenticationPanel.class", "JavaClass", IDR_AUTHPANEL_CLASS},
{"/clipboardFrame.class", "JavaClass", IDR_CLIPBOARDFRAME_CLASS},
{"/DesCipher.class", "JavaClass", IDR_DESCIPHER_CLASS},
{"/optionsFrame.class", "JavaClass", IDR_OPTIONSFRAME_CLASS},
{"/rfbProto.class", "JavaClass", IDR_RFBPROTO_CLASS},
{"/vncCanvas.class", "JavaClass", IDR_VNCCANVAS_CLASS},
{"/vncviewer.class", "JavaClass", IDR_VNCVIEWER_CLASS},
{"/animatedMemoryImageSource.class", "JavaClass", IDR_ANIMMEMIMAGESRC_CLASS}
};
const int filemappingsize = 9;
When you add new Java classes to the viewer, you have to add their references in 2 files:
***
*** WinVNC.rc:
***
IDR_VNCVIEWER_JAR JAVAARCHIVE DISCARDABLE "res\\vncviewer.jar"
IDR_AUTHPANEL_CLASS JAVACLASS DISCARDABLE "res\\AuthPanel.class"
IDR_CLIPBOARDFRAME_CLASS JAVACLASS DISCARDABLE "res\\clipboardFrame.class"
IDR_OPTIONSFRAME_CLASS JAVACLASS DISCARDABLE "res\\optionsFrame.class"
IDR_RFBPROTO_CLASS JAVACLASS DISCARDABLE "res\\rfbProto.class"
IDR_VNCCANVAS_CLASS JAVACLASS DISCARDABLE "res\\vncCanvas.class"
IDR_VNCVIEWER_CLASS JAVACLASS DISCARDABLE "res\\vncviewer.class"
IDR_BUTTONPANEL_CLASS JAVACLASS DISCARDABLE "res\\ButtonPanel.class"
IDR_DESCIPHER_CLASS JAVACLASS DISCARDABLE "res\\DesCipher.class"
IDR_RECFRAME_CLASS JAVACLASS DISCARDABLE "res\\RecordingFrame.class"
IDR_SESSIONREC_CLASS JAVACLASS DISCARDABLE "res\\SessionRecorder.class"
***
*** vnchttpconnect.cpp: (the small http server)
***
const FileMap filemapping [] ={
{"/vncviewer.jar", "JavaArchive", IDR_VNCVIEWER_JAR},
{"/authenticationPanel.class", "JavaClass", IDR_AUTHPANEL_CLASS},
{"/clipboardFrame.class", "JavaClass", IDR_CLIPBOARDFRAME_CLASS},
{"/DesCipher.class", "JavaClass", IDR_DESCIPHER_CLASS},
{"/optionsFrame.class", "JavaClass", IDR_OPTIONSFRAME_CLASS},
{"/rfbProto.class", "JavaClass", IDR_RFBPROTO_CLASS},
{"/vncCanvas.class", "JavaClass", IDR_VNCCANVAS_CLASS},
{"/vncviewer.class", "JavaClass", IDR_VNCVIEWER_CLASS},
{"/animatedMemoryImageSource.class", "JavaClass", IDR_ANIMMEMIMAGESRC_CLASS}
};
const int filemappingsize = 9;
UltraSam