Skip to main content

How do I execute a Java3D applet without installing Java3D

26 replies [Last post]
chamorrus
Offline
Joined: 2007-07-31
Points: 0

Hi guys!

What I'm trying to do is something that let me run an applet on any computer even the computer does not have Java3D installed.
I know that this can be done (I have seen examples into the internet), but I'm not able to do anything. I have seen solutions in the Internet... But I'm completely lost because it does not work for me.

Please, any kind of comment would be very very helpfull. I'm 100% lost

Thanks in advance...

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rrusso1
Offline
Joined: 2011-09-27
Points: 0

I know this is an old post but if you're still looking for a solution or if anyone else runs into this problem of Java3d in applets I ran into the same problems that you are having so I developed my own solution. Go to people.bu.edu/rrusso1/java3d.html and download the jar file. Inside the jar file are the native library files for 32 and 64 bit versions of windows and linux (Max OS X has Java3d natively installed). Simply add this jar to your archive list in your applet and call 'new Java3dLinker()' and it will determine the the OS you have and extract the proper library fiels and add them to your path so when Java3d goes to load the library it will correctly find it in the path. let me know if there are any issues anyone has and if this works!

kcr
Offline
Joined: 2004-03-17
Points: 0

You should not use or override the loadLibraryInternal method.

> Actually I want to know how I can make my applet working in all machines with and without java3d installed..

You are running into issue 534, "ClassNotFoundException when running applet if Java 3D installed into JRE", which is fixed in Java 3D 1.5.2. Have you tried aces' suggestion of pointing to:

http://download.java.net/media/java3d/webstart/early-access/java3d-1.5.2...

If so, did this work for you?

-- Kevin

rajisp
Offline
Joined: 2008-01-23
Points: 0

Hi kevin,

I set
http://download.java.net/media/java3d/webstart/early-access/java3d-1.5.2... instead of
http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp as value to PARAM NAME="jnlpExtension1" in my applet. Its again giving me the same JNLPAppletLauncher ClassNotFoundException in java3d installed one..
Should I change my values while using http://download.java.net/media/java3d/webstart/early-access/java3d-1.5.2... ?

chamorrus
Offline
Joined: 2007-07-31
Points: 0

Hello again aces!
I think I have the same question than rajisp... How do I launch the applet using JNLPAppletLauncher?!
Isn't enough by placing the applet tag into a html page?! Or maybe I have to code a method into the applet in which I have to launch the applet "by myself".

Thanks a lot!

aces
Offline
Joined: 2003-07-17
Points: 0

So far as I know, there is no need to do anything special about you applets.

Just get the JNLPApplet tag as template, add your applet's jar file, set your applet class name on subapplet.classname param and your applet should work.

This is what I did. On some applets I don't even recompiled then. Just get the old jar and put then to run on JNLP.

chamorrus
Offline
Joined: 2007-07-31
Points: 0

Ok, I know I'm a little bit boring but... at least I have my applet running with the JNLPAppletLauncher...

The problem now is that if I have a computer without Java3D installed, it doesn't do anything.

Have you ever experienced something like that?!

Oooops, forgot to paste the error:

Java Plug-in 1.5.0_06
Usar versión JRE 1.5.0_06 Java HotSpot(TM) Client VM
Directorio local del usuario = C:\Documents and Settings\user

----------------------------------------------------
c: borrar ventana de consola
f: finalizar objetos en la cola de finalización
g: liberación de recursos
h: presentar este mensaje de ayuda
l: volcar lista del cargador de clases
m: imprimir sintaxis de memoria
o: activar registro
p: recargar configuración de proxy
q: ocultar consola
r: recargar configuración de norma
s: volcar propiedades del sistema y de despliegue
t: volcar lista de subprocesos
v: volcar pila de subprocesos
x: borrar antememoria del cargador de clases
0-5: establecer nivel de rastreo en
----------------------------------------------------

