Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

3D in Applet

Thread view: 
Thorsten Kiefer - 13 Mar 2008 10:44 GMT
Hi,
how can I render hardware accelerated 3D graphics
without demanding the user to install java3d seperately ?
I know it's something with webstart.
Can anyone provide me a sample .jnlp file for that purpose ?
I want the application to run within a browser window.

Best regards
Thorsten
Thorsten Kiefer - 13 Mar 2008 10:48 GMT
This might be what I need :

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

> Hi,
> how can I render hardware accelerated 3D graphics
[quoted text clipped - 5 lines]
> Best regards
> Thorsten
Andrew Thompson - 13 Mar 2008 11:09 GMT
...
> Can anyone provide me a sample .jnlp file for that purpose ?

I could probably whip one up, but..

> I want the application to run within a browser window.

..WHY?!?  (sorry for shouting, but I am astonished,
is all)  Why on earth would you want a beautiful
(just guessing) 3D rendering 'trapped' inside a
browser window?

I was going to mention on the other thread* that
when launched with webstart, the becoming apps.
become free-floating and can they easily be resized
(if that makes any sense).  I was going to mention
that as another plus of webstart, but forgot!

* BTW - to anyone else interested, this thread
began on the rather quiet c.l.j.3d group,
<http://groups.google.com.au/group/comp.lang.java.3d/msg/
6f7e9686fcc0102e>
I advised the OP to try a better forum such as
this one.  If you want to get tetchy at anyone for
multi-posting, please feel free to do it at me.

You know how much I'll care.   ;-)

--
Andrew T.
PhySci.org
Thorsten Kiefer - 14 Mar 2008 10:26 GMT
> ..WHY?!?  (sorry for shouting, but I am astonished,
> is all)  Why on earth would you want a beautiful
[quoted text clipped - 6 lines]
> (if that makes any sense).  I was going to mention
> that as another plus of webstart, but forgot!
OK I'll stick to webstart an forget the applet

> * BTW - to anyone else interested, this thread
> began on the rather quiet c.l.j.3d group,
[quoted text clipped - 3 lines]
> this one.  If you want to get tetchy at anyone for
> multi-posting, please feel free to do it at me.
Sorry ;)

Can you give me an exmple jnlp file that references
the java3d jnlp file ? I looked through the jnlp
file format and could only find <nativelib> tag.

-tk
Andrew Thompson - 14 Mar 2008 11:23 GMT
...
> > ..when launched with webstart, the becoming apps.
> > become free-floating and can they easily be resized
> > (if that makes any sense).  I was going to mention
> > that as another plus of webstart, but forgot!
>
> OK I'll stick to webstart an forget the applet ..

Yay!

> > * BTW - to anyone else interested, this thread
> > began on the rather quiet c.l.j.3d group,
...
> Sorry ;)

It's cool, or rather, since I probably should
have given you the warning about m-p at the very
moment I was advising you to post 'somewhere else'
I do not feel you owe *me* an apology, so I
will 'pass that on' to the rest of the folks
that read and contribute to the group.

> Can you give me an exmple jnlp file that references
> the java3d jnlp file ?

Sure, but here's a tip.

Use this search..
<http://www.google.com/search?as_q=java3d&as_filetype=jnlp>

Then grab any of the hits and feed the URL to this
source..

<sscce>
import java.awt.*;
import javax.swing.*;
import java.net.*;

class ShowURL {

 public static void main(String[] args) throws Exception {
   String address = JOptionPane.showInputDialog(null, "URL");

   URL url = new URL(address);

   JEditorPane jep = new JEditorPane(url);

   JScrollPane jsp = new JScrollPane( jep );
   JPanel panel = new JPanel(new BorderLayout());
   panel.add( jsp );
   panel.setPreferredSize(new Dimension(400,300));

   JOptionPane.showMessageDialog(null, panel);
 }
}
</sscce>

..and you can see how others do it!

Here is the first hit I am seeing for 'Sudoku'.
(reformatted to something more like we might be
used to seeing XML)

<!-- JNLP File for Sudoku Ball Application -->
<jnlp spec="1.0+" codebase="http://www.sudoku.gs/sudokuballapp/
app/">
<information>
 <title>Sudoku Ball Application 1.0.13-beta</title>
 <vendor>Mobile Excellence B.V. & LenSoft International Ltd.</
vendor>
 <icon href="icons/ballapp.jpg"/>
 <icon href="icons/ballapp.jpg" kind="splash"/>
 <offline-allowed/>
</information>
<update check="timeout" policy="always"/>
<resources>
 <j2se href="http://java.sun.com/products/autodl/j2se" version="1.4+"/

 <jar href="SudokuBall.jar" download="eager" main="true"/>
 <extension href="http://download.java.net/media/java3d/webstart/
release/java3d-latest.jnlp"/>
</resources>
<security>
 <all-permissions/>
</security>
<application-desc main-class="BallApplet"/>
</jnlp>

>..I looked through the jnlp
> file format and could only find <nativelib> tag.

Interestingly, the 2nd hit seems to be the extension
itself 'java3d-latest.jnlp'.  It is probably *that*
JNLP that needs to make use of the nativelib element(s).

It is the 'extension' element in your JNLP that
causes the J3D API to be installed.

Your code would be mentioned where it makes reference
to SudokuBall.jar.

Even more interestingly, I doubt the SudokuBall
splash would ever appear.  The JNLP file declares
no 'href' in the JNLP element - which casues all
sorts of strange behaviour with caching, splash
screens and desktop integration.

..Maybe I should try and hunt down an email
address to contact them.

--
Andrew T.
PhySci.org


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.