| | |
Creating and running Java .ini files
![]() |
•
•
Join Date: Nov 2009
Posts: 6
Reputation:
Solved Threads: 0
Hi there
Iam busy creating an .ini file for an application, but it is throwing a null pointer exception the whole time and can't seem to figure out what the problem is.
Why would it throw such an error and what does it mean?
Could you please help me?
Will appreciate it...
Here is the code for the .ini file InteractiveScreen.ini:
Here is the code that gets the text content from the .ini file and places it on the page
Thanx
Camzie
Iam busy creating an .ini file for an application, but it is throwing a null pointer exception the whole time and can't seem to figure out what the problem is.
Why would it throw such an error and what does it mean?
Could you please help me?
Will appreciate it...
Here is the code for the .ini file InteractiveScreen.ini:
text Syntax (Toggle Plain Text)
;@InteractiveScreen ; ;This interactive screen shows the general information on SmartVillage and Neotel. ;Smart Village ; ;Set page properties [PortalPage] OnShow=focus:buttonInformation Type=com.mca.portal.PortalPage ; ;Places the logo onto the screen ; ;Create the complex logo image [iconLogo1] Graphic=Normal, images/smartVillage.jpg Location=50, 50 Size=150, 150 Type=org.havi.ui.HStaticIcon ; ;Places text content on to the screen ; ;Set the page header [textHeader1] Text=Smart Village Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent1] Text=Smart Village™ is South Africa’s leading, next generation network and infrastructure solutions provider. Location=50, 60 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent2] Text=By utilising state-of-the-art fibre optic networks, Smart Village is able to deliver fully integrated multimedia,telecommunication and security solutions to residential, commercial and hospitality developments. Location=50, 61 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent3] Text=Our competitive advantage draws its strength from the diversity and technical capabilities of our networks, which guarantees a solid base for our core and value added service offerings. Location=50, 62 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent4] Text=From humble beginnings in 2004, the company has grown from a small start-up venture, into South Africa’s premier multi-play service provider. Location=50, 63 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent5] Text=Smart Village has a very strong national footprint, with over a thousand homes and businesses already connected. Location=50, 64 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent6] Text=Having already secured a significant portion of the market, accelerated growth is expected as Multichoice has acquired a controlling stake in Smart Village to broaden its core DStv offerings, by using Smart Village's next generation networks. Location=50, 65 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent7] Text=By providing a totally unique turnkey solution, Smart Village enables clients to deal with a single provider for multimedia, telecommunication, data and security services. Location=50, 66 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent8] Text=Smart Village also offers all the necessary service, maintenance and support that clients require, ensuring complete and total peace of mind. Location=50, 67 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Contact details ; ;Set the page text content [textContent9] Text=Smart Village Head Office Location=50, 68 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent10] Text=Tel : +27 (0) 12 679 3400 Location=50, 69 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent11] Text=Fax : +27 (0) 12 679 3401 Location=50, 70 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent12] Text=Post Box : ////////throws an error right here!!!!!!!!!!!!!! Location=50, 71 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent13] Text=Postnet Suite 422 Location=50, 72 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent14] Text=Privatebag x 108 Location=50, 73 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent15] Text=Centurion Location=50, 74 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent16] Text=0046 Location=50, 75 Size=90, 90 Type=otg.havi.ui.HStaticText ; ;Set the page text content [textContent17] Text=Physical Address : Location=50, 76 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent18] Text=Centurion Gate Complex Location=50, 77 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent19] Text=2nd Floor Location=50, 78 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent20] Text=Cnr John Vorster & Akkerboom Street Location=50, 79 Size=90, 90 Type=org.havi.ui.HStaticText ; ;Set the page text content [textContent21] Text=Centurion Location=50, 80 Size=90, 90 Type=org.havi.ui.HStaticText ;
Here is the code that gets the text content from the .ini file and places it on the page
Java Syntax (Toggle Plain Text)
private void SetHStaticText(HStaticText component, String name, ArrayList<Property> propertyList) { //gets the text content from the .ini file //places the text content on the page if (component == null) { component = new HStaticText(); component.setName(name); _owner.AddComponent(component); } // Set base class properties first SetHVisible((HVisible)component, name, propertyList); }
Thanx
Camzie
Last edited by adatapost; Nov 25th, 2009 at 6:11 am. Reason: Add [code] tags. Encase your code in: [code] and [/code] tags.
•
•
Join Date: Apr 2008
Posts: 1,189
Reputation:
Solved Threads: 172
1
#2 Nov 25th, 2009
If you rhink anyone will study nearly 200 lines of code and data, mostly unformatted and unindented, to find an unspecified error, which may possibly be in a part of the code that you have not posted, you are a great optimist.
Re-post, with all the code in code tags, and tell us what the exact text of the exception is (including the class/method/line number) and you may do better.
Re-post, with all the code in code tags, and tell us what the exact text of the exception is (including the class/method/line number) and you may do better.
Last edited by JamesCherrill; Nov 25th, 2009 at 7:08 am.
![]() |
Similar Threads
- Determinng currently running java file location? (Java)
- Invalid Boot.ini files (Windows NT / 2000 / XP)
- Exception in thread "main" java.lang.NoClassDefFoundError: Main/class (Java)
- classpath wrong, how to set it? (Java)
- Creating Local php.ini (PHP)
- HELP!!!need help with command line arguments and creating a package in java. HELP!!!! (Java)
Other Threads in the Java Forum
- Previous Thread: Help with absolute positioning
- Next Thread: Exception
Views: 354 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for Java
add android applet application arguments array arraylist arrays c# c++ chat class classes client code component constructor convert coordinates data database db desktop detection eclipse error event exception file forloop fractal givemetehcodez graphics gridlayout gui helpwithhomework homeworkassignment html ide image images inheritance input integer interface j2me java javafx jframe jpanel jtextarea jtextfield key lazy linked linked-list list loop looping method methods mobile netbeans newbie node number object oracle output page parameter pattern pixel problem programming read recursion remove return robot scanner search server service set size sms software sql string swing system text text-file threads time timer translate tree user