JNLPAppletLauncher: static initializer
os.name = windows xp
nativePrefix = nativeSuffix = .dll
tmpRootDir = C:\DOCUME~1\user~1\CONFIG~1\Temp\jnlp-applet\jln4742
Applet.init
subapplet.classname = package.subPackageName.Applet
subapplet.displayname = Running Java 3D Applet
Applet.start
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.plugin.util.AnimationPanel.initLogoImage(Unknown Source)
at sun.plugin.util.AnimationPanel.doPaint(Unknown Source)
at sun.plugin.util.AnimationPanel.paint(Unknown Source)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
os.name = windows xp
os.arch = x86

Message was edited by: chamorrus

chamorrus
Offline
Joined: 2007-07-31
Points: 0

Well, I've done it!

It works (not in all the computers I have tested but it could be worse). I had problems with the package structure but it's all solved.

Thank you very much for the help supplied.

I close the thread.

aces
Offline
Joined: 2003-07-17
Points: 0

Hi

I´ve fould a machine were my applets don´t work.
Using VM option
[b]
-verbose:class
[/b]
at Java Control Panel , I discover that JVM was getting Java3D jars from

C:\WINDOWS\Sun\Java\Deployment\Trusted

instead the downloaded JNLP ones.
It happens because it is a trusted folder for JRE, and has priority over folders placed elsewhere.
I deleted the jar files from that folder and all runs fine.

I hope it helps

chamorrus
Offline
Joined: 2007-07-31
Points: 0

Hi aces!

It's impossible! I can't run my applet with JNLPAppletLauncher even with the Java3D installed.

No progress bar, no applet, ... Nothing.

The place of the screen where the applet should appear stays gray.
The java console doesn't type anything.
The server doesn't put anything in the output log.

I don't know what I'm doing wrong. I have copied the code you posted few days ago and made my changes.
The only thing I do not do like you is in the tag

width="580"
height="320"
class="applet"
archive="cubemap.jar, http://download.java.net/media/applet-launcher/applet-launcher.jar,
http://download.java.net/media/java3d/webstart/release/j3d/latest/j3dcor...,
http://download.java.net/media/java3d/webstart/release/j3d/latest/j3duti...,
http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-curr...,
http://download.java.net/media/gluegen/webstart/gluegen-rt.jar,
http://download.java.net/media/java3d/webstart/release/vecmath/latest/vecmath.jar">

I tried including my applet.jar file (I mean, the cubemap.jar in your code), not including that file, ...

Could be the problem that I'm not creating correctly the jar file?! I do with the following sentence:

jar cvf myApplet.jar packageNameWhereAppletIsIncluded

chamorrus
Offline
Joined: 2007-07-31
Points: 0

Ok, I found my problem...

Where I'm trying to put my applet is not a HTML file... It's a XUL file and my tag where wrong. I have to puto something like


So I have one problem solved.

The problem I have right now is that the Java console shows the following error:

Applet.init
subapplet.classname = packageName.subPackageName.Applet
subapplet.displayname = Running Java 3D Applet
Applet.start
Exception in thread "AWT-EventQueue-4" java.lang.NoClassDefFoundError: package/ClassName
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.getDeclaredMethod(Unknown Source)
at java.awt.Component.isCoalesceEventsOverriden(Unknown Source)
at java.awt.Component.access$100(Unknown Source)
at java.awt.Component$2.run(Unknown Source)
at java.awt.Component$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Component.checkCoalescing(Unknown Source)
at java.awt.Component.(Unknown Source)
at java.awt.Container.(Unknown Source)
at java.awt.Panel.(Unknown Source)
at java.awt.Panel.(Unknown Source)
at java.applet.Applet.(Unknown Source)
at package.subPackageName.Applet.(OrusApplet.java:53)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.jdesktop.applet.util.JNLPAppletLauncher.startSubApplet(JNLPAppletLauncher.java:1889)
at org.jdesktop.applet.util.JNLPAppletLauncher.access$200(JNLPAppletLauncher.java:658)
at org.jdesktop.applet.util.JNLPAppletLauncher$5.run(JNLPAppletLauncher.java:1269)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: misc.PuntualData
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 32 more

and I have included the package/ClassName into the jar file I type in the html:applet code tag...

What am I doing wrong right now?¿

rajisp
Offline
Joined: 2008-01-23
Points: 0

