Need help! Vrml&Java&Java3D

I want to control a Vrml Model through Java applet or Java 3D,I try some methods,but none of them work well.
I edited my source code in UltraEdit,and compiled it under command line,in my classpath,I had added the vrml97.jar,so I compiled it successful,but when I run it,it cause a exception"NoClassDefException",what should I do?
So I changed my method,I used another "jar" file provided by cosmoplayer,a Vrml Browser,to control my model,as example in the web,I complied it successful,but when I run it through IE,it still cause some exceptions,even when I try the example provided by cosmoplayer itself,it also give me some wrong information just like this:
Loading Script Node class http://foo.co.jp/Example1.class
# Could not load the script class http://foo.co.jp/Example1.class.
# Please make sure the class is declared PUBLIC or the class file exists.
but this class file is on that path properly! I was puzzled
with this for a long time.by the way,all the document in the web only write the source file like this:
import vrml.*;but I can't found this package,so I renamed the nocosmop21.jar into vrml.jar.and put it in the classpath,but I think this is not the correct way,it must cause a lot of trouble.So if I want use the jar provided with cosmoplayer,what should I do?

Did you install Vrml97.jar in your JRE's ext folder (so it will be used in running your applet) as well as you SDK's folder (so that it can be used in the compile)?
Check out the link shown below where I've worked with another person who had similar problem -- while I was able to finally helped that person, it turned out that I wasn't too succesful myself simply because I was using SDK1.3.1.
http://forum.java.sun.com/thread.jsp?forum=37&thread=231662
The problem with using vrml in an applet is that if you need to read a .wrl file from the local disk with the vrml class loader, you run into two security violations: runtime permission to use the class loader and i/o permission to read the local disk file. The URL that I posted in the link shown above is still active and you can try to run this self-signed applet to see if it works for you.
V.V.

