Dive Log Part 3 will compile but won't run
I need help I am a newbie doing this assignment for class. I am having problems with the Dive Log part 3 tutorial parts 1 & 2 went fine but 3 has given me problems. After fixing all errors to Diver.java, Divelog.java finally compiled then I went to run it and i get a list of errorssome from Diver some from DiveLog. Any help figuring out this mystery would be helpful.
Ah you have PPC version. Either you can keep using Firefox 3.6.* are try a third party version of Firefox 4.0.* at http://www.floodgap.com/software/tenfourfox/
The Firefox 4.0 and newer downloads contains the 32-bit and 64-bit version for Intel at moment.
Similar Messages
-
Finished writing amazing code that compiles but won't run properly
I finished writing this code for someone and it compiles but it does not run properly. Anyone see any problems? Any help would be gladly appreciated.
/* Program is for the Coconut Grove Palace Building. This program keeps track of the building occupants and the maintenance for each tenant using a simple menu system. */
import java.util.Scanner;
public class Grove {
private static Scanner keyboard = new Scanner(System.in);
/* Declaring values that will not change throughout the program. The plus one is so that people don't get confused */
private static final int TOTAL_BUILDING_MAX = 16 + 1;
private static final int TOTAL_FLOOR_MAX = 8 + 1;
private static final int APARTMENT_MAX = 4 + 1;
public static void main (String[] args) {
// Declare main variable
int cocoPalace[][] = new int[2][3];
char menuChoice;
int aptNumber = 0;
int floorNumber = 0;
int totalFloor = 0;
int totalBuilding = 0;
//Fill up the array with the original amount of 2 people per apartment
for (int dex = 0; dex <3; dex++)
cocoPalace[0][dex] = 2;
cocoPalace[1][dex] = 2;
System.out.println("Welcome to the coconut grove palace");
//Main part of the program that is essentially the menu screen.
do
//method that calculates the maintenance that will be used several times
double buildingMaintenance = calculateMaintenance(cocoPalace);
//Menu System using a switch command with nested for loops and other code.
System.out.println("(A)partment, (B)uilding, (P)eople, E(x)it");
menuChoice = keyboard.nextLine().charAt(0);
switch (menuChoice)
//FIRST CASE 'A' ASK FOR THE FLOOR AND APARTMENT NUMBER AND DISPLAYS THE MAINTENANCE COST FOR IT
case 'a':
//Idiot proof 1
System.out.println("Please enter floor number :");
floorNumber = keyboard.nextInt();
while (floorNumber > 2)
System.out.println("Floor number must be between 1 and 2. Try again:");
floorNumber = keyboard.nextInt();
//Idiot proof 2
System.out.println("Please enter apartmentNumber :");
aptNumber = keyboard.nextInt();
while (aptNumber > 3)
System.out.println("Apartment number must be between 1 and 3. Try again:");
aptNumber = keyboard.nextInt();
System.out.println("Floor number" + cocoPalace[floorNumber] + "Apartment number" + cocoPalace[floorNumber][aptNumber] + " : " + buildingMaintenance);
break;
//SECOND CASE 'B' REPORTS THE OCCUPANCY AND MAINTENANCE FOR THE WHOLE BUILDING
case 'b':
for (int dex2 = 0; dex2 < 3; dex2++)
System.out.println("Floor number 1 Apartment number " + cocoPalace[0][dex2] + " : " + buildingMaintenance);
for (int dex3 = 0; dex3 < 2; dex3++)
System.out.println("Floor number 2 Apartment number " + cocoPalace[1][dex3] + " : " + buildingMaintenance);
break;
/*THIRD CASE 'P' ALLOWS THE USER TO CHANGE THE AMOUNT OF PEOPLE IN AN APARTMENT AND RECALCULATES THE MAINTENACE. IT IS ALSO "IDIOT PROOFED" SO THAT VALUES DO NOT EXCEED THE REGULATIONS OF THE BUILDING IT SELF */
case 'p':
//Idiot proof 1
System.out.println("Please enter floor number : ");
floorNumber = keyboard.nextInt();
while (floorNumber > 3)
System.out.println("Floor number must be between 1 and 2. Try again: ");
floorNumber = keyboard.nextInt();
//Idiot proof 2
System.out.println("Please enter apartment number : ");
aptNumber = keyboard.nextInt();
while (aptNumber > 4)
System.out.println("Apartment number must be between 1 and 3. Try again: ");
aptNumber = keyboard.nextInt();
//Idiot proof 3 with the amount of people being added at the same time.
System.out.println("How many people will there be : ");
int amountPeople = keyboard.nextInt();
cocoPalace[floorNumber][aptNumber] = amountPeople;
while (amountPeople > APARTMENT_MAX || totalBuilding > TOTAL_BUILDING_MAX || totalFloor > TOTAL_FLOOR_MAX )
System.out.print("Too many people in building. Please try again : ");
amountPeople = keyboard.nextInt();
cocoPalace[floorNumber][aptNumber] = amountPeople;
break;
while (menuChoice != 'x'|| menuChoice != 'a' || menuChoice != 'p' || menuChoice != 'b');
//Method to calculate maintenance.
private static double calculateMaintenance(int cocoPalace[][])
int amountPeople = 0;
for (int dex4 = 0; dex4 < 2; dex4++)
amountPeople += cocoPalace[0][dex4];
amountPeople += cocoPalace[1][dex4];
cocoPalace[0][dex4] = 2;
cocoPalace[1][dex4] = 2;
double buildingMaintenance = 5000/(amountPeople);
return(buildingMaintenance);
}ok the array problem is fixed i was having a simple "one off" mistake when accessing the array.
As for the error that i keep getting. I honestly can't see where the problem with this is in code.
The it cant be equalt to nothing because this is written so that it has to equal a letter before the program actually runs through everything. Thanks again for the help
here is the error that i am getting when the program runs.
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(String.java:558)
at Grove.main(Grove.java:46)
Here is the code with the new corrections.
/* Program is for the Coconut Grove Palace Building. This program keeps track of the building occupants and the maintenance for each tenant using a simple menu system. */
import java.util.Scanner;
public class Grove {
private static Scanner keyboard = new Scanner(System.in);
/* Declaring values that will not change throughout the program. The plus one is so that people don't get confused */
private static final int TOTAL_BUILDING_MAX = 16 + 1;
private static final int TOTAL_FLOOR_MAX = 8 + 1;
private static final int APARTMENT_MAX = 4 + 1;
public static void main (String[] args) {
// Declare main variable
int cocoPalace[][] = new int[2][3];
char menuChoice;
int totalFloor = 0;
int totalBuilding = 0;
//Fill up the array with the original amount of 2 people per apartment
for (int dex = 0; dex <3; dex++)
cocoPalace[0][dex] = 2;
cocoPalace[1][dex] = 2;
System.out.println("Welcome to the coconut grove palace");
//Main part of the program that is essentially the menu screen.
do
//Variables intialized
int aptNumber = 0;
int floorNumber = 0;
//method that calculates the maintenance that will be used several times
double buildingMaintenance = calculateMaintenance(cocoPalace);
//Menu System using a switch command with nested for loops and other code.
System.out.println("(A)partment, (B)uilding, (P)eople, E(x)it");
menuChoice = keyboard.nextLine().charAt(0);
switch (menuChoice)
//FIRST CASE 'A' ASK FOR THE FLOOR AND APARTMENT NUMBER AND DISPLAYS THE MAINTENANCE COST FOR IT
case 'a':
//Idiot proof 1
System.out.println("Please enter floor number :");
floorNumber = keyboard.nextInt();
while (floorNumber > 2)
System.out.println("Floor number must be between 1 and 2. Try again:");
floorNumber = keyboard.nextInt();
//Idiot proof 2
System.out.println("Please enter apartmentNumber :");
aptNumber = keyboard.nextInt();
while (aptNumber > 3)
System.out.println("Apartment number must be between 1 and 3. Try again:");
aptNumber = keyboard.nextInt();
System.out.println("Floor number" + cocoPalace[floorNumber] + "Apartment number" + cocoPalace[floorNumber - 1][aptNumber - 1] + " : " + buildingMaintenance);
break;
//SECOND CASE 'B' REPORTS THE OCCUPANCY AND MAINTENANCE FOR THE WHOLE BUILDING
case 'b':
for (int dex2 = 0; dex2 < 3; dex2++)
System.out.println("Floor number 1 Apartment number " + cocoPalace[0][dex2] + " : " + buildingMaintenance);
for (int dex3 = 0; dex3 < 2; dex3++)
System.out.println("Floor number 2 Apartment number " + cocoPalace[1][dex3] + " : " + buildingMaintenance);
break;
/*THIRD CASE 'P' ALLOWS THE USER TO CHANGE THE AMOUNT OF PEOPLE IN AN APARTMENT AND RECALCULATES THE MAINTENACE. IT IS ALSO "IDIOT PROOFED" SO THAT VALUES DO NOT EXCEED THE REGULATIONS OF THE BUILDING IT SELF */
case 'p':
//Idiot proof 1
System.out.println("Please enter floor number : ");
floorNumber = keyboard.nextInt();
while (floorNumber > 2)
System.out.println("Floor number must be between 1 and 2. Try again: ");
floorNumber = keyboard.nextInt();
//Idiot proof 2
System.out.println("Please enter apartment number : ");
aptNumber = keyboard.nextInt();
while (aptNumber > 3)
System.out.println("Apartment number must be between 1 and 3. Try again: ");
aptNumber = keyboard.nextInt();
//Idiot proof 3 with the amount of people being added at the same time.
System.out.println("How many people will there be : ");
int amountPeople = keyboard.nextInt();
cocoPalace[floorNumber - 1][aptNumber - 1] = amountPeople;
while (amountPeople > APARTMENT_MAX || totalBuilding > TOTAL_BUILDING_MAX || totalFloor > TOTAL_FLOOR_MAX )
System.out.print("Too many people in building. Please try again : ");
amountPeople = keyboard.nextInt();
cocoPalace[floorNumber - 1][aptNumber - 1] = amountPeople;
break;
while (menuChoice != 'x'|| menuChoice != 'a' || menuChoice != 'p' || menuChoice != 'b');
//Method to calculate maintenance.
private static double calculateMaintenance(int cocoPalace[][])
int amountPeople = 0;
for (int dex4 = 0; dex4 < 2; dex4++)
amountPeople += cocoPalace[0][dex4];
amountPeople += cocoPalace[1][dex4];
cocoPalace[0][dex4] = 2;
cocoPalace[1][dex4] = 2;
double buildingMaintenance = 5000/(amountPeople);
return(buildingMaintenance);
} -
Aperture 1.5 will install but won't run?
I've been trying to install Aperture 1.5 right from an offical Aperture 1.5 disk onto my iMac.
My iMac's only 6 months old so has the latest OSX version 10.5.6.
Installed OK.
Tried to open it to get display: "Cannot use this version of the application Aperture.app with this version of Mac OSX".
So, I went and downloaded the Aperture 1.5.6 update and I get this message: "Aperture 1.0 or later is required to instal this update".
1.5 IS installed it just won't launch. Anyone know what I'm doing wrong?don't move it from where the installer wants to install it nor rename it as updaters can't see it then
DAVE -
I can not play a video on my iPad mini. It will load but won't play
I can not play a video on my iPad mini. It will load but won't play
Which video, in which format, trying to play how in the Mini?
-
I Have a problem with my iPhone 4S volume, my phone will vibrate but won't ring. IS IT EASILY REPAIRABLE?
if it play when you connect a headset
https://discussions.apple.com/thread/1343532?start=315&tstart=0
more
https://www.google.dk/search?client=opera&q=iphone+stuck+in+headphone+mode&sourc eid=opera&ie=utf-8&oe=utf-8&channel=suggest -
PLSQL compiles but doesn't run.. I've declared it everywhere but still..
PLSQL compiles but doesn’t run.. I’ve declared it everywhere but still..
Afternoon.. Hopefully a quick one for someone.. I’m trying to run a Concurrent Program in ORACLE Financials using a Data Template derived BI Publisher report.
Error message received..
SUBIXCLT module: UofS Expense Claim Tracking Report
+--------------------------------------------------------------------------
All Parameters: raisedby=:status=:claimant=:expense_date_from=:expense_date_to=:LP_ORDERED_BY=Expense Report Number
Data Template Code: SUBIXCLT
Data Template Application Short Name: PO
Debug Flag: N
{raisedby=, claimant=, expense_date_to=, expense_date_from=, status=, LP_ORDERED_BY=Expense Report Number}
Calling XDO Data Engine...
[060410_025628319][][STATEMENT] Start process Data
[060410_025628324][][STATEMENT] Process Data ...
[060410_025628329][][STATEMENT] Executing data triggers...
[060410_025628329][][STATEMENT] BEGIN
SUBIXCLT.claimant := :claimant ;
SUBIXCLT.expense_date_from := :expense_date_from ;
SUBIXCLT.expense_date_to := :expense_date_to ;
SUBIXCLT.raisedby := :raisedby ;
SUBIXCLT.status := :status ;
SUBIXCLT.lp_ordered_by := :lp_ordered_by ;
:XDO_OUT_PARAMETER := 1;
END;
l_flag Boolean;
BEGIN
l_flag := SUBIXCLT.BEFOREREPORT(L_ORDERED) ;
if (l_flag) then
:XDO_OUT_PARAMETER := 1;
end if;
end;
[060410_025628356][][EXCEPTION] SQLException encounter while executing data trigger....
java.sql.SQLException: ORA-06550: line 4, column 33:
PLS-00201: identifier 'L_ORDERED' must be declared
ORA-06550: line 4, column 1:
PL/SQL: Statement ignoredThe Data Template
The Data Template
<?xml version="1.0" encoding="utf-8" ?>
- <dataTemplate name="UofS_OutstandngExpenses_Report" defaultPackage="SUBIXCLT" dataSourceRef="FINDEV" version="1.0">
- <properties>
<property name="xml_tag_case" value="upper" />
<property name="include_parameters" value="true" />
<property name="debug_mode" value="on" />
</properties>
- <parameters>
<parameter name="claimant" dataType="character" defaultValue="" />
<parameter name="expense_date_from" dataType="date" defaultValue="" />
<parameter name="expense_date_to" dataType="date" defaultValue="" />
<parameter name="raisedby" dataType="character" defaultValue="" />
<parameter name="status" dataType="character" defaultValue="" />
<parameter name="lp_ordered_by" dataType="character" defaultValue="" />
</parameters>
- <dataQuery>
<dataTrigger name="beforeReportTrigger" source="SUBIXCLT.BEFOREREPORT(L_ORDERED)" />
- <sqlStatement name="Q1">
- <![CDATA[
SELECT DISTINCT
erh.invoice_num,
pap.full_name EMP_CLAIMING,
DECODE(NVL(erh.expense_status_code, 'Not yet Submitted (NULL)'), 'CANCELLED', 'CANCELLED',
'EMPAPPR', 'Pending Individuals Approval', 'ERROR', 'Pending System Administrator Action',
'HOLD_PENDING_RECEIPTS ', 'Hold Pending Receipts', 'INPROGRESS', 'In Progress', 'INVOICED', 'Ready for Payment',
'MGRAPPR', 'Pending Payables Approval', 'MGRPAYAPPR', 'Ready for Invoicing', 'PAID', 'Paid',
'PARPAID', 'Partially Paid', 'PAYAPPR', 'Payables Approved', 'PENDMGR', 'Pending Manager Approval',
'PEND_HOLDS_CLEARANCE', 'Pending Payment Verification', 'REJECTED', 'Rejected', 'RESOLUTN', 'Pending Your Resolution',
'RETURNED', 'Returned', 'SAVED', 'Saved', 'SUBMITTED', 'Submitted', 'UNUSED', 'UNUSED',
'WITHDRAWN','Withdrawn', 'Not yet Submitted (NULL)') "EXPENSE_STATUS" ,
NVL(TO_CHAR(erh.report_submitted_date,'dd-MON-yyyy'),'NULL') SUBMIT_DATE,
NVL(TO_CHAR(erh.expense_last_status_date,'dd-MON-yyyy'),'NULL') LAST_UPDATE,
erh.override_approver_name ER_Approver,
fu.description EXP_ADMIN,
erh.total,
erh.description
FROM
AP_EXPENSE_REPORT_HEADERS_all erh,
per_all_people_f pap, fnd_user fu
WHERE erh.employee_id = pap.person_id
AND fu.user_id = erh.created_by
AND NVL(erh.expense_status_code, 'Not yet Submitted') NOT IN ('MGRAPPR', 'INVOICED', 'PAID', 'PARPAID')
AND pap.full_name = NVL(:claimant, pap.full_name)
AND TRUNC(erh.report_submitted_date) BETWEEN NVL(:expense_date_from, '01-JAN-1999') AND NVL(:expense_date_to,'31-DEC-2299')
AND fu.description = NVL(:raisedby,fu.description)
AND erh.expense_status_code = NVL(:status,erh.expense_status_code) &LP_ORDERED_BY
]]>
</sqlStatement>
</dataQuery>
<dataTrigger name="beforeReportTrigger" source="SUBIXCLT.BEFOREREPORT(L_ORDERED)" />
- <dataStructure>
- <group name="G_XP_CLM_TRACKNG" source="Q1">
<element name="INVOICE_NUM" value="INVOICE_NUM" />
<element name="EMP_CLAIMING" value="EMP_CLAIMING" />
<element name="EXPENSE_STATUS" value="EXPENSE_STATUS" />
<element name="SUBMIT_DATE" value="SUBMIT_DATE" />
<element name="LAST_UPDATE" value="LAST_UPDATE" />
<element name="LP_ORDERED_BY" dataType="varchar2" value="SUBIXCLT.LP_ORDERED_BY" />
</group>
</dataStructure>
</dataTemplate>The PL SQL..
The PL SQL..
CREATE OR REPLACE PACKAGE Subixclt IS
L_ORDERED VARCHAR2(50);
RAISEDBY VARCHAR2(50);
STATUS VARCHAR2(50);
CLAIMANT VARCHAR2(50);
LP_ORDERED_BY VARCHAR2(50);
FUNCTION BEFOREREPORT(L_ORDERED IN VARCHAR2) RETURN VARCHAR2;
EXPENSE_DATE_FROM DATE;
EXPENSE_DATE_TO DATE;
--RETURN VARCHAR2;
END;
CREATE OR REPLACE PACKAGE BODY Subixclt IS
FUNCTION BEFOREREPORT(L_ORDERED IN VARCHAR2)RETURN VARCHAR2 IS
BEGIN
Fnd_File.PUT_LINE(Fnd_File.LOG,'L_ORDERED'||L_ORDERED);
DECLARE
LP_ORDERED_BY VARCHAR2(50);
L_ORDERED VARCHAR2(50);
RAISEDBY VARCHAR2(50);
STATUS VARCHAR2(50);
CLAIMANT VARCHAR2(100);
EXPENSE_DATE_FROM DATE;
EXPENSE_DATE_TO DATE;
BEGIN
IF (LP_ORDERED_BY='Expense Report Number') THEN
LP_ORDERED_BY :='order by 1 asc;';
ELSIF (LP_ORDERED_BY='Person Claiming') THEN
LP_ORDERED_BY :='order by 2 asc;';
ELSIF (LP_ORDERED_BY='Submit Date') THEN
LP_ORDERED_BY :='order by 4 asc;';
END IF;
RETURN(L_ORDERED);
--RETURN NULL;
END;
END;
END;Thanks for looking..
Steven
Edited by: Mr_Alkan on Jun 4, 2010 3:35 PMOne has to initialise a session first for use with Oracle Apps if you want to make it run as a concurrent job.
Any decleration within your package will not be recognised unless initialisation is sucessful.
Investigate the built-in packages:
FND_GLOBAL - for initialisation
FND_SUBMIT - for setting session relevant parameters
-- function returns true or false depending on whether the initialisation was sucessful or not
create or replace function is_Init_OK (p_User_Name in varchar2
,p_Responsibility in varchar2
,p_Language in varchar2) return boolean as
b_Set_NLS boolean;
b_Set_Mode boolean;
r_ISet fnd_Init := Get_Init_Set(p_User_Name, p_Responsibility);
begin
-- 1
fnd_global.apps_initialize(r_ISet.User_ID, r_ISet.Resp_ID, r_ISet.App_ID);
-- 2
b_Set_NLS := fnd_submit.set_nls_options(p_Language);
-- 3
b_Set_Mode := fnd_submit.set_mode (false);
return (b_Set_Mode and b_Set_NLS and ( (r_ISet.Resp_ID is not null)
and (r_ISet.User_ID is not null)
exception
when others then
return false;
end is_Init_OK;
-- for example
declare
l_User_ID number = 'IMPORT_POST'; --- import post user
l_Resp number = 'Import and Posting responsibility' -- import posting responsibility
l_Language varchar2(100) := 'AMERICAN';
b_Init boolean := false;
INIT_EXCEPTION exception;
begin
b_Init := is_Init_OK(l_User_ID, l_Resp, l_Language);
if (not b_Init) then
raise INIT_EXCEPTION;
end if;
-- conitnue with your processing
exception
when others then
when INIT_EXECPTION then
when others then
end;
/ -
Hi - Have a Javascript (search) that was ok thru 9, but won't run in X. Thank you
Quoting the Acrobat X SDK:
Changes to search object
The following changes have been made to the "search" object properties:
● The thesaurus and soundex properties have been removed
● The legacySearch property is now deprecated and always returns false.
Changes to SearchExecuteQuery
The following have been removed from nWordOptions parameter of SearchExecuteQuery:
● kWordOptionSoundsLike
● kWordOptionThesaurus
The function SearchIsLegacySearchAvailable has been deprecated and will always return false. -
Photoshop elements 10 won't open, says files missing. Reinstall. Trying to reinstall but won't run. Nothing works. Using Windows 7.
How do I reach tech support?http://forums.adobe.com/message/5506764#5506764
-
Program compiles, but does not run
To: XCode Users <[email protected]>
From: Brigit Ananya <[email protected]>
Subject: Program compiles, but does not run
I am trying to port a Java application from the PC to the Mac. I am using XCode and the program compiles, but it does not run.
When I try to run the ...app, I get the message that the main class is not specified, etc.
When I try to run the ...jar, I do not get the message that the main class is not specified, but I do get the message that there is no Manifest section for bouncycastle, etc.
Here are the detailed messages I get in the Console when I try to run the program:
When I try to run the ...app, I get the following message:
1/9/09 7:21:17 AM [0x0-0x8c08c].com.AnanyaSystems.AnanyaCurves[2253] [LaunchRunner Error] No main class specified
1/9/09 7:21:17 AM [0x0-0x8c08c].com.AnanyaSystems.AnanyaCurves[2253] [JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
1/9/09 7:21:17 AM [0x0-0x8c08c].com.AnanyaSystems.AnanyaCurves[2253] Exception in thread "main" java.lang.NullPointerException
1/9/09 7:21:17 AM [0x0-0x8c08c].com.AnanyaSystems.AnanyaCurves[2253] at apple.launcher.LaunchRunner.run(LaunchRunner.java:112)
1/9/09 7:21:17 AM [0x0-0x8c08c].com.AnanyaSystems.AnanyaCurves[2253] at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
1/9/09 7:21:17 AM [0x0-0x8c08c].com.AnanyaSystems.AnanyaCurves[2253] at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
When I try to run the ...jar, I do get the following message:
1/9/09 7:22:43 AM [0x0-0x8d08d].com.apple.JarLauncher[2262] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] Exception in thread "main"
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] java.lang.SecurityException: no manifiest section for signature file entry org/bouncycastle/asn1/DEREnumerated.class
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at sun.security.util.SignatureFileVerifier.verifySection(SignatureFileVerifier.java:377)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:231)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.util.jar.JarVerifier.processEntry(JarVerifier.java:233)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.util.jar.JarVerifier.update(JarVerifier.java:188)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.util.jar.JarFile.initializeVerifier(JarFile.java:325)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.util.jar.JarFile.getInputStream(JarFile.java:390)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at sun.misc.URLClassPath$JarLoader$1.getInputStream(URLClassPath.java:620)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at sun.misc.Resource.cachedInputStream(Resource.java:58)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at sun.misc.Resource.getByteBuffer(Resource.java:113)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.net.URLClassLoader.defineClass(URLClassLoader.java:249)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.security.AccessController.doPrivileged(Native Method)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
1/9/09 7:28:45 AM [0x0-0x8f08f].com.apple.JarLauncher[2277] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
I do specify the main class in both, the Manifest file and the Info.plist file, in the correct way, "package.MainClass". Is there another place where I need to specify it?
Why do I need org/bouncycastle/asn1/DEREnumerated.class, and how would I have to specify it in Manifest?
I also posted these questions at Mac Programming at forums.macrumors.com and at Xcode-users Mailing List at lists.apple.com/mailman/listinfo, but I did not get any answer.
Please help! Thanks!There was something wrong with my Info.plist file.
So, here is my corrected Info.plist file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>AnanyaCurves</string>
<key>CFBundleGetInfoString</key>
<string></string>
<key>CFBundleIconFile</key>
<string>AnanyaCurves.icns</string>
<key>CFBundleIdentifier</key>
<string>com.AnanyaSystems.AnanyaCurves</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AnanyaCurves</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.1</string>
<key>CFBundleSignature</key>
<string>ac</string>
<key>CFBundleVersion</key>
<string>0.1</string>
<key>Java</key>
<dict>
<key>JMVersion<key>
<string>1.4+</string>
<key>MainClass</key>
<string>AnanyaCurves</string>
<key>VMOptions</key>
<string>-Xmx512m</string>
<key>Properties</key>
<dict>
<key>apple.laf.useScreenMenuBar</key>
<string>true</string>
<key>apple.awt.showGrowBox</key>
<string>true</string>
</dict>
</dict>
</dict>
</plist>Ok, so now I can at least run the AnanyaCurves.jar file by double-clicking on it.
However, I still cannot run the AnanyaCurves.app file. When I double-click on it, I get the following message in the Console:
1/11/09 5:12:26 PM [0x0-0x67067].com.apple.JarLauncher[1128] at ananyacurves.AnanyaCurves.main(AnanyaCurves.java:1961)
1/11/09 5:13:11 PM [0x0-0x6a06a].com.AnanyaSystems.AnanyaCurves[1137] [JavaAppLauncher Error] CFBundleCopyResourceURL() failed loading MRJApp.properties file
1/11/09 5:13:11 PM [0x0-0x6a06a].com.AnanyaSystems.AnanyaCurves[1137] [LaunchRunner Error] No main class specified
1/11/09 5:13:11 PM [0x0-0x6a06a].com.AnanyaSystems.AnanyaCurves[1137] [JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
1/11/09 5:13:11 PM [0x0-0x6a06a].com.AnanyaSystems.AnanyaCurves[1137] Exception in thread "main" java.lang.NullPointerException
1/11/09 5:13:11 PM [0x0-0x6a06a].com.AnanyaSystems.AnanyaCurves[1137] at apple.launcher.LaunchRunner.run(LaunchRunner.java:112)
1/11/09 5:13:11 PM [0x0-0x6a06a].com.AnanyaSystems.AnanyaCurves[1137] at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
1/11/09 5:13:11 PM [0x0-0x6a06a].com.AnanyaSystems.AnanyaCurves[1137] at apple.launcher.JavaApplicationLauncher.main(JavaApplicationLauncher.java:61)Why is it looking for the MRJApp.properties file? Isn't this outdated? Shouldn't it look for the Info.plist file? I do not have a MRJApp.properties file.
Also, in the Run menu of my XCode project, Go, Run, and Debug are disabled, but perhaps this has to do with not being able to run the AnanyaCurves.app file.
Thanks for your time! I really appreciate any help you can give me! -
My macbook pro 4,1 runs os x 10.6 but won't run my apple usb superdrive. One forum said that this is due to os x, not hardware. The terminal commands given were for Lion, but don't work in snow leopard. Help!
I was able to get it to work!
-
It compiles but can't run it!
Hi
I am really new to java. I got this code from net and tried to compile it. Idoes compile but when i run it , i get the messege,
"java.lang.NoSuchMethodError: main
Exception in thread "main" .
Here is me code.Can someone pleaese tell me y i can't run it and how to fix it. Thanks for your time.
import java.awt.*;
import java.awt.event.*;
public class calculator extends java.applet.Applet implements ActionListener {
TextField txtTotal = new TextField("");
Button button[] = new Button[10];
Button divide = new Button("/");
Button mult = new Button("*");
Button plus = new Button ("+");
Button minus = new Button("-");
Button isequalto = new Button("=");
Button clear = new Button("CA");
double num ,numtemp ;
int counter;
String strnum = "",strnumtemp = "" ;
String op = "";
public void operation() {
counter ++;
if (counter == 1) {
numtemp = num;
strnum = "";
num = 0;
}else{
if (op == "+") numtemp += num;
else if (op == "-") numtemp -= num;
else if (op == "*") numtemp = numtemp * num;
else if (op == "/") numtemp = numtemp / num;
strnumtemp = Double.toString(numtemp);
txtTotal.setText(strnumtemp);
strnum = "";
num = 0;
public void init() {
setLayout(null);
plus.setBackground(Color.blue);
plus.setForeground(Color.white);
minus.setBackground(Color.blue);
minus.setForeground(Color.white);
divide.setBackground(Color.blue);
divide.setForeground(Color.white);
isequalto.setBackground(Color.blue);
isequalto.setForeground(Color.white);
mult.setBackground(Color.blue);
mult.setForeground(Color.white);
clear.setBackground(Color.blue);
clear.setForeground(Color.red);
for(int i = 0;i <= 9; i ++) {
button[i] = new Button(String.valueOf(i));
button.setBackground(Color.orange);
button[i].setForeground(Color.blue);
button[1].setBounds(0,53,67,53);
button[2].setBounds(67,53,67,53);
button[3].setBounds(134,53,67,53);
button[4].setBounds(0,106,67,53);
button[5].setBounds(67,106,67,53);
button[6].setBounds(134,106,67,53);
button[7].setBounds(0,159,67,53);
button[8].setBounds(67,159,67,53);
button[9].setBounds(134,159,67,53);
for (int i = 1;i <= 9; i ++) {
add(button[i]);
txtTotal.setBounds(0,0,200,53);
add(txtTotal);
plus.setBounds(0,212,67,53);
add(plus);
button[0].setBounds(67,212,67,53);
add(button[0]);
minus.setBounds(134,212,67,53);
add(minus);
divide.setBounds(134,264,67,53);
add(divide);
isequalto.setBounds(67,264,67,53);
add(isequalto);
mult.setBounds(0,264,67,53);
add(mult);
add(clear);
public void start() {
for(int i = 0;i <= 9; i ++) {
button[i].addActionListener(this);
plus.addActionListener(this);
minus.addActionListener(this);
divide.addActionListener(this);
mult.addActionListener(this);
isequalto.addActionListener(this);
clear.addActionListener(this);
public void stop() {
for(int i = 0;i <= 9; i ++) {
button[i].addActionListener(null);
plus.addActionListener(null);
minus.addActionListener(null);
divide.addActionListener(null);
mult.addActionListener(null);
isequalto.addActionListener(null);
clear.addActionListener(null);
public void actionPerformed(ActionEvent e) {
for(int i = 0;i <= 9; i++) {
if (e.getSource() == button[i]) {
play(getCodeBase(),i + ".au");
strnum += Integer.toString(i);
txtTotal.setText(strnum);
num = Double.valueOf(strnum).doubleValue();
if (e.getSource() == plus) {
operation();
op = "+";
if (e.getSource() == minus) {
operation();
op = "-";
if (e.getSource() == divide) {
operation();
op = "/";
if (e.getSource() == mult) {
operation();
op = "*";
if (e.getSource() == isequalto) {
if (op == "+") numtemp += num;
else if (op == "-") numtemp -= num;
else if (op == "*") numtemp = numtemp * num;
else if (op == "/") numtemp = numtemp / num;
strnumtemp = Double.toString(numtemp);
txtTotal.setText(strnumtemp);
strnumtemp = "";
numtemp = 0;
strnum = "";
num = 0;
counter = 0;
if (e.getSource() == clear) {
txtTotal.setText("0");
strnumtemp = "";
numtemp = 0;
strnum = "";
num = 0;
counter = 0;Thanks for your reply.
Ok i used the link that you sent me and saved the following in the same directory where i have "calcultor.class".
<HTML>
<HEAD>
<TITLE> A Simple Program </TITLE>
</HEAD>
<BODY>
<APPLET CODE="calculator.class" WIDTH=150 HEIGHT=25>
</APPLET>
</BODY>
</HTML>
I saved it with the name "calculator.html".
Now when in my browser i type calculator.html, nothing happens.
I am sure i am missing something but i don't know what.Can someone please help me!
thanks -
DVD will read but won't write A205-S5812
My DVD drive will read and play but won't write. Device Manager says it is a Matshita UJ-850S. I have upgraded to XP Pro sp3 from vista. I suspect that it is a driver issue but I have searched and can't find one that makes it work.
Has anyone else run into this? Any suggestions
Solved!
Go to Solution.Borsiay wrote:
My DVD drive will read and play but won't write. Device Manager says it is a Mat**bleep**a UJ-850S. I have upgraded to XP Pro sp3 from vista. I suspect that it is a driver issue but I have searched and can't find one that makes it work.
Has anyone else run into this? Any suggestions
Not a driver issue, or it wouldn't even read. You are missing the program required for disk writing that Toshiba suppiles with factory installs, but is lacking in commercial versions of Windows. It is not available as a download, only as part of the factory image. Since you changed to XP, You'll need to buy some disk writing software like Nero or Roxio. -
Small Applet Compiles Fine.. But won't run!
The Applet compiles absoluetly fine.. But it won't run. Is this supposed to ever happen? Can I have some tips on why it isn't working?
import java.applet.*;
import java.awt.*;
import java.lang.*;
public class Loop1 extends Applet{
Label LoopLabel = new Label();
String InfoString = null;
int r = 0;
public void init() {
InfoString = getParameter("info");
r =
Integer.parseInt(getParameter("repetitons"));
for (int i=1; i <= r; i++) {
InfoString = InfoString + "X";
public void paint(Graphics g) {
g.drawString(InfoString, 5, 10);
}and the html (i doublt you'll need it though)
<APPLET CODE=Loop1.class WIDTH=500 HEIGHT=500>
<PARAM NAME=info VALUE="6">
<PARAM NAME=repetitions VALUE="6">
</APPLET>typo, it runs otherwise
http://www.geocities.com/rmlchan/indexLoop1.html
r = Integer.parseInt(getParameter("repetitons"));
<PARAM NAME=repetitions VALUE="6"> -
Compiles, but won't output anything but "0"
I'm using Xinox JCreator LE, trying to run the following code:
import java.io.*;
public class Tester {
//default constructor
public Tester() {
//for storing my elements! yay
Element [] myElements;
System.out.print("test");
//read in the file to an array
myElements = readInElements();
//make sure it's read in properly
for (Element e : myElements) {
System.out.println(e);
//read in elements from a comma separated values file
private Element [] readInElements() {
Element [] myElements = null;
System.out.println("test");
try {
//count the number of lines
int numLines = 0;
BufferedReader count = new BufferedReader(new FileReader("elements.csv"));
while (count.readLine() != null) numLines++;
count.close();
//resize the array
myElements = new Element[numLines];
numLines = 0;
//fill the array
BufferedReader in = new BufferedReader(new FileReader("elements.csv"));
//get each line, split it around commas, add a new Element to the array
String str;
while ((str = in.readLine()) != null) {
String [] line = str.split(",");
//if the file isn't correct, blow up
if (line.length != 8) throw new IOException("Malformed input file.");
//create the new element in the array
myElements[numLines++] = new Element(
Integer.parseInt(line[0]),
Double.parseDouble(line[1]),
line[2],
line[3],
Integer.parseInt(line[4]),
Integer.parseInt(line[5]),
Integer.parseInt(line[6]),
Double.parseDouble(line[7])
in.close();
} catch (IOException e) {
System.out.print(e);
System.exit(1);
return myElements;
//hello I am a main method how are you today
public static void main(String [] args) {
System.out.print("test");
new Tester();
}It compiles fine, but when I run it I get this as output:
--------------------Configuration: Assignment 3 - JDK version 1.6.0_02 <Default> - <Default>--------------------
0
Process completed.I'm hoping I'm just missing something very simple because this is quite annoying.It worked from the command line; there was an extra class in the folder called "Test" which the IDE defaulted to for some reason. Thanks, I knew it was something stupid :)
-
Latest update says it won't run on my Mac (see question above) and current latest compatible version (3.6.17) will have full tech support for only a limited time now. Is there anything I can do to bring my Mac up to spec. Is it really a dinosaur already? Will I be able to run FF4.0 (or later) at a later dater date?
Any answers appreciated, thanks... BAh you have PPC version. Either you can keep using Firefox 3.6.* are try a third party version of Firefox 4.0.* at http://www.floodgap.com/software/tenfourfox/
The Firefox 4.0 and newer downloads contains the 32-bit and 64-bit version for Intel at moment.
Maybe you are looking for
-
Apple Laserwriter 4/600 Won't Print using Lion 10.7.4
Yesterday I bought a new MacBook Pro running 10.7.4 and discovered I cannot print to my Laserwriter 4/600 using Asantetalk connected to ethernet (which is connected via a router to my AirPort Extreme (round, white circa 2005). If I use one of my olde
-
Is there anyway this could be possible I'd really hate to have to re-purchase this program.
-
Is it possible to manage the servers with RSAT in a different domain?
Hi All, In our infrastructure, all the servers are in the domain A. But as per the organization policy, laptops are only allowed to join domain B, not allowed to join domain A. Is there a way to manage the domain A services (DC/DNS/DHCP/etc) with RSA
-
No Component exists with the name /bic/zplant2
Hi, i am getting the error for this abap code this code is written in Start routine in BW. but it is giving error while running or checking the program.. the same start routine works fine in Production, but it gives error in Quality. r_plant like
-
About tpbegin,need help!!!
when i use tpbegin before call a remote service,what should i do to set the environment,and whether the database(Oracle) must support XA ? if i use transaction in my application,what should i do? environment£¿ ubbconfig£¿bdmconfig? or others fish