Hello aces
with your applet specified i am getting JNLPAppletLauncher ClassNot Found Exception..
mine is java3d installed machine.

I tried the following code to load java3d libraries locally if it have java3d installed.
but its giving some exceptions..
Method
------------

[code]

private static void loadLibraryInternal(String libraryName) {
System.out.println("LOADING LIBRARY FILES ");

String sunAppletLauncher = System.getProperty("sun.jnlp.applet.launcher");
boolean usingJNLPAppletLauncher =
Boolean.valueOf(sunAppletLauncher).booleanValue();

boolean loaded = false;
if (usingJNLPAppletLauncher) {
try {
Class jnlpAppletLauncherClass =
Class.forName("org.jdesktop.applet.util.JNLPAppletLauncher");
Method jnlpLoadLibraryMethod =jnlpAppletLauncherClass.getDeclaredMethod("loadLibrary",new Class[] { String.class });
jnlpLoadLibraryMethod.invoke(null, new Object[] { libraryName });
loaded = true;
} catch (ClassNotFoundException ex) {
System.err.println("loadLibrary(" + libraryName + ")");
System.err.println(ex);
System.err.println("Attempting to use System.loadLibrary instead");
} catch (Exception e) {
Throwable t = e;
if (t instanceof InvocationTargetException) {
t = ((InvocationTargetException) t).getTargetException();
}
if (t instanceof Error)
throw (Error) t;
if (t instanceof RuntimeException) {
throw (RuntimeException) t;
}
// Throw UnsatisfiedLinkError for best compatibility with System.loadLibrary()
throw (UnsatisfiedLinkError) new UnsatisfiedLinkError().initCause(e);
}
}

if (!loaded) {
System.loadLibrary(libraryName);
}
}
[/code]

Exception
-------------------
--------------- T H R E A D ---------------

Current thread (0x03361c00): JavaThread "J3D-Renderer-1" [_thread_in_native, id=2820]

siginfo: ExceptionCode=0xc0000005, writing address 0x0382e7dc

Registers:
EAX=0x00000076, EBX=0x000d6b76, ECX=0x03bbf7f0, EDX=0x0382e7dc
ESP=0x03bbf570, EBP=0x03bbf600, ESI=0x03bbf5b4, EDI=0x0382e701
EIP=0x0381c964, EFLAGS=0x00010202

Top of Stack: (sp=0x03bbf570)
0x03bbf570: 0381cc38 038c3cb8 0382e7dc 000d6b60
0x03bbf580: 00000000 00000000 00000000 00000000
0x03bbf590: 00000000 00000000 00000000 00000000
0x03bbf5a0: 00000000 00000000 00000000 00000000
0x03bbf5b0: 00000000 00000000 00000000 00000000
0x03bbf5c0: 00000000 00000000 00000000 00000000
0x03bbf5d0: 00000000 00000000 00000000 00000000
0x03bbf5e0: 00000000 00000000 00000000 00000000

Instructions: (pc=0x0381c964)
0x0381c954: 40 74 06 83 79 08 00 74 24 ff 49 04 78 0b 8b 11
0x0381c964: 88 02 ff 01 0f b6 c0 eb 0c 0f be c0 51 50 e8 d8