Similar Messages

  • Need help with java

    ok so i have a midterm and need help this question that is gonna be on the midterm. i dont know how to do it and its worth 16 marks!!!! here it is
    the UW Orchestra wants to produce a CD containing all the pieces of music
    from its upcoming concert. In order to do that, it needs to calculate the total length of time for the
    CD. In addition, the conductor wishes to know which piece of music has the longest duration.
    Sample output for the program.
    The Swan (3.88)
    The Bee (0.98)
    Claire de Lune (6.02)
    Liebesfreund (3.38)
    Ragtime (3.48)
    The total time for the CD is 18.74 minutes.
    The longest piece is Claire de Lune.
    Do not include the HTML that is required to embed the program into a Web page (that is, show
    only what you would write between <script> and </script> tags).
    [4 marks] In the following space, define a function, Print, that takes two parameters, Title and
    Length, and outputs a line of text such that Title appears in italics, followed by Length in
    parentheses. The function also returns the value of Length.
    For example, Print("My World",30) will output the line
    My World (30)
    and return the value 30.
    Put your JavaScript program for the remainder of this question in the space provided on the next
    two pages.
    [9 marks]. For each piece of music, your program should input the title of the piece and the
    duration (in minutes) for that piece, and it should output a line showing those values using the
    Print function just defined. After all pieces have been listed, the program should output the
    total length of time for the CD, adding in 0.25 minutes between each piece of music (which is
    needed on the CD to separate the pieces).
    [3 marks] The program should also output the name of the piece that has the longest playing
    time.
    Use reasonable variable names, indentation and good programming style. Documentation and
    comments are not required, but you may add them to explain any assumptions you might want to
    make. You need not check that the input is valid, and you may assume that no two pieces have the
    same duration.
    can anyone help me out! i would be indebt of ur kindness if u can help me out!

    This forum is for Java, not JavaScript. The two have nothing to do with each other.
    And anyway, this is your studying, so you should try to do it, put forth your best effort, and ask specific questions (on the proper fourm).

  • Need help with Java Script to perform a calculation in Adobe Acrobat Pro 9 form

    I have a form (test) that I am creating in Adobe Acrobat Pro 9.
    I need help creating custom Java Script so I can get the desired answer.
    1) There are several questions in each group that require a numerical answer between 0-4
    2) There is a total field set up to sum the answers from all above questions
    3) The final "score" takes the answer from Step 2 above and divides by the total possible answer
    Any help on what Java Script I need to complete this would be greatly appreciated!
    I've attached a "spreadsheet" that shows it in more detail as well as what formulas I used in Excel to get the desired end result.
    Thanks in advance.

    Have you tried the "The field is the average of:"?

  • Need help in Java Script

    i Need some help in Java Script,
    am using the following code :
    <script type="text/javascript">
    var newwindow;
    function poptastic(url)
    newwindow=window.open(url,'name','height=300,width=400,left=100, top=100,resizable=yes,scrollbars=yes,toolbar=yes,status=yes');
    if (window.focus) {newwindow.focus()}
    else {newwindow.close()}
    //     if (window.focus) {newwindow.focus()}
    </script>
    In HTML,
    thWorld Environment
    Day, June 5<sup>th</sup>,2005
    Am using onmouseover event, so that when my mouse in on the link, popup is opened....and when my mouse is out of the link, the new window should b closed....
    but according to the above code, the new window is opened but have to close it manually....
    Is there any other way to close the popup when my mouse is out of the link

    Prawn,
    This is not really a good way to make friends. With the cross posting and the posting in a wrong forum anyway thing you have going.
    Please kindly take your question to an appropriate JavaScript forum.
    Have a happy day.
    Cross post from http://forum.java.sun.com/thread.jspa?messageID=3797201

  • Need Help Regarding JAVA BEAN

    Is any one tell me that JAVA BEAN only used in WEB or also you in Desktop applications???? and aslo tell how i implement Java class and use JAVA BEAN. I need help regarding above matter
    thanks in advance
    Rehan MIrza

    Here is a good link that indicate that JavaBean is not only for applets
    http://java.sun.com/docs/books/tutorial/javabeans/whatis/beanDefinition.html
    quote:
    The JavaBeans API makes it possible to write component software in the Java programming language. Components are self-contained, reusable software units that can be visually composed into composite components, applets, applications, and servlets using visual application builder tools. JavaBean components are known as Beans.
    Francois

  • Need help on Java in sound application

    A good day to everyone here,
    I need help on using Java.My project is mainly manipulating WAV sound files with Java. There is some problem.I hope you all can help me. I couldn't find much info about Java in sound manipulating,sample coding or something like that. I need to find the command to
    1) Find each sampling point value in a sound file.
    2) Find the number of sampling point and the average value of the all the sampling point.
    3) Record the sound file in a different bit rate format.
    I dont know how to go about it.I really hope you all can help me, or direct me to any resources that may help me. Your help is very much appreciated.
    Thank you very much....

    i found this coding in a website n i not very sure that i understand it.
    can anyone tell me if i can find the sample point value of a sound file with this coding (byte[] source is byte array of the sound file).
    thanks...for all the help
    public byte[] executeAmplitudeTransformationInternal(byte[]
    source)
    int[] sampleArray = getSampleArray(source);
    int[] newSampleArray = executeTransformation(sampleArray);
    //convert 16 bit samples back to 8 bit byte[]
    return getByteArray(newSampleArray);
    public int[] getSampleArray(byte[] eightBitByteArray) {
    //create an array 1/2 the size (since every 2
    //8bit samples makes 1 16bit sample)
    int[] toReturn = new int[eightBitByteArray.length];
    int index = 0;
    for (int t = 0; t < eightBitByteArray.length; t += 2) {
    //read the high bit
    int low = (int) eightBitByteArray[t];
    //read the low bit
    int high = (int) eightBitByteArray[t + 1];
    //bit shift the high bit 8 bits to the left and
    // "And" the low bit against 255 to drop any
    //sign extended data in the top 8 bits.
    //refer to the tutorial for more clarification
    toReturn[index] = (high << 8) (low & 0x00ff);
    index++;
    return toReturn;
    public byte[] getByteArray(int[] sampleArray) {
    //create a new byte[] twice as big as the sample array
    //because it takes two 8-bit bytes to represent one
    //16-bit sample
    byte[] toReturn = new byte[sampleArray.length * 2];
    int index = 0;
    for (int t = 0; t < sampleArray.length; t++) {
    int sample = sampleArray[t];
    //this places the low byte in the array.
    //the downcasting automatically lops off the high byte
    toReturn[index] = (byte) sample;
    index++;
    //this byte shifts the sample 8 bits to the right
    //this puts the old high byte in the position of the low byte.
    //this way the high byte remains after the downcasating from
    //an int to a byte
    toReturn[index] = (byte) (sample >> 8);
    index++;
    return toReturn;
    public int[] executeTransformation(int[] sampleArray) {
    //create a clone sample array
    int[] newSampleArray = new int[sampleArray.length];
    //apply algo to each sample
    for (int t = 0; t < sampleArray.length; t++) {
    int result = (int) (sampleArray[t] );
    //add the sample
    newSampleArray[t] = result;
    return newSampleArray;

  • Need help with Java always get error

    hey guys need help
    this the problem i get :
    I go to certain websites and I get this error with firefox.
    This Site requires that JavaScript be enabled.
    It is enabled.
    This is the one of the errors in java script console with firefox.
    Error: [Exception... "'Component does not have requested interface' when calling method: [nsIInterfaceRequestor::getInterface]" nsresult: "0x80004002 (NS_NOINTERFACE)" location: "<unknown>" data: no]
    I have installed the java script from there home site and did a test and says everything is fine. Any ideas?
    please help

    Hi 49ers,
    Sorry not to have any real idea of how to help you out here, but this is a Java forum, not JavaScript.
    Some Firefox expert may stumble across your post and be able to offer some advice (I hope they do) but this isn't really the best place to post such questions.
    Try here: http://www.webdeveloper.com/forum/forumdisplay.php?s=&forumid=3
    Good luck!
    Chris.

  • Need Help with Java Desktop CP Icon

    I just formatted and reinstalled Windows XP Home SP2 and installed the JRE 1.5.0.02. I usually see an icon in my Control Panel but it only appears in the Administrator's CP which I can reach in Safe Mode of course, but it would be easier to deal with if it appeared somewhere on my desktop/taskbar or CP (I am also an Admin). In Safe Mode I made sure that the right settings were made for displaying, but it doesn't.
    I know precious little about Java so I need help here.

    This forum is dedicated to Sun's Java Desktop System, an alternative desktop operating environment. Try reposting here:
    http://forum.java.sun.com/forum.jspa?forumID=54

  • Need help for java program

    Hi,
    I need help with my web application. When i tried to run it using
    localhost:8080
    it's giving me error that
    signup.do file is not available.
    can someone tell me what could be wrong with my code?
    I want to know what is .do file and what needs to do to have remove the error
    I have also used struts config file.
    Please help me.
    Message was edited by:
    star4588

    See struts documentation here http://struts.apache.org/1.2.9/userGuide/building_controller.html#action_mapping_example
    you should have something like that :
    <action-mappings>
            <action
                path="/signup"
                type="org.apache.struts.webapp.example.SignupAction"
                name="signupForm"
                scope="request"
                input="/signup.jsp"
                unknown="false"
                validate="true" />
        </action-mappings>in your struts-config.xml.
    Hope That Helps

  • Need help regarding Java decoding of IMAP attachment (IOStream related ques

    Hi ,
    I need some help regarding the processing of an IMAP attachment , It is a basic IOStream related question I guess.
    I have some attachment to a mail , I try to fetch it using javamail and read the content and write it to a file , I was able to do it successfully when I was using stream.read( tempBuffer) function but when I started using stream.read( tempBuffer, 0, m_maxDataSize ); it is giving me following exception
    java.io.IOException: Error in encoded stream: needed at least 2 valid base64 characters, but only got 1 before padding character (=), the 10 most recent characters were: "/59PT/eXQ="
         at com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java:259)
         at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:148)
    ***Here is the snippet of code that is running this:***
    m_contentObj = m_message.getContent();
    if(m_contentObj instanceof InputStream)
         System.out.println(" Content is type of InputStream");
         InputStream stream = (InputStream) m_contentObj;
         byte[] tempBuffer = new byte[m_maxDataSize];
         stream.skip( m_currPos );
         int bytesRead=stream.read( tempBuffer, 0, m_maxDataSize );
         System.out.println(" Read the following no of bytes from the Object::"+bytesRead);
         m_currPos+=     bytesRead;
    Please suggest what to do.
    Thanks & Regards
    Saurabh

    BUMP, just incase its been missed by a new board member

  • Need Help With Java Query String

    I'm new to Java and I'm passing data via a URL to another page(I'm not using a form). I have been succesfull in decoding the string to return the name value below:
    <SCRIPT LANGUAGE="JavaScript">
    function decodeSearchString() {
    var nameValue = new Array();
    var searchStr = unescape(location.search.substring(1));
    if (searchStr) {
    var formElement = searchStr.split("&");
    var tmpArray = new Array();
    for (k = 0; k < formElement.length; k++) {
    tmpArray = formElement[k].split("=");
    nameValue[tmpArray[0]] = tmpArray[1];
    return nameValue
    var srchData = decodeSearchString();
    </SCRIPT>
    However, now I need to add the value returned from the above srcipt to the Java script listed below:
    <SCRIPT Language="Javascript" SRC="#srchData.link#?open&pID=PAR"> </SCRIPT>
    This above script if working will add the HTML from the URL query to the page, but I keep getting a Java Error with this script. Please Help !

    I assume you are using a JSP page and not just solely doing Javascript. IF you are using JSP, then read on. Otherwise, I can revisit your script.
    To obtain the value of the query string, you would use a method call such as:
    String strQuery = request.getQueryString()
    Or, to get a single parameter off the query string, you can call:
    String strSearchData = request.getParameter("paramname");
    Or, if you want all the parameters and values instead of just one long string you can call:
    Enumeration enumParamNames = request.getParameterNames();
    You can use the above enumeration in combination with getParameter() to get the values.
    In order to build your script line and add the query string, you would then do something like this:
    <SCRIPT Language="Javascript" SRC="#<%=strSearchData%>.link#?open&pID=PAR"> </SCRIPT>
    Notice the <%= %> block in the above code.
    I hope that is what you were looking for. Your example is somewhat confusing so I may have answered wrong.
    Mike

  • Need help on Java Mapping

    000000000000F0011000001448MSQUAL9010000000906                                                                                *
    200798438321H001                                                                                SHEN.500010/10/200723:56:55NOSP                                                                                KWO4A                                                             MS*
    2007984383215397                             00000500000205                                                                                *
    2007984383215396                             00000200000205                                                                                *
    200798438321C001                                                                                *
    200798438322H001                                                                                SBHS.500011/10/200705:50:00NOSP                                                                                AGH4A                                                             MS*
    2007984383225397                             00000500000205                                                                                *
    2007984383225396                             00000238000205                                                                                *
    2007984383220012                             00001480000355                                                                                *
    200798438322C001                                                                                *
    =============================================
    Main header :000000000000F0011000001448MSQUAL9010000000906  ( relation 1:1 )
    Each record ending with Start : *
    Sub Header : 200798438321H001  ( relation  0:unbound )
    body messages 00000500000205  ( relation  0:unbound )
    Close Subheader :200798438322C001     ( relation  0:unbound )
    any one could help how to write the Java mapping , am able to get the data from local folder , but error getting as a message mapping error, there is no key field values for in this message.
    Probably it should be happen with Java mapping, actually I am from SAP SD back ground, can understand the ABAP.
    Warm regards,
    kumar.

    Hi,
    I think file adapter is sufficient for you. Dont need any java mapping. Refer to the file adapter content conversion for sender. Identify the key fields for heading, messages and footer. Then define record set with repeating structures in it like head,1,msg,*,footer,1.
    This should solve the problem.
    VJ

  • Need HELP with JAVA RUNTIME Environment

    Hi,
    I just download J2EE, J2SE, and Ant from sun site. I am having problem to compile java program. Here what I did
    1)     Download J2EE at c:\j2sdkee1.3.1 directory
    2)     J2SE at c:\Program Files\Java\j2re1.4.1_01 dir
    3)     Ant at ant c:\Jakarta_ant-1.3 dir
    My operating system is windows 2000. Therefore, I set up environment variables from system ->Advance ->Environment ->Variables ->System variables ->New
    Variable = ANT_HOME
    Value = c:\ant\Jakarta_ant-1.3
    Variable = J2EE_HOME
    Value = C:\j2sdkee1.3.1
    Variable = JAVA_HOME
    Value = c:\Program Files\java\j2re1.4.1_01
    Variable = CLASSPATH
    Value = c:\j2sdk221.3.1\lib\j2eetools.jar
    Edit
    Variable = Path
    Value =
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\MSSQL7\BINN;%JAVA_HOME%\bin;%J2EE_HOME%\bin;%ANT_HOME%\bin
    I restart my machine and try to execute the following command from command Prompt in c:\ dir
    C:\> j2ee ?verbose
    The following message pop up
    ?C:\Program? is not recognized as an internal or external command, operable program or batch file.
    I would appreciate if someone explain me what I did wrong in set up so this test program is not working.
    Do I need to run j2ee ?verbose some other directory? Which directory should I compile my java file?
    Did I set up my environment variable correctly or I need to do something else?
    Please help me out.
    Thanks a lot.
    Sam

    try to set JAVA_HOME environment variable to
    C:\PROGRA~1\java\J2RE14~1.1_0
    when you dir name contains space symbols, you should enclose it in commas or use a short form
    "C:\Program Files\java\j2re1.4.1_01"
    is equals to
    C:\PROGRA~1\java\J2RE14~1.1_0

  • Need help in java.security, please............

    I need to implement encryption in my java card.
    My sdk is v.2.2.1.
    At first, I just write a easy code and test adpu command in jcwde and it works well. (response 90)
    But every time when I trying to put
    desKey = (DESKey)KeyBuilder.buildKey (KeyBuilder.TYPE_DES,KeyBuilder.LENGTH_DES,false);"
    into procedure, the response becomes 6444, which means install error.
    Some people said in the forum that javacard.security only provide key interface, but is it the same in v2.2.1? If it is,then what's the function of KeyBuilder?
    Below is a part of my code.
    private SimCipher(byte[] bArray, short bOffset, byte bLength)
         desKey = (DESKey)KeyBuilder.buildKey (KeyBuilder.TYPE_DES,KeyBuilder.LENGTH_DES,false);
              register();

    Thank you for your reply. Actually, I was trying to implement AES in smart card, and I decide to write it myself. It is sucessed.
    Thank you again for your help.

  • First Timer Need Help using Java Web Start

                        The following Error Message was thrown when I tried to launch an app
              using Java Web Start...
    An error occurred while launching/running the application.
    Title: Swing Application - Hello World
    Vendor: Ramanujam
    Category: Download Error
    Bad MIME type returned from server when accessing resource: http:\\localhost:8000\test/SimpleExample.jnlp - text/html
              My JNLP file
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for SimpleExample Application -->
    <jnlp codebase="http:\\localhost:8000\test" href="SimpleExample.jnlp">
         <information>
              <title>Swing Application - Hello World</title>
              <vendor>Ramanujam</vendor>
              <description>Test JWS</description>
              <description kind="short">Test JWS</description>
              <offline-allowed/>
         </information>
         <resources>
              <j2se version="1.4"/>
              <jar href="test.jar"/>
         </resources>
         <application-desc main-class="JWSTest"/>
    </jnlp>
                   The exception thrown :
    NLPException[category: Download Error : Exception: null : LaunchDesc: null ]
         at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
         at com.sun.javaws.cache.DownloadProtocol.isLaunchFileUpdateAvailable(Unknown Source)
         at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
         at com.sun.javaws.Launcher.downloadResources(Unknown Source)
         at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
         at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
         at com.sun.javaws.Launcher.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:536)
    Also, How to configure MIME mapping for .jnlp files on J2EE server (I do not have another server) and if there is a need, how do i deploy the jar and the jnlp file on J2EE server?
    Kindly help.....

    Hi,
    I have the same problem, but I do have configured the webserver (Apache 2) correctly and the server is NOT returning a 404 error.
    To check this I used the a tcp monitor (Apache Axis).
    The error message in Java Webstart is identical to the one discribed above.
    In the tcp monitor I see the following :
    HTTP/1.1 200 OK
    Date: Tue, 19 Nov 2002 15:16:57 GMT
    Server: Apache/2.0.43 (Win32)
    Last-Modified: Tue, 19 Nov 2002 15:13:58 GMT
    ETag: "44eb-300-bebdba39"
    Accept-Ranges: bytes
    Content-Length: 768
    Keep-Alive: timeout=15, max=97
    Connection: Keep-Alive
    Content-Type: application/x-java-jnlp-file
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://ns003:88/ns" href="jviews.jnlp">
    <information>
    <title>JViews TWD Demo Applicatie</title>
    <vendor>Cap Gemini Ernst & Young</vendor>
    <homepage href="default.html"/>
    </information>
    <resources>
    <j2se version="1.3"/>
    <jar href="jviewsapplet.jar"/>
    </resources>
    <application-desc main-class="JViewsClient"/>
    </jnlp>
    Any idea?
    Cheers, Joost

Maybe you are looking for

  • My palm life drive wont load

    Hi all and thanks in advance for any help recently my palm life drive has stopped loading i turned it off one night and in the morning i turned it on but it got stuck on the palm logo and wont go any further ive tried everything i can think of ive tr

  • Header and Item Conditions in EBP PO

    HI All, I've just checked the pricing conditions in spro of SRM and as per my business requirement I need to maintain both header and item conditions and replicate the values back to r/3 in extended classic scenario like freight,surcharge,discounts e

  • Quicktime in a html page

    Hi! I want to show some of my short films (.mov) direct in the page who is build in html. Can someone please help me how i can do that. What code can i use to do that? Please, please someone who are nice to help me. /Marias1967

  • View of Document Library showing only documents based on dates in columns.

    I have a document library which includes only one content type of "Job Posting", which includes a "Posting Date" column, and a "Closing Date" column. I want a Web Part View of this library that will only show the documents when the current date is af

  • Change Picking data, then call Delivery Note and Invoice in the background

    I have designed a GUI where the picking data (from table LIPS) is changed.  Now my SD consultant wants the program, when a SAVE or CONTINUE button is clicked, to do the Delivery Note and Invoice in the background. To quote: Your progrm must change th