Method usage- where's the problem?
i'm just trying to run a simple case which defines a method and uses it. I have the following two files:
// file: Manual.java
import java.io.*;
public class Manual {
/* METHOD DEFINITION-- ls:
functions like "ls" in unix/linux systems
returns the contents of a directory */
public String[] ls ( String location ) {
File file = new File( location );
String [] files = file.list( );
return files;
}and
// file: mergeManual.java
import java.io.*;
class mainls {
public void main ( String[] args ) {
String which_dir = new String( args[0] );
Manual direc = new Manual();
String[] contents = direc.ls( which_dir );
//show the contents:
// for (int i=0; i< contents.length; i++)
// System.out.println( contents[i] );
}i get the following error when running:
$ java mergeManual temp
Exception in thread "main" java.lang.NoClassDefFoundError: mergeManualwhere temp is just a sample directory. I checked the classpath variable (if that matters) and it is undefined. Can anyone see the problem?
thanks in advance!
-john
If you want to do java Foothen you must have public class Foo in Foo.java, and Foo must have public static void main(String[] args)Your class is not public. It needs to be public and the classname needs to match the filename.
Similar Messages
-
Apple maps has received a poor performance rating just after introduction of the iPhone 5. I am running Google Maps app on the phone. SIRI cannot seem to get me to a specific address. Where does the problem lie? Also can anyone tell me the hierarchy of use between the Apple Maps, SIRI, and Google maps when the app is on the phone? How do you choose one over the other as the default map usage? Or better still how do you suppress SIRI from using the Apple maps app when requesting a "go to"?
I have placed an address location into the CONTACTS list and when I ask SIRI to "take me there" it found a TOTALLY different location in the metro area with the same street name. I have included the address, the quadrant, (NE) and the ZIP code into the CONTACTS list. As it turns out, no amount of canceling the trip or relocating the address in the CONTACTS list line would prevent SIRI from taking me to this bogus location. FINALLY I typed in Northeast for NE in the CONTACTS list (NE being the accepted method of defining the USPS location quadrant) , canceled the current map route and it finally found the correct address. This problem would normally not demand such a response from me to have it fixed but the address is one of a hospital in the center of town and this hospital HAS a branch location in a similar part of town (NOT the original address SIRI was trying to take me to). This screw up could be dangerous if not catastrophic to someone who was looking for a hospital location fast and did not know of these two similar locations. After all the whole POINT of directions is not just whimsical pasttime or convenience. In a pinch people need to rely on this function. OR, are my expectations set too high?
How does the iPhone select between one app or the other (Apple Maps or Gppgle Maps) as it relates to SIRI finding and showing a map route?
Why does SIRI return an address that is NOT the correct address nor is the returned location in the requested ZIP code?
Is there a known bug in the CONTACTS list that demands the USPS quadrant ID be spelled out, as opposed to abreviated, to permit SIRI to do its routing?
Thanks for any clarification on these matters.siri will only use apple maps, this cannot be changed. you could try google voice in the google app.
-
Sometimes my iphone 5S produces low sound even on full volume level. Then i do restart it. But i am not sure where exactly the problem is? Need help.
Hi saiyed adil,
Thank you for contributing to the Apple Support Communities.
It appears that your iPhone 5s sometimes produces low sound, but a restart corrects it.
It can take some time to isolate and resolve intermittent issues like this one, and I'd recommend going through the steps in this guide the next time it occurs:
If you hear no sound or distorted sound from your iPhone, iPad, or iPod touch speaker - Apple Support
All the best,
Jeremy -
Error in downloading. Where's the problem?
I just joined Creative cloud, installed trial version of InDesign, tried to install Bridge, Photoshop and then Illustrator. With all of them i get this same info : Error in downloading. Where's the problem??
I was trying to download trial versions, with this creative cloud window popping each time after one trial downloading (Indesign-downloading went just fine, after it all I'm getting is this 'latausvirhe' notification = 'error in downloading').
Sorry - my mac speaks Finnish. No notes or codes, just this window and i don't know how to proceed. -
Macbook Pro (late) 2008 won't recognize HDD and MAC OS X installed, but recognizes SAME HDD with Windows installed ... where is the problem !???
And HDD is APPLE certified ( 250 GB )Hello JashaCOLD,
Thank you for the details of the issue you are experiencing with your external hard drive. I found an article with steps you can take when an external device is not being recognized.
I recommend following the steps in the section titled "Top troubleshooting tips" in the following article:
USB and FireWire Quick Assist
http://support.apple.com/kb/HT1151
Thank you for using Apple Support Communities.
Best,
Sheila M. -
When I navigate web with Firefox my Thinkpad trackpoint center button is not working. With other web browsers it works well. Where is the problem in firefox, how to enable TrackPoint center button?
I have exactly the same settings in Options (in both computers)
for history, these 2 add-ons and all other stuff in Options. The only difference is that on 1 pc sessions can be saved and closed tabs can be reopened, on other main pc they stopped to work. + no any other add-on that does similar things works on this pc.
It is also interesting that I can reopen closed visited sites from History Panel, but not by pressing the Button. For now I only manually bookmark links to a temporary folder.
Recently (some 2 month ago) I pressed x and Firefox closed all tabs without saving them without displaying save & quit pop up.
so I changed 4 settings in about.config
browser.tabs.warn on close true
browser.warn on quit true
browser.warn on restart true
browser.show.quit warning true
but the problem with sessions appeared only 1 week ago.
So I guess the problem is not with the History settings or other settings. Seems that something responsible for button or for storing info about tabs/sessions got corrupted. :( -
Color space…creating a book in My publisher….when I look at the share book pre print the colors are all dulled out. I work in pro photo rgb in LR and PS ….My Pub is sRGB….where is the problem?
I finally got to my references. This had to do with "soft proofing" on screen in Photoshop.
So this may not help you at all. Re: Strange sRGB soft-proofing behavior So go ahead and leave that setting at Basic.
However there is a Color Management forum that you also go to and see if anyone has answers for your particular problem.
Here is the link: Color management
I hope they can help you out.
Gene -
Hi! I updated my Mozilla Firefox to new version(Mac OS X), and now in some pages all texts is in '''bold'''. Where is the problem? Thanks!
Did you do a font check in Font Book?
Be aware that a default encoding of UTF-16 as shows in your screenshot may lead to problems.<br />
The default is Western (ISO-8859-1) and you should change the default encoding to that setting unless you have changed that deliberately to UTF-16 for specific web pages, but even in that case it is better to make the change via View > Character Encoding or set Auto-Detect to Universal or UTF-16. -
I can't sync my iPad to the iTunes it's give me an unknown error message 0xe8000012 I don't know how to fix it and where is the problem could be need format or the problem is in the charging port please can any one help me
Unknown Error containing "0xE" when restoring
To resolve this issue, follow the steps in iPhone, iPad, iPod touch: Unknown error containing '0xE' when connecting. If you have a Windows computer with an Intel® 5 series/3400 series chipset, you may need updates for your chipset drivers. See iTunes for Windows: Issues syncing iOS devices with P55 and related Intel Chipsets for more information.
From Here > http://support.apple.com/kb/TS3694 -
Hello, I have paid the application ADOBE PREMIERE PRO CC, in Creative Cloud still shows "buy", where is the problem?
Does your Cloud subscription properly show on your account page?
If you have more than one email, are you sure you are using the correct Adobe ID?
https://www.adobe.com/account.html for subscriptions on your Adobe page
If yes
Some general information for a Cloud subscription
Log out of your Cloud account... Restart your computer... Log in to your paid Cloud account
-Sign in help http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html
-http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
-http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
-http://helpx.adobe.com/creative-suite/kb/trial--1-launch.html
If no
This is an open forum, not Adobe support... you need Adobe staff to help
Adobe contact information - http://helpx.adobe.com/contact.html
-Select your product and what you need help with
-Click on the blue box "Still need help? Contact us" -
CPU issues on MacBook (over 70%) - where is the problem?
Hello!
This week, all of a sudden, my CPU percentages went up, approx. to 70%. And now it is running really slow.
I have made an EtreCheck and can't really figure out, what is causing it. On my activity monitor, this particular program is called "Inkjet4". But where can I find it?
Heres my etrecheck as well if it helps
Hardware Information:
MacBook Pro - model: MacBookPro9,2
1 2.5 GHz Intel Core i5 CPU: 2 cores
4 GB RAM
Video Information:
Intel HD Graphics 4000 - VRAM: 1024 MB
System Software:
OS X 10.9.1 (13B42) - Uptime: 0 days 1:20:22
Disk Information:
APPLE HDD TOSHIBA MK5065GSXF disk0 : (500.11 GB)
EFI (disk0s1) <not mounted>: 209.7 MB
Macintosh HD (disk0s2) /: 499.25 GB (406.93 GB free)
Recovery HD (disk0s3) <not mounted>: 650 MB
HL-DT-ST DVDRW GS31N
USB Information:
Apple Inc. FaceTime HD Camera (Built-in)
Apple Inc. BRCM20702 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Computer, Inc. IR Receiver
FireWire Information:
Thunderbolt Information:
Apple Inc. thunderbolt_bus
Kernel Extensions:
Problem System Launch Daemons:
[failed] com.apple.AOSNotificationOSX.plist 3rd-Party support link
[failed] com.apple.softwareupdated.plist 3rd-Party support link
[failed] com.apple.wdhelper.plist 3rd-Party support link
Problem System Launch Agents:
Launch Daemons:
[loaded] com.adobe.fpsaud.plist 3rd-Party support link
[loaded] org.macosforge.xquartz.privileged_startx.plist 3rd-Party support link
Launch Agents:
[loaded] com.hp.help.tocgenerator.plist 3rd-Party support link
[loaded] com.samsung.AWPAgent.plist 3rd-Party support link
[loaded] org.macosforge.xquartz.startx.plist 3rd-Party support link
User Launch Agents:
[loaded] com.adobe.ARM.[...].plist 3rd-Party support link
User Login Items:
iTunesHelper
Moveslink2
Mail
AdobeResourceSynchronizer
Internet Plug-ins:
JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Cannot contact Oracle
FlashPlayer-10.6: Version: 11.9.900.170 - SDK 10.6 3rd-Party support link
QuickTime Plugin: Version: 7.7.3
Flash Player: Version: 11.9.900.170 - SDK 10.6 Cannot contact Adobe
Default Browser: Version: 537 - SDK 10.9
GarminGpsControl: Version: 4.0.4.0 Release - SDK 10.6 3rd-Party support link
iPhotoPhotocast: Version: 7.0
Audio Plug-ins:
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 1.9 - SDK 10.9
AppleAVBAudio: Version: 2.0.0 - SDK 10.9
iSightAudio: Version: 7.7.3 - SDK 10.9
3rd Party Preference Panes:
Flash Player 3rd-Party support link
Bad Fonts:
None
Old Applications:
/Applications/iWork '09
Wireless Setting: Version: 1.2.7 - SDK 10.5 3rd-Party support link
/Users/[redacted]/Downloads/Wireless Setting.app
Time Machine:
Time Machine not configured!
Top Processes by CPU:
2% WindowServer
1% Activity Monitor
0% EtreCheck
0% Moveslink2
0% sysmond
Top Processes by Memory:
61 MB Finder
29 MB EtreCheck
29 MB WindowServer
17 MB Activity Monitor
16 MB mds_stores
Virtual Memory Information:
22 MB Free RAM
720 MB Active RAM
656 MB Inactive RAM
667 MB Wired RAM
1.50 GB Page-ins
25 MB Page-outs
If somebody could please help me or figure out what's wrong.. that would be really helping!Force-quit the process in Activity Monitor to solve the problem temporarily. Empty the print queues in the Printers & Scanners preference pane (which has a slightly different name in each recent version of OS X.) If you don't use an HP printer, remove the software. Otherwise, if the problem is recurrent, update the software (which may not help) or contact HP support.
-
Using CASE in the join statement in the AND clause. Where's the problem?
All,
I have my code, where based on the case statement, I would like to restrict the number of records in my JOIN condition. It's the CASE statement that I have used, that's giving me the problem. Not sure, what the problem is. The error says (in my case expression):
Msg 102, Level 15, State 1, Line 59
Incorrect syntax near '>'.
Select a.Col1, a.Col2, b.Col1, b.Col2, b.Col3
From Table1 a
Join Table2 b
On a.id = b.id
Join Table3 c
On c.FiltId = a.FiltId
And
Case
When b.Col3 <> 5 --b.Col3 is an INT field
Then (b.OutDate >= DATEADD(DAY, -30, c.InsertDate) And b.OutDate <= DATEADD(DAY, 30, c.InsertDate))
When b.Col3 = 5
Then (b.InDate >= DATEADD(DAY, 5, c.InsertDate))
End
Join Table 4 -- Other Join conditions and where clause conditionsYou do not know the CASE is an expression and fields are not columns. This is fundamental and probably means that a lot of your code needs work.
You can probably re-write the query with something like this:
SELECT A.col1, A.col2, B.col1, B.col2, B.col3
FROM Table_1 AS A, Table_2 AS B, Table_3 AS C
WHERE A.generic_id = B.generic_id
AND C.foobar_id = A.foobar_id
AND CASE
WHEN B.col3 <> 5
AND (B.something_out_date
<= DATEADD(DAY, -30, C.something_insertion_date)
THEN 'T'
WHEN B.col3 = 5
AND (B.something_out_date
>= DATEADD(DAY, -30, C.something_insertion_date)
THEN 'T'
ELSE 'F' END = 'T' ;
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
Spry Dataset XML Import Blank (Where's the problem?)
I have a weird predicament I've worked myself into and need to figure out a way to clean up this process.
Background: I am working within the constraints of a content management system that doesn't have full content management capabilities, switching CMS is not an option, server I believe is Tomcat, but JSP/ASP/PHP I think is irrelevant because of the constraints of the CMS. The current dilemma I have is that they want a list built on a page, 40 items per page. Very manual process. Get Excel list --> Move to HTML --> And then playing musical chairs rotating things around. This last part is the reason I'd like to move it towards XML. It might not be as pretty, but I'm hoping to eliminate as much tedious coding as I possibly can (code looks bad enough as it is, no where near valid, definitely not accessible for Murray, but out of my control as far as changing at the moment).
The project also moves around so not everyone has the same software and moving to a database, is not an option.
Where I'm at: Because there are multiple parties involved the only link between them is the dreaded Micrsoft Office (v. 2007). So I figured it was worth a shot looking into Excel's XML capabilities. I created the XSD file for Excel to map from, and let Excel save the file as XML. Now I have used the XML feature before in DW with datasets using XML files that either I hand-coded or where cached from database queries. I tried to import it into DW and normally where you preview the data, in this case, nothing is visible. So my first though is, maybe the XML from Excel doesn't validate, but then it does so that doesn't appear to be the issue. It validates just fine.
My ideal is that users can save just an Excel file and when these pages are made, the XML can be exported for DW and then if things need to be re-ordered they can easily do it in Excel which everyone has, but the web person can just upload an XML. Below is the XML and XSD files that were used. There is only one row of data in the XML file and data is sample data because of proprietary things. Any help with this problem is greatly appreciated.
XSD:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="list">
<xs:complexType>
<xs:sequence>
<xs:element name="list_item" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="address" type="xs:string" use="required" />
<xs:attribute name="imagepath" type="xs:string" use="required" />
<xs:attribute name="product" type="xs:string" use="required" />
<xs:attribute name="productlink" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<list>
<list_item name="google" address="http://www.google.com" imagepath="image/path/image.jpg" product="googles" productlink="http://www.somedomain.com/index.html"/>
</list>I do not see a problem with the XML file. In fact I used the data as a file called untitled1.xml in the following
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src="http://labs.adobe.com/technologies/spry/includes_minified/xpath.js"></script>
<script src="http://labs.adobe.com/technologies/spry/includes_minified/SpryData.js"></script>
<script type="text/javascript">
var ds1 = new Spry.Data.XMLDataSet("untitled1.xml", "list");
</script>
</head>
<body>
<div spry:region="ds1">
<table>
<tr>
<th spry:sort="list_item">List_item</th>
<th spry:sort="list_item/@address">List_item/@address</th>
<th spry:sort="list_item/@imagepath">List_item/@imagepath</th>
<th spry:sort="list_item/@name">List_item/@name</th>
<th spry:sort="list_item/@product">List_item/@product</th>
<th spry:sort="list_item/@productlink">List_item/@productlink</th>
</tr>
<tr spry:repeat="ds1">
<td>{list_item}</td>
<td>{list_item/@address}</td>
<td>{list_item/@imagepath}</td>
<td>{list_item/@name}</td>
<td>{list_item/@product}</td>
<td>{list_item/@productlink}</td>
</tr>
</table>
</div>
</body>
</html>
and it works fine.
However, if I that was confronted with the problem, I would save the Excel file to a CSV and use the Spry CSV Data Set as per http://labs.adobe.com/technologies/spry/samples/data_region/CSV_sample.html
Gramps -
WiFi connections no longer working on Iphone and guest's Ipod Touches. How do we remedy this problem. The Ipad2 and hardwired computer are working with no problem
I had the same problem -- only iphones couldn't access wifi all of a sudden. I solved it this morning by uploading a previous firmware version to my Time Capsule. The solution was offered in a different discussion in the iphone section, which I found at https://discussions.apple.com/message/15180888#15180888 :
Eureka thats the problem
The iOS 4.3.2 and 4.3.3 for iphone is not compatible with the firmware 7.5.2 for apple airport extreme and time capsule. If the WiFi router is an apple airport with firmware 7.5.2 an iphone with the updated firmware will not be able to detect and connect to the WiFi network.
Solution The iphone firmware can not be downgraded, the airport firmware has to be downgraded
1) Make sure that the settings of your Airport Extreme are in mixed a/b/n mode
2) Open Airport Utility
3) Select Upload Firmware from the BaseStation menu
4) If you current version is 7.5.2, click Upload Firmware
5) Select 7.5.1 from the pop up menu
6) Restore Firmware
Now the WiFi network is detected and connected perfectly as before upgrading the iphone to 4.3.3.
The solution was found herehttps://discussions.apple.com/message/15170990#15170990 -
I have check the thread running but i cant get where s the problem
hai there
this s the code in which i m getting this warning, can you tell what s the problem with this
* Start creates the thread to do the MessageConnection receive
* text.
* It should return immediately to keep the dispatcher
* from hanging.
public void receiving() {
/** SMS connection to be read. */
String smsConnection = "sms://:" + smsPort;
System.out.println("smsConnection" +smsConnection);
/** Open the message connection. */
if (smsconn == null) {
try {
smsconn = (MessageConnection) Connector.open(smsConnection);
smsconn.setMessageListener(this);
} catch (IOException ioe) {
ioe.printStackTrace();
/** Initialize the text if we were started manually. */
connections = PushRegistry.listConnections(true);
if (connections == null || connections.length == 0) {
content.setString("Waiting for SMS on port " + smsPort + "...");
display.setCurrent(resumeScreen);
done = false;
thread = new Thread(this);
thread.start();
* Notification that a message arrived.
* @param conn the connection with messages available
public void notifyIncomingMessage(MessageConnection conn) {
if (thread == null) {
done = false;
thread = new Thread(this);
thread.start();
/** Message reading thread. */
public void run() {
/** Check for sms connection. */
try {
msg = smsconn.receive();
if (msg != null) {
senderAddress = msg.getAddress();
content.setTitle("From: " + senderAddress);
if (msg instanceof TextMessage) {
content.setString(((TextMessage)msg).getPayloadText());
} else {
StringBuffer buf = new StringBuffer();
byte[] data = ((BinaryMessage)msg).getPayloadData();
for (int i = 0; i < data.length; i++) {
int intData = (int)data & 0xFF;
if (intData < 0x10) {
buf.append("0");
buf.append(Integer.toHexString(intData));
buf.append(' ');
content.setString(buf.toString());
content.addCommand(replyCommand);
display.setCurrent(content);
} catch (IOException e) {
// e.printStackTrace();
thankzWelcome to Apple Support Communities
It's possible that you meet hardware requirements, but OS X Mountain Lion is only compatible with some computer models. In the case of the MacBook, it requires a Late 2008 Aluminum or Early 2009 one. See > http://www.apple.com/osx/specs
Also, note that Mountain Lion requires 2 GB of memory, so if your Mac model is supported, open > About this Mac, and see if you have 2 GB or more of RAM
Maybe you are looking for
-
[Solved] wy i can place xfce4 desktop icons in a "grid" only?
hello archers! im in love with xfce4 DE, but the annoying thing is that i can place the desktop icons only in a invisible "grid" of tiles. i changed the display manager to gdm, but it didn't help. i tryed changing the WM, but didn't not find out how
-
How can I create an accessible PDF using Pages?
I am interested in being able to use Pages (and actually also Keynote) to produce accessible PDF documents, ideally following the PDF/UA standard. Government agencies require that electronic is created and shared in an accessible fashion. I know it i
-
hi my question is i got apple iphone 3g 4.2.1 how to upgrate to 4.3 or greater than 4.2.1. please i need help.
-
Migrating existing portable homes to new server
aside from moving the homedir data from the old server to the new, there seem to be at least a few issues with migrating existing portable home accounts to a new server: 1. some of users' account details, like GeneratedUID, authentication authority,
-
UIX: horizontal layout for messageRadioGroup
Hello, We use UIX 2.1.7. In our application we have a few UIX xml pages that create a (dynamic) list of screen items based on database content. These screen items can be text items, date items, choise fields, checkboxes or radio groups, depending on