Stack: [0x03b70000,0x03bc0000), sp=0x03bbf570, free space=317k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [j3dcore-d3d.dll+0x5c964]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j javax.media.j3d.Win32NativeConfigTemplate3D.choosePixelFormat(JI[I[J)I+0
j javax.media.j3d.Win32NativeConfigTemplate3D.getBestConfiguration(Ljavax/media/j3d/GraphicsConfigTemplate3D;[Ljava/awt/GraphicsConfiguration;)Ljava/awt/GraphicsConfiguration;+116
j javax.media.j3d.NativePipeline.getBestConfiguration(Ljavax/media/j3d/GraphicsConfigTemplate3D;[Ljava/awt/GraphicsConfiguration;)Ljava/awt/GraphicsConfiguration;+5
j javax.media.j3d.Renderer.doWork(J)V+1466
j javax.media.j3d.J3dThread.run()V+19
v ~StubRoutines::call_stub

--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
=>0x03361c00 JavaThread "J3D-Renderer-1" [_thread_in_native, id=2820]
0x03388400 JavaThread "J3D-MasterControl-1" [_thread_blocked, id=4048]
0x0333b400 JavaThread "J3D-NotificationThread" [_thread_blocked, id=3892]
0x03342800 JavaThread "J3D-TimerThread" [_thread_blocked, id=3928]
0x0310b400 JavaThread "J3D-RenderingAttributesStructureUpdateThread" [_thread_blocked, id=1528]
0x030e3400 JavaThread "AWT-EventQueue-1" [_thread_blocked, id=464]
0x030ed000 JavaThread "TimerQueue" daemon [_thread_blocked, id=2104]
0x00926400 JavaThread "DestroyJavaVM" [_thread_blocked, id=872]
0x030cf000 JavaThread "AWT-EventQueue-0" [_thread_blocked, id=2932]
0x030c1400 JavaThread "thread applet-main.MainClass.class" [_thread_blocked, id=2936]
0x02f28400 JavaThread "AWT-Windows" daemon [_thread_in_native, id=3276]
0x02f27800 JavaThread "AWT-Shutdown" [_thread_blocked, id=1440]
0x02f21800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=2424]
0x02bad000 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=2596]
0x02ba8000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3988]
0x02ba7000 JavaThread "Attach Listener" daemon [_thread_blocked, id=2576]
0x02ba6400 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1672]
0x02b9e400 JavaThread "Finalizer" daemon [_thread_blocked, id=4072]
0x02b9d400 JavaThread "Reference Handler" daemon [_thread_blocked, id=2136]

Other Threads:
0x02b94000 VMThread [id=1564]
0x02bae400 WatcherThread [id=3120]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
def new generation total 960K, used 135K [0x22960000, 0x22a60000, 0x22e40000)
eden space 896K, 9% used [0x22960000, 0x22975c78, 0x22a40000)
from space 64K, 76% used [0x22a50000, 0x22a5c2d0, 0x22a60000)
to space 64K, 0% used [0x22a40000, 0x22a40000, 0x22a50000)
tenured generation total 4096K, used 1935K [0x22e40000, 0x23240000, 0x26960000)
the space 4096K, 47% used [0x22e40000, 0x23023fb8, 0x23024000, 0x23240000)
compacting perm gen total 12288K, used 2152K [0x26960000, 0x27560000, 0x2a960000)
the space 12288K, 17% used [0x26960000, 0x26b7a2e0, 0x26b7a400, 0x27560000)
ro space 8192K, 62% used [0x2a960000, 0x2ae5f728, 0x2ae5f800, 0x2b160000)
rw space 12288K, 52% used [0x2b160000, 0x2b7a1eb8, 0x2b7a2000, 0x2bd60000)

