Cube.obj wont load

cube.obj wont load, I installed java3d, all other java3d tutorials work except the ones with wavefront .obj models. My code is:
//Comment out the following package statement to compile separately.
package com.javaworld.media.j3d;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.media.j3d.*;
import javax.vecmath.*;
import com.sun.j3d.loaders.*;
import com.sun.j3d.loaders.objectfile.*;
import com.sun.j3d.utils.geometry.*;
import com.sun.j3d.utils.universe.*;
* Example06 uses Sun's ObjectFile to load in Wavefront OBJ
* format 3D content.
* <P>
* Note that using the default ObjectFile settings does read
* in the data, but does not give the Java 3D runtime enough
* information to display the file correctly after parsing
* it. The world looks empty, though the object has been
* loaded.
* <P>
* To display and interact with OBJ content in Java 3D,
* please use Sun's more robust demo application, ObjLoad.
* (Available in the Java 3D examples download from Sun's site.)
* <P>
* This version is compliant with Java 1.2 and
* Java 3D 1.1 Beta 2, Nov 1998. Please refer to: <BR>
* http://www.javaworld.com/javaworld/jw-01-1999/jw-01-media.html
* <P>
* @author Bill Day <[email protected]>
* @version 1.0
* @see com.javaworld.media.j3d.Example04
* @see com.sun.j3d.loaders.Scene
* @see com.sun.j3d.loaders.objectfile.ObjectFile
public class Example06 extends Frame {
* Instantiates an Example06 object.
public static void main(String args[]) {
new Example06();
* The Example06 constructor sets the frame's size, adds the
* visual components, and then makes them visible to the user.
* <P>
* We place a Canvas3D object into the Frame so that Java 3D
* has the heavyweight component it needs to render 3D
* graphics into. We then call methods to construct the
* View and Content branches of our scene graph.
public Example06() {
//Title our frame and set its size.
super("Java 3D Example06");
setSize(800,600);
//Here is our first Java 3d-specific code. We add a
//Canvas3D to our Frame so that we can render our 3D
//graphics. Java 3D requires a heavyweight component
//Canvas3D into which to render.
Canvas3D myCanvas3D = new Canvas3D(null);
add(myCanvas3D,BorderLayout.CENTER);
//Turn on the visibility of our frame.
setVisible(true);
//We want to be sure we properly dispose of resources
//this frame is using when the window is closed. We use
//an anonymous inner class adapter for this.
addWindowListener(new WindowAdapter()
{public void windowClosing(WindowEvent e)
         {dispose(); System.exit(0);}
//Use SimpleUniverse. Move viewing position so we can
//see everything in our scene.
SimpleUniverse myUniverse = new SimpleUniverse(myCanvas3D);
BranchGroup contentBranchGroup = constructContentBranch();
myUniverse.addBranchGraph(contentBranchGroup);
ViewingPlatform myView = myUniverse.getViewingPlatform();
TransformGroup myViewTransformGroup = myView.getViewPlatformTransform();
Transform3D myViewTransform = new Transform3D();
myViewTransform.setTranslation(new Vector3f(2.0f,0.0f,11.0f));
myViewTransformGroup.setTransform(myViewTransform);
* constructContentBranch() is where we specify the 3D graphics
* content to be rendered. Here we read in a square using
* Sun's OBJ loader, then return this to be rendered. This
* square could be replaced with more complicated content exported
* from 3D modeling programs supporting the OBJ format.
private BranchGroup constructContentBranch() {
ObjectFile myOBJ = new ObjectFile();
Scene myOBJScene = null;
//Attempt to load in the OBJ content using ObjectFile.
try {
myOBJScene = myOBJ.load("cube.obj");
} catch (FileNotFoundException e) {
System.out.println("Could not open OBJ file...exiting");
System.exit(1);
//Construct and return branch group containing our OBJ scene.
BranchGroup contentBranchGroup = new BranchGroup();
contentBranchGroup.addChild(myOBJScene.getSceneGroup());
return(contentBranchGroup);
}

Most probably the obj file is not in the right directory (it must be in the working directory as I have seen from the code).

Similar Messages

  • My app store wont let me search for apps it wont load anything

    when i go to search for an app in the app store it wont load anything i even tried searching for angry birds becasue i know theres an app for that and nothing loads at all i have turned off and on my phone and still nothing!

    Tap Settings App > General > Reset > Reset Network Settings. Then in Settings make sure Cellular Data is ON. If you are in a WiFi area, relog into WiFi.

  • My itunes wont load and i need it because i locked my ipad

    Help my itunes wont load and i need it because i had locked my ipad

    Check to see whether it's running under processess in task manager (Right click task bar).  If so, end process and try again.

  • Itunes wont load due to java scriptcore.dll what do i do, itunes wont load due to java scriptcore.dll what do i do

    Suddenly itunes stopped loading. I uninstalled it and tried to reinstall it but it wont load saying the Java sript core.dll is not valid. What do i do to fix this? And will i be able to get my downloads back?

    Taken at face value, you're having trouble with an Apple Application Support program file there. (Apple Application Support is where single copies of program files used by multiple different Apple programs are kept.)
    Let's try something relatively simple first. Restart the PC. Head into your Add or Remove Programs control panel, select "Apple Application Support", click "Change" and then click "Repair".
    If no joy after that, try the more rigorous uninstall/reinstall procedure from the following post. (Although the procedure is for Vista and 7 and you've got XP, just read "Computer" as "My Computer", read "Uninstall a program control panel" as "Add or Remove programs control panel" and assume the system is 32-bit, and you'll be doing the right things.)
    Re: I recently updated to vista service pack 2 and I updated to itunes 10.2.1 and ever

  • If I have more then a few tabs open such as gmail, facebook, and a zynga game no tabs will load at all. I close and reopen firefox numorous (Im talking 7 or 8 times or many more) and shut down the zynga game and still it wont load

    If I have more then a few tabs open such as gmail, facebook, and a zynga game no tabs will load at all. I close and reopen firefox numorous (Im talking 7 or 8 times or many more) and shut down the zynga game and still it wont load the tabs or if it does and I then try to add the game or any other site at all on a tab it causes firefox to stop working (though not close) and I have to restart opening and closing it many times to get it to work at all.

    1st, you will not be able to activate your PPro1.5 on ANY new computer, see next link for the special version you MUST use
    CS2 (and earlier) Activation Server http://helpx.adobe.com/x-productkb/policy-pricing/creative-suite-2-activation-end-life.htm l
    2nd, you already mentioned Virtual XP, so if a direct install doesn't work, that would be the way to go... or, to just do what SHOULD work from the start, just do Virtual XP

  • HT201407 during a update of apple my iphone 3GS crashed an now the operating system wont load up..ive tried to reset the phone to the factory settings it took 4 hours an completed but my iphone still wont come on..what can i do to fix the problem? please

    during a update of apple my iphone 3GS crashed an now the operating system wont load up..ive tried to reset the phone to the factory settings using itunes it took 4 hours and completed but my phone still wont come on..what can i do to fix the problem? please help #

    In trying to include what information all that I could I should have specified I DON'T KNOW THAT IT WAS DEFINATELY JAILBROKEN when I took it to the apple store they told me there's no way for them to tell if it was jail broken or not. I'm only going by what ppl have told me COULD HAVE BEEN DONE TO THE PHONE. With that said the only thing I know for sure is that the apple tech at the Genius Bar told me that someone took control of my root menu in February &amp; I've had no control of my phone since. I asked him how to regain control &amp; how he knew his exact words were "oh that is out of our scope of capabilities here at this level &amp; you would need an apple engineer to fix it". I said ok then how do I get an apple eng then? He laughed &amp; said you can't!!!! To which I was furious I came home &amp; called apple requesting to speak w/the fraud dept to file a report they said we don't have a fraud dept!! So after a 45 mn phone call again I left w/no answers.
    @TJBUSMC1973-
    I DON'T HAVE THOUSANDS OF DOLLARS TO SPEND HIRING AN ATTORNEY &amp; Although I appreciate your suggestion I fail to how an attorney would be able to facilitate in any way since there's no suspect. I cannot prove that it's him doing it so I certainly can't pursue legal action w/no proof &amp; no money. :'((
    Again I thank you for your advice but I don't think that will help.
    I was looking more for a TECHNICAL way to avoid this happening w/a new phone should I buy one or trying to get them out of my phone now! Such as installing some kind of software protection?? Someway to clear out the entire phone (other than factory reset which was done 10 x's w/no success, etc. if this person got in then there HAS TO BE A WAY OF GETTING HIM OUT, right????

  • Safari and other browsers slow to load and wont load https (secure)

    Since the last update of Safari 5, we have noticed that we can't load https pages. So we went to Firefox, that seemed to help for awhile. Now we can't always load https in either. We are also seeing that http pages wont load quickly in either browerser. We have researched all posts within the last month about Safari 5 and hang ups, crashes and slow loading....we have tried everything suggested. Since sites don't load quickly, this has taken a lot of time. Any suggestions would be wonderful. We have contacted our DSL provider 6 times in the last 30 days and they can't find anything wrong with their service or with the modem. We are at a loss. Currently we are trying to download the MocOSXUpdCombo 10.6.4 but we keep timing out. Don't even know if this post will post. Oh yeah, Mail is having problems as well. We ran disk first aid and did the permissions as well. Any suggestions would be wonderful.

    Hi again:
    I am a long way from an expert on anything - SSL or communications. The fact that both browsers are affected seems to take it out of a Safari-only thing. Also, since everything works on your other computer seems to let your ISP off the hook. I don't think it is your computer, per se.
    I did get some random thoughts. Things you might look at/try:
    1. Reset Safari (empty the cache, for sure)
    2. Take a look at the firewall settings on the computer that is giving you problems.
    3. You might try Open DNS (free one) to see if the domain name server process is, somehow, an issue:
    http://www.opendns.com/start/
    4. You might also download the OS X 10.6.4 combo updater and reapply it. That is probably an overkill and it will take awhile, but it is possible something went wrong with the update.
    You can see I am fishing, but nothing seems to be consistent in the behavior.
    Barry
    P.S. The tundra may be frozen, but you live in a beautiful state.

  • Safari wont load some sites but will open others

    Hi
    Since yesterday morning, my mac will all of a sudden not load certain websites while others load fine. For example some that wont load are google, gmail, commonwealth bank, about.com, but facebook and a number of others still load. I get the "Safari can't connect to the server" error page. Same thing in firefox.
    I have an ADSL modem (netgear) connected to my mac running 10.6, via ethernet. My modem is not a router. I share my macs internet connection via airport, and i can still access everything fine on my iphone and ipad which tells me its something specific to my mac.
    I havent changed any settings so I have no idea why my internet is suddenly so selective of what it will access.
    I tried flushing the DNS and changing the MAC access in the terminal with no result.
    Any idea? Its driving me insane :-/

    Brian --
    Welcome to Apple Discussions!
    We're not staff, but other Mac users here, asking questions and sharing solutions.
    So happy you found your solution!
    If you haven't already seen this, it will ring a bell with you, I think:
    http://discussions.apple.com/thread.jspa?messageID=13270248&#13270248
    Great sleuthing there, Brian.

  • How can I deactivate when Acrobat Pro XI wont load?

    I installed a purchased upgrade of Acrobat Pro XI on this computer but all I now get is a screen headed 'Sign in Required' inviting me to register my trial version but providing no links to do so.
    Much of Acrobat XI Pro did not work.properly but Adobe tells me I don't have sufficient memory despite the required 1GB being installed.
    An unsatisfactory product from a company now difficult to contact by email that hides behind an unhelpful 'Help' desk in India staffed by non-proficient English speakers incapable of providing any answers not on their crib sheets.
    I am directed here to get a user to do Adobe's work.
    What follows indicates Adoobe sens emails from non.valid addresses.
    Mail System Error - Returned Mail
    From: Mail Administrator <[email protected]>   |   Date: 25/09/2013 3:47 PM  |  Email  
    To: John Face<[email protected]>   View message details  
    Attachments: Part_0 (350b) (350b)  
            This Message was undeliverable due to the following reason:
    Each of the following recipients was rejected by a remote mail server.
    The reasons given by the server are included to help you determine why
    each recipient was rejected.
    Recipient: <[email protected]>
    Reason: No such user - psmtp
    Please reply to <[email protected]>
    if you feel this message to be in error.
    Causes nothing but problems.
    Just posted on your forums
    3:39 PM 25/09/2013
    http://forums.adobe.com/post!input.jspa?containerType=14&container=4714
    How can I deactivate when Acrobat Pro XI wont load?
    I installed a purchased upgrade of Acrobat Pro XI on this computer but all I now get is a screen headed 'Sign in Required' inviting me to register my trial version but providing no links to do so.
    Much of Acrobat XI Pro did not work.properly but Adobe tells me I don't have sufficient memory despite the required 1GB being installed.
    An unsatisfactory product from a company now difficult to contact by email that hides behind an unhelpful 'Help' desk in India staffed by non-proficient English speakers incapable of providing any answers not on their crib sheets.
    I am directed here to get a user to do Adobe's work.
    http://forums.adobe.com/thread/1303366
    From: Adobe <[email protected]>
    To: [email protected];
    Subject: Reuse content making tedious work easier
    Stop retyping and start reusing.
    See how
    >>http://www.adobe.com/au/campaigns/acrobat-xi-content-reuse.html?trackingid=KIKZR
    Read online
    >>http://click.mail.adobesystems.com/?qs=1fdac03698836d3f227a6f8e4faefabc020ad712061d8f58583 a1aeff2e2ddc999d80757db497536
    --=----=----=----=----=----=----=----=----=----=----=----=----=----=--
    Adobe(R) Adrobat(R) XI
    --=----=----=----=----=----=----=----=----=----=----=----=----=----=--
    Stop retyping and start reusing. Acrobat XI puts an end to the
    busywork when it comes to repurposing PDF file content.
    See how
    >>http://www.adobe.com/au/campaigns/acrobat-xi-content-reuse.html?trackingid=KIKZS
    It?s a breeze to reuse what you need from PDF files with Acrobat XI.
    When you need to grab important content from inside a PDF or reuse the
    whole thing, Adobe(R) Acrobat(R) XI software makes it easy to convert
    PDF documents to Microsoft Word, Excel, and PowerPoint?with no
    retyping and minimal reformatting.
    As simply as saving a file, you can get just what you need and get
    back to more important work.
    See how >>
    >>http://www.adobe.com/au/campaigns/acrobat-xi-content-reuse.html?trackingid=KIKZT
    PC magazine Editor's choice 2012
    --=----=----=----=----=----=----=----=----=----=----=----=----=----=--
    #Acrobat
    >>http://twitter.com/search?q=%23acrobat
    --=----=----=----=----=----=----=----=----=----=----=----=----=----=--
    PCmag.com Editors' Choice logo is a trademark of Ziff Davis, Inc.
    Used under license.
    Adobe, the Adobe logo, the Adobe PDF logo, and Acrobat are either
    registered trademarks or trademarks of Adobe Systems Incorporated in
    the United States and/or other countries. All other trademarks are the
    property of their respective owners.
    (C) 2013 Adobe Systems Incorporated. All rights reserved.
    This is an advertising message from Adobe Systems Pty Ltd, its
    affiliates and agents ("Adobe"), Tower 2, Level 27, 201 Sussex Street Sydney,
    New South Wales, 2000, Australia.
    If you'd prefer not to receive email like this from Adobe in the
    future, please click here to unsubscribe. Alternatively, you may
    mail your unsubscribe request to:
    >> http://click.mail.adobesystems.com/?qs=1fdac03698836d3f1ad59e785d5dc693562fd9325ddedc06b18 2523889dab970e16f0296df7a4a18
    UNSUBSCRIBE
    >> http://click.mail.adobesystems.com/?qs=1fdac03698836d3f1ad59e785d5dc693562fd9325ddedc06b18 2523889dab970e16f0296df7a4a18
    Adobe Systems Pty Ltd
    Tower 2, Level 27, 201 Sussex Street
    Sydney, New South Wales,
    2000,
    Australia
    Attn:
    Field Marketing Department
    Your privacy is important to us. Please review Adobe's online Privacy
    Policy by clicking www.adobe.com/au/privacy.html (Australia)
    >>http://www.adobe.com/au/privacy.html
    www.adobe.com/nz/privacy.html (New Zealand)
    >>http://www.adobe.com/nz/privacy.html
    For customer service issues please visit our web site at
    www.adobe.com/go/supportportal or call (AUS) 1 800 614 863 or (NZ) 0
    800 485 948 for more information.
    >>http://www.adobe.com/go/supportportal
    General enquiries about Adobe
    communications:[email protected]
    >>mailto:[email protected]
    If you have a complaint, send it to:[email protected]
    >>mailto:[email protected]
    This email has been sent to [email protected]
    Message was edited by: OQOroger to indicate Adobe uses invalid addresses to customers who have already purchased the subject product

    You can refer to :
    Acrobat Learn & Support
    Installing, uninstalling Acrobat X | Mac OS
    Adobe Acrobat X Pro * Activation and registration
    http://www.adobe.com/content/dam/Adobe/en/accessibility/products/acrobat/pdfs/acrobat-xi-p ro-accessibility-best-practice…
    They are useful resources.
    Regards
    Rajshree

  • I transfered music from my ipod to a new itunes library (new PC).  The music plays in itunes but when I sync my ipod and try to drag songs from the itunes library to the ipod it wont load.  It shows a circle with aline through it.

    I transfered music from my ipod to a new itunes library (new PC).  The music plays in itunes but when I sync my ipod and try to drag songs from the itunes library to the ipod it wont load.  It shows a circle with aline through it.

    Have you selected manually manage music?

  • I receive an error stating user name and password are not valid on my ipad and iphone 3Gs when attempting to load email from my icloud account. When I log onto icloud from my Mac, it wont load the email either.

    One day, my ipad and iphone pick up my emails (.mac account) from icloud just fine. the next day, I recieved error messages that say my user name and password are not accurate. I removed the icloud program on both devices and added it back on to both devices and get the same message. I logged into icloud from my Mac and while I can log in, it times out when I select email and wont load the email there either. Any Suggestons?

    I am having the same problem; it started about 24-36 hours ago.
    I know my ID/PW combo are correct because I can access all other aspects of iCloud except mail.
    iPhone -- returns incorrect ID / Password
    iPad -- Same
    Mail.app on Mac -- returns incorrect password error
    icloud.com -- allows me to log in and use all functions accept mail.  When I try to use mail it stays on a white screen for about 60 seconds then returns a dialogue box that indicates a server error.
    I contacted Apple and they placed my iCloud account into something called "Troubleshooting" mode.  They generated a new strong password and sent it on to "Engineering."
    I suspect there are a small number ofo users like you who are affected with the same problem I am.  Too small a number for it to be reported as an outtage.  I suggest you call Apple and open a case to have your mail investigaged.
    Hope this helps...

  • My firefox wont load any page. Says it cant find the server of any of them. I can view the same pages in safari. I just updated to 3.6.7 and now having this problem. What is happening?

    My firefox wont load any page. Says it cant find the server of any of them. I can view the same pages in safari. I just updated to 3.6.7 and now having this problem. What is happening?
    == This happened ==
    Every time Firefox opened
    == Today ==
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16

    Read this somewhere else: Can't find it again so can't reference - apols.
    fixed by entering
    about:config into the nav bar
    toggle dom.storage.enabled to 'true'
    worked for me - but don't know what it does or why :)

  • Hi, i have an imac which i bought second hand but but the itunes store wont load up nor will me songs ect sync with the itunes on this comp? i have had no issues with this on previous laptops.... any more of this and i may move to samsung! please help!

    hi, i have an imac which i bought second hand but but the itunes store wont load up nor will me songs ect sync with the itunes on this comp? i have had no issues with this on previous laptops.... any more of this and i may move to samsung! please help!

    kaylsk1 wrote:
    udated and its on 10.6.8 yet still no change
    Your signature in 1st post was 10.8.2.
    You went backwards?
    Did you reformat and reinstall when you first purchased it?
    If not I HIGHLY recommend you do that before you do anything else.

  • FIREFOX wont load. I get this error message.Firefox profile cannot be loaded. It may be missing or inaccessible

    FIREFOX wont load. It just started yesterday. I get this error message."Firefox profile cannot be loaded. It may be missing or inaccessible"

    See http://support.mozilla.com/en-US/questions/813663

  • I downloaded songs to my phone at xmas and when i plugged in to my laptop it wiped the phone of new purchases when i try and download them to my computer in itunes via previous purchesses it wont load the list and i keep getting error 10053 can any1 help

    i downloaded songs to my phone at xmas and when i plugged in to my laptop it wiped the phone of new purchases when i try and download them to my computer in itunes via previous purchesses it wont load the list and i keep getting error 10053 can any1 help

    Syncing shouldn't trouch you photos unless you have photos in a Photo Library album.  These would be photos that were synced to your phone from your computer.  If you do have any, you'll need to use an app like PhotoSync to transfer them to your computer prior to syncing.
    If you prefer to backup your camera roll photos prior to syncing, open iTunes and go to Preferences>Devices and check "Prevent...from syncing automatically".  Then connect your phone to your computer and import them as explained here: http://support.apple.com/kb/HT4083.
    Then, to minimize data loss, follow the steps in this user tip: https://discussions.apple.com/docs/DOC-3141.  To follow the steps, first open iTunes and go to View>Show Sidebar.  Also, Transfer Purchases is now located in File>Devices.

Maybe you are looking for

  • How to add a dropdown box in an ALV  toolbar??

    hi,    i have a requirement where i need to add a dropdown box in my ALV Toolbar. To be precise next to the export button in my ALV. Plz help me on this, thanks.

  • Geforce 4 MX460-VTP vs ECS K7S5A

    Hi there - here are my current system specs. K7S5A rev1 MoBo with NEW BIOS update (as of today) Athlon XP 1700+ with Zalman Flower Cooler 256Mb SDRAM Creative Riva TNT2 32Mb AGP graphics Creative Live Value Sound Card Creative Blaster 56K Modem (bran

  • Regarding Overwrite option in ODS

    Dear experts, I have an elementary doubt. Why is that in DSO SAP is allowing for overwrite, while not in infocubes.. Any special reasons? As far i thought since ODS has flat tables its easier to maintain change logs as compared to infocubes (denormal

  • Device Disconnect Sound Plays Sporadically

    Hello my Toshiba Satellite L675-57115, Windows 7 (browser Internet explorer 9.0.8112.16421) plays the device disconnect sound randomly while I'm surfing the Internet, with no seemly pattern that I am able to discern. At times the sound will play seve

  • Material Master Field Selection

    Hi, I want to know whether the field from costing view of material master MBEW-HRKFT is made mandatory for a material type or not? how can I check the same? Thanks in advance