Dynamic libraries:
0x00400000 - 0x00423000 C:\Program Files\Java\jre1.6.0_02\bin\javaw.exe
0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f4000 C:\WINDOWS\system32\kernel32.dll
0x6f000000 - 0x6f063000 C:\WINDOWS\SYSTEM32\SYSFER.DLL
0x5b860000 - 0x5b8b4000 C:\WINDOWS\system32\NETAPI32.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\msvcrt.dll
0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f01000 C:\WINDOWS\system32\RPCRT4.dll
0x77d40000 - 0x77dd0000 C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f56000 C:\WINDOWS\system32\GDI32.dll
0x7c340000 - 0x7c396000 C:\Program Files\Java\jre1.6.0_02\bin\msvcr71.dll
0x6d7c0000 - 0x6da09000 C:\Program Files\Java\jre1.6.0_02\bin\client\jvm.dll
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x6d310000 - 0x6d318000 C:\Program Files\Java\jre1.6.0_02\bin\hpi.dll
0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d770000 - 0x6d77c000 C:\Program Files\Java\jre1.6.0_02\bin\verify.dll
0x6d3b0000 - 0x6d3cf000 C:\Program Files\Java\jre1.6.0_02\bin\java.dll
0x6d7b0000 - 0x6d7bf000 C:\Program Files\Java\jre1.6.0_02\bin\zip.dll
0x6d000000 - 0x6d1c3000 C:\Program Files\Java\jre1.6.0_02\bin\awt.dll
0x73000000 - 0x73026000 C:\WINDOWS\system32\WINSPOOL.DRV
0x76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32.dll
0x774e0000 - 0x7761c000 C:\WINDOWS\system32\ole32.dll
0x73760000 - 0x737a9000 C:\WINDOWS\system32\ddraw.dll
0x73bc0000 - 0x73bc6000 C:\WINDOWS\system32\DCIMAN32.dll
0x6d2b0000 - 0x6d303000 C:\Program Files\Java\jre1.6.0_02\bin\fontmanager.dll
0x6d570000 - 0x6d583000 C:\Program Files\Java\jre1.6.0_02\bin\net.dll
0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
0x6d590000 - 0x6d599000 C:\Program Files\Java\jre1.6.0_02\bin\nio.dll
0x7c9c0000 - 0x7d1d4000 C:\WINDOWS\system32\shell32.dll
0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
0x773d0000 - 0x774d2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
0x5d090000 - 0x5d127000 C:\WINDOWS\system32\comctl32.dll
0x10000000 - 0x1000e000 C:\WINDOWS\j3dcore-ogl-chk.dll
0x5ed00000 - 0x5edcc000 C:\WINDOWS\system32\OPENGL32.dll
0x68b20000 - 0x68b40000 C:\WINDOWS\system32\GLU32.dll
0x037c0000 - 0x03893000 C:\WINDOWS\j3dcore-d3d.dll
0x4fdd0000 - 0x4ff76000 C:\WINDOWS\system32\d3d9.dll
0x038a0000 - 0x038a6000 C:\WINDOWS\system32\d3d8thk.dll
0x77c00000 - 0x77c08000 C:\WINDOWS\system32\VERSION.dll
0x74c80000 - 0x74cac000 C:\WINDOWS\system32\OLEACC.dll
0x76080000 - 0x760e5000 C:\WINDOWS\system32\MSVCP60.dll
0x77120000 - 0x771ac000 C:\WINDOWS\system32\OLEAUT32.dll
0x038d0000 - 0x038f9000 C:\WINDOWS\j3dcore-ogl.dll
0x69000000 - 0x6940b000 C:\WINDOWS\system32\sisgl770.dll
0x6d3e0000 - 0x6d3e6000 C:\Program Files\Java\jre1.6.0_02\bin\jawt.dll

VM Arguments:
jvm_args: -Djava.security.policy=java.policy.applet
java_command: sun.applet.AppletViewer main.MainClass1210575626484.html
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:\Program Files\Java\jre1.6.0_02\bin\client;C:\Program Files\Java\jre1.6.0_02\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
USERNAME=raji
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 2, GenuineIntel

--------------- S Y S T E M ---------------

OS: Windows XP Build 2600 Service Pack 2

CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 15 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3

Memory: 4k page, physical 2030892k(1246748k free), swap 3969668k(3209776k free)

vm_info: Java HotSpot(TM) Client VM (1.6.0_02-b06) for windows-x86, built on Jul 12 2007 01:16:14 by "java_re" with unknown MS VC++:1310

aces
Offline
Joined: 2003-07-17
Points: 0

>[j3dcore-d3d.dll+0x5c964]

The crash problem you are reporting is not related to JNLP/applet.
This is about supporting legacy video cards like SiS , using D3D pipeline.

https://java3d.dev.java.net/issues/show_bug.cgi?id=513

This issue is fixed for Java3D 1.5.2 and higher.

Also make sure you have updated DirectX drivers from
http://www.microsoft.com/directX

Added later :

You can try fix right now by using
http://download.java.net/media/java3d/webstart/early-access/java3d-1.5.2...
replacing
http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp

Message was edited by: aces

rajisp
Offline
Joined: 2008-01-23
Points: 0

Hi aces,
thanks for your reply..
Actually I want to know how I can make my applet working in all machines with and without java3d installed..
With JNLPAppletLauncher its working in all machines having no Java3d..
I got the method

[code]private static void loadLibraryInternal(String libraryName) [/code] from JNLPAppletLauncher docs..

placed that code in my applet and invoke that from [code] public void init() [/code] by passing the libraries as arguments. is this the correct way? Is there any other method to make the applet working in machines having java3d installed?

Thanks

aces
Offline
Joined: 2003-07-17
Points: 0

> Hi aces,
> thanks for your reply..
> ctually I want to know how I can make my applet
> working in all machines with and without java3d
> installed..
> With JNLPAppletLauncher its working in all machines
> having no Java3d..
> I got the method
>
> [code]private static void loadLibraryInternal(String
> libraryName) [/code] from JNLPAppletLauncher docs..
>
> placed that code in my applet and invoke that from
> [code] public void init() [/code] by passing the
> libraries as arguments. is this the correct way? Is
> there any other method to make the applet working in
> machines having java3d installed?
>
> Thanks

Hi Raji

Let me know below link works for you in both cases (with/without Java3D installed) :

http://paginas.terra.com.br/educacao/alessandroborges/cubemap/CubeMapDem...

It does work on some systems I tested so far, with/without java3D installed.

rajisp
Offline
Joined: 2008-01-23
Points: 0

> Let me know below link works for you in both cases
> (with/without Java3D installed) :
> http://paginas.terra.com.br/educacao/alessandroborges/
> cubemap/CubeMapDemo.html

Hi,
for me its not working with java3d installed one..

>
>
> It does work on some systems I tested so far,
> with/without java3D installed.

My applet code already containing this code.with that i can load my applet only without java3d installed machine..

Message was edited by: rajisp

chamorrus
Offline
Joined: 2007-07-31
Points: 0

Hi Dmitri!
I have spent the whole day trying to "execute" the applet-launcher and I have not been able to do that...
I try to put the code shown in the examples and it doesn't works. I mean, I copy the code below

width=400
height=300
archive="myapplet.jar,
http://download.java.net/media/applet-launcher/applet-launcher.jar,
http://download.java.net/media/java3d/webstart/release/j3d/latest/j3dcor...,
http://download.java.net/media/java3d/webstart/release/j3d/latest/j3duti...,
http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-curr...,
http://download.java.net/media/gluegen/webstart/gluegen-rt.jar,
http://download.java.net/media/java3d/webstart/release/vecmath/latest/vecmath.jar">

and change the name of the subapplet.classname putting my own applet classname... but it doesn't do anything.

Do I have to create a .jnlp file or something like that?!

Anyway there might be another solution. I mean something like the applet shown here
http://vau.newmail.ru/struct2.html.
If you test it onto a computer without java3d installed... It works and you dont have to accept a certificate and nothing like that...

I don't know if you understand what I mean...

Dmitri Darine

> Do I have to create a .jnlp file or something like that?!
>
Sorry, I can not help you with this one. You have to read the doc.
> Anyway there might be another solution. I mean something like the applet shown here
> http://vau.newmail.ru/struct2.html.
> If you test it onto a computer without java3d installed... It works and you dont have to accept a certificate and nothing like that...
>
It seems like this applet is not based on java3d.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

chamorrus
Offline
Joined: 2007-07-31
Points: 0

> It seems like this applet is not based on java3d.
Sorry then Dmitri, I didn't notified that. Do you mean that the only way of doing what I want to do is using JNLPAppletLauncher?!

Is the applet shown below an applet based on java3d!?
http://vlak.webzone.ru/eng/index.html

If so, that's what I want to do. If it's not an applet based on java3d, what kind of technology are they using there?

Regards

Dmitri Darine

On 09.05.2008 09:15, java3d-interest@javadesktop.org wrote:
>> It seems like this applet is not based on java3d.
>>
> Sorry then Dmitri, I didn't notified that. Do you mean that the only way of doing what I want to do is using JNLPAppletLauncher?!
>
Yes. If you need an _java3d_ applet running on a computer without java3d
you have to use JNLPAppletLauncher. Or you can detect the absence of
java3d and ask an user to install it manually.

> Is the applet shown below an applet based on java3d!?
> http://vlak.webzone.ru/eng/index.html
>
Nop :)
> If so, that's what I want to do. If it's not an applet based on java3d, what kind of technology are they using there?
>
They use their own pure-Java renderning engine. In most of the cases it
does not utilize hardware capabilities of a videocard (no shading, no
antialiasing etc.).
Take a look at this (upper right corner):
http://mathworld.wolfram.com/about/live.html

http://www.vis.uni-stuttgart.de/~kraus/LiveGraphics3D/

DD

[att1.html]

aces
Offline
Joined: 2003-07-17
Points: 0

I have some Java3D applets in my web page and they work fine for both cases : with and without Java3D installed.

http://paginas.terra.com.br/educacao/alessandroborges/cubemap.html

My applet tag looks like this :

[code]
width="580"
height="320"
class="applet"
archive="cubemap.jar,
http://download.java.net/media/applet-launcher/applet-launcher.jar,
http://download.java.net/media/java3d/webstart/release/j3d/latest/j3dcor...,
http://download.java.net/media/java3d/webstart/release/j3d/latest/j3duti...,
http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-curr...,
http://download.java.net/media/gluegen/webstart/gluegen-rt.jar,
http://download.java.net/media/java3d/webstart/release/vecmath/latest/vecmath.jar">


[/code]

Let me know if you have problems to run above applet

chamorrus
Offline
Joined: 2007-07-31
Points: 0

Hi aces!
Thaks for your reply... I'll test your code next Monday (now I can't test it).
What you have is what I need to do... and watching the code you posted, I would like to ask you some questions.

1.- You wrote " The file next to the tag archive, is the applet you are showing into a jar file, or just a class (or classes) you need to use?
2.- "
" Is RunJ3DemoCubeMap the name of the applet class?!
3.- Do I have to code any jnlpExtension class or are they predefined yet?!

On the other hand, once I've adapted the code to my project, do I have to add the applet-launcher.jar library to the directory /lib of my project?
Do I have to do any other special action in addition of addapting the code you posted?! (I mean wether I have to code something in any other class, or copy any other file or library...)

Thanks a lot !

aces
Offline
Joined: 2003-07-17
Points: 0

Hi

Sorry to reply it out of order.
Please see my previous post about that crash.
It will be fixed as soon Sun put Java3D 1.5.2 as the [i] latest [/i] libs for JNLP, but you can try it right now by using
http://download.java.net/media/java3d/webstart/early-access/java3d-1.5.2...
replacing
http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp

About your questions:
[i]
>1.- You wrote " >The file next to the tag archive, is the applet you are showing into a jar file, or just a class (or classes) you need to use?
[/i]
This is the JNLP applet launcher itself. This is the wrapper used to launch our Java3D applets

[i]
>2.- "
" Is RunJ3DemoCubeMap the name of the applet class?!
[/i]

Yes ;)

[i]
>3.- Do I have to code any jnlpExtension class or are they predefined yet?!
[/i]
The jnlp extensions are all predefined. See links below:

Several extensions exposed here : https://applet-launcher.dev.java.net/
Java3D https://j3d-webstart.dev.java.net/release/index.html

chamorrus
Offline
Joined: 2007-07-31
Points: 0

Hello again Aces!

First of all, thank you very much for your reply.

Moreover I would like to know if you mean by the reply of the question #1, that I have to code the JNLP applet launcher. If so that's the reason why my code won't work.
I assume that you are describing the file "cubemap.jar", the one I asked for. If you weren't describing it, please, let me know what is the purpose of this file.

One more time, thank you very much

aces
Offline
Joined: 2003-07-17
Points: 0

Hi

The file cubemap.jar is my applet jar file. It contains my compiled classes, images, as well my Java3D applet class, i.e., that one named on subapplet.classname parameter

cube.RunJ3DemoCubeMap

[code]

[/code]

So you just have to develop a applet as usual, put the compiled class and resources packed in a jar file and use the JNLP applet launcher.

Dmitri Darine

https://applet-launcher.dev.java.net/

It is a bit buggy, but works fine if an user does not have java3d installed.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

chamorrus
Offline
Joined: 2007-07-31
Points: 0

Thank you very very much.
I'll take a look now and will reply with the results.