[ SOLVED ] Compile Error with Java Fonts & IntelliJ
Hi All
I have now got a new problem when i compile a flex project. Yesterday inorder to get the IJ Interface font smoothing sorted, i had to add this line to my ~/.bashrc file
_JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on
But now when i go to run a flex project, i get the following error message
Information:Using built-in compiler shell, up to 4 parallel threads
See compiler settings at File | Settings | Compiler | Flex Compiler page
Information:Starting Flex compiler:
/opt/java/jre/bin/java -Dapplication.home=/home/julian/SDK/flex_sdk_4.5.0.17855 -Xmx384m -Dsun.io.useCanonCaches=false -Duser.language=en -Duser.region=en -Xmx1024m -classpath /opt/idea-IU-98.311/plugins/flex/lib/flex-compiler.jar:/home/julian/SDK/flex_sdk_4.5.0.17855/lib/flex-compiler-oem.jar com.intellij.flex.compiler.FlexCompiler 48936
Information:Compilation completed with 2 errors and 0 warnings
Information:2 errors
Information:0 warnings
Error:Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on
Error:java.net.SocketException: Socket closed
Error:java.net.ConnectException: Connection refused
Error: at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:218)
at com.intellij.flex.compiler.FlexCompiler.openSocket(FlexCompiler.java:35)
at com.intellij.flex.compiler.FlexCompiler.main(FlexCompiler.java:70)
Any suggestions, besides disabling the _JAVA_OPTION again ?
Many Thanks
Last edited by whitetimer (2010-11-14 17:24:11)
-Dawt.useSystemAAFontSettings=on needs to be added to the end of file
idea.vmoptions
Similar Messages
-
[SOLVED] Netbens Error with java openjdk7
hi! i have a error with netbeans:
[pablo@arch ~]$ netbeans
# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x802067a9, pid=11781, tid=2165295936
# JRE version: 7.0_21-b02
# Java VM: OpenJDK Client VM (23.7-b01 mixed mode linux-x86 )
# Problematic frame:
# C [libGL.so.1+0x707a9] glXChooseVisual+0xaf69
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
# An error report file with more information is saved as:
# /home/pablo/hs_err_pid11781.log
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
/usr/share/netbeans/platform/lib/nbexec: línea 572: 11781 Abortado (`core' generado) "/usr/lib/jvm/java-7-openjdk/bin/java" -Djdk.home="/usr/lib/jvm/java-7-openjdk" -classpath "/usr/share/netbeans/platform/lib/boot.jar:/usr/share/netbeans/platform/lib/org-openide-modules.jar:/usr/share/netbeans/platform/lib/org-openide-util.jar:/usr/share/netbeans/platform/lib/org-openide-util-lookup.jar:/usr/share/netbeans/platform/lib/locale/boot_ja.jar:/usr/share/netbeans/platform/lib/locale/boot_pt_BR.jar:/usr/share/netbeans/platform/lib/locale/boot_ru.jar:/usr/share/netbeans/platform/lib/locale/boot_zh_CN.jar:/usr/share/netbeans/platform/lib/locale/org-openide-modules_ja.jar:/usr/share/netbeans/platform/lib/locale/org-openide-modules_pt_BR.jar:/usr/share/netbeans/platform/lib/locale/org-openide-modules_ru.jar:/usr/share/netbeans/platform/lib/locale/org-openide-modules_zh_CN.jar:/usr/share/netbeans/platform/lib/locale/org-openide-util_ja.jar:/usr/share/netbeans/platform/lib/locale/org-openide-util-lookup_ja.jar:/usr/share/netbeans/platform/lib/locale/org-openide-util-lookup_pt_BR.jar:/usr/share/netbeans/platform/lib/locale/org-openide-util-lookup_ru.jar:/usr/share/netbeans/platform/lib/locale/org-openide-util-lookup_zh_CN.jar:/usr/share/netbeans/platform/lib/locale/org-openide-util_pt_BR.jar:/usr/share/netbeans/platform/lib/locale/org-openide-util_ru.jar:/usr/share/netbeans/platform/lib/locale/org-openide-util_zh_CN.jar:/usr/lib/jvm/java-7-openjdk/lib/dt.jar:/usr/lib/jvm/java-7-openjdk/lib/tools.jar" -Dnetbeans.default_userdir_root="/home/pablo/.netbeans" -Dnetbeans.system_http_proxy="DIRECT" -Dnetbeans.system_http_non_proxy_hosts="" -Dnetbeans.dirs="/usr/share/netbeans/nb:/usr/share/netbeans/ergonomics:/usr/share/netbeans/ide:/usr/share/netbeans/java:/usr/share/netbeans/apisupport:/usr/share/netbeans/webcommon:/usr/share/netbeans/websvccommon:/usr/share/netbeans/enterprise:/usr/share/netbeans/mobility:/usr/share/netbeans/profiler:/usr/share/netbeans/python:/usr/share/netbeans/php:/usr/share/netbeans/identity:/usr/share/netbeans/harness:/usr/share/netbeans/cnd:/usr/share/netbeans/dlight:/usr/share/netbeans/groovy:/usr/share/netbeans/extra:/usr/share/netbeans/javacard:/usr/share/netbeans/javafx:" -Dnetbeans.home="/usr/share/netbeans/platform" '-Dnetbeans.importclass=org.netbeans.upgrade.AutoUpgrade' '-Dnetbeans.accept_license_class=org.netbeans.license.AcceptLicense' '-XX:MaxPermSize=384m' '-Xmx403m' '-client' '-Xss2m' '-Xms32m' '-XX:PermSize=32m' '-Dapple.laf.useScreenMenuBar=true' '-Dapple.awt.graphics.UseQuartz=true' '-Dsun.java2d.noddraw=true' '-Dsun.java2d.dpiaware=true' '-Dsun.zip.disableMemoryMapping=true' '-Dsun.awt.disableMixing=true' -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="/home/pablo/.netbeans/7.3/var/log/heapdump.hprof" org.netbeans.Main --userdir "/home/pablo/.netbeans/7.3" "--cachedir" "/home/pablo/.cache/netbeans/7.3" "--branding" "nb" 0<&0
i am with netbeans 7.3-1 in 32bits , i try the "ulimit -c ulimited" command and nothing happens and java version
OpenJDK Runtime Environment (IcedTea 2.3.9) (ArchLinux build 7.u21_2.3.9-4-i686)
OpenJDK Client VM (build 23.7-b01, mixed mode)
java runs fine with other programs like Eclipse
thank's, sorry my bad english
Last edited by senjik (2013-06-15 20:25:29)Restored thread from dustbin. It is not clear to me how it got there
Senjik, Sorry for the inconvenience. See my suggestions in my PM.
ewaller -
"catch is unreachable" compiler error with java try/catch statement
I'm receiving a compiler error, "catch is unreachable", with the following code. I'm calling a method, SendMail(), which can throw two possible exceptions. I thought that the catch statements executed in order, and the first one that is caught will execute? Is their a change with J2SE 1.5 compiler? I don't want to use a generic Exception, because I want to handle the specific exceptions. Any suggestions how to fix? Thanks
try {
SendMail(....);
} catch (MessagingException e1) {
logger.fine(e1.toString());
} catch (AddressException e2) {
logger.fine(e2.toString());
public String SendMail(....) throws AddressException,
MessagingException {....I found the problem:
"A catch block handles exceptions that match its exception type (parameter) and exception types that are subclasses of its exception type (parameter). Only the first catch block that handles a particular exception type will execute, so the most specific exception type should come first. You may get a catch is unreachable syntax error if your catch blocks do not follow this order."
If I switch the order of the catch exceptions the compiler error goes away.
thanks -
Compile Error with ResultSet.CONCUR_UPDATEABLE
Hi All,
I get the following compile error
"CopyTable.java [49:1] cannot resolve symbol
symbol : variable CONCUR_UPDATEABLE
location: interface java.sql.ResultSet
Statement DestStmt = DestDB.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATEABLE);
^
1 error"
Is there a simple answer to this?
RGDS
RichardYou must type : CONCUR_UPDATABLE not CONCUR_UPDATEABLE
-
Can I compiler servlet with java compiler?
Can I compiler servlet with java compiler?
Here is an example of it:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class HelloWorldServlet extends HttpServlet
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException , IOException
response.setContentType("text/html");
PrintWriter out = response.getWriter();
StringBuffer sb = new StringBuffer();
sb.append("<html><body><h1>");
sb.append("Hello World");
sb.append("</h1></body></html>");
out.print(sb.toString());
out.close();
}Can I compiler servlet with java compiler?
yes.
just include the correct jarfiles in your classpath. -
Compile error with action listener, ioexception
Hello, i have a (very basic) swing class which (basically) starts the whole program going as soon as you press a button.
Now somewhere down in the program, i have some file handling, so java makes you write 'throws IOException" all the way through your code.
Now i tried to do that in my swing class but i get the following compile error:
"BaseGui.java": Error #: 463 : method actionPerformed(java.awt.event.ActionEvent) in class BaseGui cannot implement method actionPerformed(java.awt.event.ActionEvent) in interface java.awt.event.ActionListener, implemented method does not throw java.io.IOException at line 31, column 15
I tried changing the "throws IOException" for some trying and catching, but to no avail. Any ideas what the problem could be?never mind, i figured this one out.
Thanks anyway. -
Compilation errors with JDeveloper 10.1.2.2.0
Hello,
I want to change my environment work. First I worked with Eclipse (Europa, jre 1.6), I have no error with my following code source :
private List<String> lString;
and now I have a compilation error with the same code
' Error(43,14): <identifier> expected '
I think it's a compiler version problem but I'm not sure and I don't know how to change the compiler version.
If someone have any idea, I will be happy to receive response.
ThanksJDeveloper 10.1.2.2.0 doesn't support neither JDK 1.6 nor JDK 1.5.
--olaf -
Compiling error on Java I/O
My first time to write a very simple Java progam. Any one could help me on this comipling error? Thanks in advance!
Compiling ERROR:
================
C:\java\class>javac hw01.java
hw01.java:43: cannot resolve symbol
symbol : variable in
location: class hw01
while((line = in.readLine()) != null ) {
^
1 error
SOURCE CODE:
============
* Program name: hw01.java
* Author:
* Description: Simple I/O and computation
* Date: 12/08/2002
* compile: javac hw01.java
* usage: java hw01 <infile> <utfile>
* <infile> - input file
* operator operand1 operand2
* ex. + 1 1
* <outfile> - output file
* operand1 operator operand2 = result
* ex. 1 + 1 = 2
import java.io.*;
import java.util.*;
public class hw01 {
// Open input file and output file
public static void main(String[] args) throws IOException {
if (args.length == 2) {
// Open File for Reading
File inFile = new File(args[0]);
FileReader in = new FileReader(inFile);
// Open File for Writing
File outFile = new File(args[1]);
FileWriter out = new FileWriter(outFile);
} else {
System.out.println("java command <arg1> <arg2>");
// Get operation, operand1 and operand2 for each line
String line = null;
while((line = in.readLine()) != null ) {
//String op; String op1; String op2; String result;
// Get operation and operands
//stringTokenizer t = new StringTokenizer(line);
//op = t.nextToken().charAt(0);
//op1 = Integer.valueOf(t.nextToken()).intValue();
//op2 = Integer.valueOf(t.nextToken()).intValue();
// Compute math operation
//if( op == '+' ) {
// result = op1 + op2;
// } else if( op == '-' ) {
// result = op1 - op2;
//} else if( op == '*' ) {
// result = op1 * op2;
//} else if( op == '/' ) {
// result = op1 / op2;
// Print out the result
//system.out.println(op1 + op + op2 + "=" + result);
// Close infile
// in.close();
// System.out.println("");
// Close outFile
// out.close();The compiling error is fixed. The revised working source code hw01.java is provided below. Can someone help the remining question below?
PROBLEM/Question:
=================
The output only goes to the console. How code should be changed to allow output to a specified file from command line.
SOURCE FILE (without Compiling error):
=====================================
* Program name: hw01.java
* Author:
* Description: Simple I/O and computation
* Date: 12/08/2002
* compile: javac hw01.java
* usage: java hw01 <infile> <utfile>
* example: java hw01 hw1data.txt hw1out.txt
* <infile> - input file
* operator operand1 operand2
* ex. + 1 1
* <outfile> - output file
* operand1 operator operand2 = result
* ex. 1 + 1 = 2
import java.io.*;
import java.util.*;
public class hw01 {
// Open input file and output file
public static void main(String[] args) throws IOException {
FileReader in = null;
FileWriter out = null;
BufferedReader br = null;
System.out.println("input File Name = " + args[0]);
System.out.println("output File Name = " + args[1]);
if (args.length == 2) {
// Open File for Reading
File inFile = new File(args[0]);
in = new FileReader(inFile);
br = new BufferedReader(in);
// Open File for Writing
File outFile = new File(args[1]);
out = new FileWriter(outFile);
} else {
System.out.println("java command <arg1> <arg2>");
// Get operation and operands for each line
String line = null;
char op;
int op1, op2;
int result = 0;
while((line = br.readLine()) != null ) {
// Get operation and operands
StringTokenizer t = new StringTokenizer(line);
op = t.nextToken().charAt(0);
op1 = Integer.valueOf(t.nextToken()).intValue();
op2 = Integer.valueOf(t.nextToken()).intValue();
// Compute math operation and print result
if( op == '+' ) {
result = op1 + op2;
System.out.println(op1 + " + " + op2 + " = " + result);
} else if( op == '-' ) {
result = op1 - op2;
System.out.println(op1 + " - " + op2 + " = " + result);
} else if( op == '*' ) {
result = op1 * op2;
System.out.println(op1 + " * " + op2 + " = " + result);
} else if( op == '/' ) {
result = op1 / op2;
System.out.println(op1 + " / " + op2 + " = " + result);
// Close infile
in.close();
// Close outFile
out.close();
} -
Need help with Java fonts (broken in 10.4.9)
Hi, folks,
There was a post late last year (maybe October?) that explained how to fix a problem with Java fonts. (OK...I know NOTHING, but I am able to follow directions!)
I play games on Yahoo.com (Literati and Word Racer) that now have unreadable fonts since I upgraded 3 days ago. I seem to remember last year's fix had something to do with disabling fonts. I just can't remember what to do and have spent an hour looking for the post.
If you can find it - or tell me what to do - I'd appreciate it. Remember, I need really specific directions.
Thanks.
iMac duo core Mac OS X (10.4.9)I am able to set up a new account and work but even after deleting all preferences the problem persists in my admin account.
I'll try to look for any font corruption and clear font cache but having to reinstall the OS is a real drag. Not sure why PS should corrupt the OS, itself.
Any chance I can uninstall and remove PS then install again? -
Class with objects compile error in Java 1.5.0 and 1.4.2.05
Hi, I have some problems with creating objects to my java program.
See below:
JAVA, creating new class object.
class AccountTest {
public static void main(String[]args) {
Account olesAccount = new Account(123456676756L, "Ole Olsen", 2300.50);
olesAccount.deposit(1000.0); //Input of 1000$ to account
double balance = olesAccount.findBalance(); //Ask object about balance!
System.out.println("Balance: " +balance);
ERRORS, from compiler (javac):
AccountTest.java:7: cannot find symbol
symbol : class Account
location: class AccountTest
Account olesAccount = new Account(123456676756L, "Ole Olsen", 2300.50);
^
AccountTest.java:7: cannot find symbol
symbol : class Account
location: class AccountTest
Account olesAccount = new Account(123456676756L, "Ole Olsen", 2300.50);
^
2 errors
This error occurs with both java 1.5.0 RC and 1.4.2.05
*/Assuming you haven't forgotten to compile the Account class, tt seems to be a problem with visibility. Are you sure your classpath is set up correctly and that the class Account is visible to the AccountTest driver?
I'd try moving the Account out of whatever package it's in right now and making it public. Then, restrict acces from there. -
I get the following compiler error when using the Java 5 SE enhanced for loop with a generic collection.
Code:
public static void main(String[] args)
List<Integer> l = new ArrayList<Integer>();
l.add(new Integer(1));
printCollection(l);
private static void printCollection(Collection<?> c)
for (Object e : c)
System.out.println(e);
Error on attempting to build:
"Error: Internal compilation error, terminated with a fatal exception"
And the following from ojcInternalError.log:
java.lang.NullPointerException
at oracle.ojc.compiler.EnhancedForStatement.resolveAndCheck(Statement.java:2204)
at oracle.ojc.compiler.StatementList.resolveAndCheck(Statement.java:4476)
at oracle.ojc.compiler.MethodSymbol.resolveMethod(Symbol.java:10822)
at oracle.ojc.compiler.RawClassSymbol.resolveMethodBodies(Symbol.java:6648)
at oracle.ojc.compiler.Parser.resolveMethodBodies(Parser.java:8316)
at oracle.ojc.compiler.Parser.parse(Parser.java:7823)
at oracle.ojc.compiler.Compiler.main_internal(Compiler.java:978)
at oracle.ojc.compiler.Compiler.main(Compiler.java:745)
at oracle.jdeveloper.compiler.Ojc.translate(Ojc.java:1486)
at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildGraph(UnifiedBuildSystem.java:300)
at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProjectFiles(UnifiedBuildSystem.java:515)
at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildAll(UnifiedBuildSystem.java:715)
at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.run(UnifiedBuildSystem.java:893)Install the Service Update 1 patch for JDeveloper (using the help->check for updates), and let us know if this didn't solve the problem.
-
PeopleSoft XML Publisher report error with java.io.FileNotFoundException
Hi,
I have created two reports using XML Publisher in Peoplesoft Financials. The two reports are not related and they were submitted for processing separately. The first report completes without any issues. The second report results in error with the following message:
09.11.17 ..(CIS_POTRPT.XML_FILE.Step03) (PeopleCode)
[012309_091118154][oracle.apps.xdo.template.FOProcessor][EXCEPTION] IOException is occurred in FOProcessor.setData(String) with 'files/cis_potrpt.xml'.
[012309_091118500][oracle.apps.xdo.template.FOProcessor][EXCEPTION] java.io.FileNotFoundException: files/cis_potrpt.xml (A file or directory in the path name does not exist.)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java(Compiled Code))
at java.io.FileInputStream.<init>(FileInputStream.java:89)
at oracle.apps.xdo.template.FOProcessor.getInputStream(FOProcessor.java:1316)
at oracle.apps.xdo.template.FOProcessor.getXMLInput(FOProcessor.java:1100)
at oracle.apps.xdo.template.FOProcessor.setData(FOProcessor.java:372)
at com.peoplesoft.pt.xmlpublisher.PTFOProcessor.generateOutput(PTFOProcessor.java:53)
2009-01-23-09.11.18.000418 AePcdExecutePeopleCode [174] Exception logged: RC=100.
Error generating report output: (235,2309) PSXP_RPTDEFNMANAGER.ReportDefn.OnExecute Name:ProcessReport PCPC:51552 Statement:1153
Called from:CIS_POTRPT.XML_FILE.GBL.default.1900-01-01.Step03.OnExecute Statement:8
2009-01-23-09.11.18.000617 DoStepActions [1797] Exception logged: RC=100.
Process 598607 ABENDED at Step CIS_POTRPT.XML_FILE.Step03 (PeopleCode) -- RC = 24 (108,524)
In the process monitor detail > view log/trace page, the xml file is accessible so the file was generated to a valid directory.
The weird thing is I was able to run this report without any issues few weeks ago although another user also ran into same error. The PeopleCode step that has been identified is essentially same in the two reports. I checked the app server and the directory does exist as well as the xml files for the two reports. The problem does not occur in test environment, just in production. Any help would be appreciated.We encounter the same problem. Did you get the answer for this issue? Thanks in advance.
-
Compiler Errors With Class Definitions and Clients
Hi there, I need help with some code, here it is.
import java.util.*;
import java.text.*;
public class InvestCalc {
//declaration of instance variables
private double interest, principal;
//default constructor, sets interest and principal to zero
public InvestCalc() {
interest = 0.0;
principal = 0.0;
//overloaded constructor
public InvestCalc( double startInterest, double startPrincipal) {
interest = startInterest;
principal = startPrincipal;
//accessor methods for instance variables
public double getRate() {
return interest;
public double getPrincipal() {
return principal;
//mutator methods
public void setRate(double newInterest) {
interest = newInterest;
public void setPrincipal(double newPrincipal) {
principal = newPrincipal;
//String toString() method
public String toString() {
return "Interest Rate: " + percent.format(interest) + ", Principal: " + DOLLAR_FORMAT.format(principal);
//futureValue(int year) method
public double futureValue(int year) {
double futureValue = Math.pow((1 + interest), year)*principal;
return futureValue;
//public static final class variables
public static final int shortTerm = 5;
public static final int middleTerm = 10;
public static final int longTerm = 20;
//public void display Table() method
public void displayTable() {
System.out.println("Year" + "\t" + "Interest Rate" + "\t\t" + "Principal" + "\t\t" + "Future Value");
System.out.println(shortTerm + "\t" + percent.format(interest) + "\t\t\t" + DOLLAR_FORMAT.format(principal) + "\t\t" + DOLLAR_FORMAT.format(futureValue(shortTerm)));
System.out.println(middleTerm + "\t" + percent.format(interest) + "\t\t\t" + DOLLAR_FORMAT.format(principal) + "\t\t" + DOLLAR_FORMAT.format(futureValue(middleTerm)));
System.out.println(longTerm + "\t" + percent.format(interest) + "\t\t\t" + DOLLAR_FORMAT.format(principal) + "\t\t" + DOLLAR_FORMAT.format(futureValue(longTerm)));
//formatting section
public static final NumberFormat DOLLAR_FORMAT = NumberFormat.getCurrencyInstance();
public static final DecimalFormat percent = new DecimalFormat("##0.00%");
import java.util.*;
public class InvestCalcApp {
* @param args
public static void main(String[] args) {
// TODO Auto-generated method stub
//declare Scanner class and interest, principal vars
Scanner input = new Scanner(System.in);
double interest, principal; //vars for the interest rate and initial investment
//instantiate a default object of the InvestCalc class
InvestCalc value1 = new InvestCalc();
System.out.println("Default InvestCalc Object");
System.out.println(value1.toString()+ "\n");
//query for interest and principal
System.out.print("Enter an interest rate in decimal format: ");
interest = input.nextDouble();
System.out.print("Enter the initial investment value: ");
principal = input.nextDouble();
//change object and output
value1.setRate(interest);
value1.setPrincipal(principal);
System.out.println("Updated InvestCalc Object");
System.out.println(value1.toString());
//test the futureValue method and the DOLLAR_FORMAT static class variable
System.out.println("Value after 1 year " + InvestCalc.DOLLAR_FORMAT.format(value1.futureValue(1)) + "\n");
value1.displayTable();
//query for another interest and principal
System.out.print("Enter another interest rate in decimal format: ");
interest = input.nextDouble();
System.out.print("Enter another initial investment value: ");
principal = input.nextDouble();
//instantiate an object of the InvestCalc class
InvestCalc value2 = new InvestCalc(interest, principal);
System.out.println("Non-Default InvestCalc Object");
System.out.println(value2.toString()+ "\n");
value2.displayTable();
}When I compile InvestCalc.java it compiles; however, when I compile InvestCalcApp.java I receive 5 errors:
InvestCalcApp.java:15: cannot find symbol
symbol : class InvestCalc
location: class InvestCalcApp
InvestCalc value1 = new InvestCalc();
InvestCalcApp.java:15: cannot find symbol
symbol : class InvestCalc
location: class InvestCalcApp
InvestCalc value1 = new InvestCalc();
InvestCalcApp.java:32: package InvestCalc does not exist
System.out.println("Value after 1 year " + InvestCalc.DOLLAR_FORMAT.format(value1.futureValue(1)) + "\n");
InvestCalcApp.java:42: cannot find symbol
symbol : class InvestCalc
location: class InvestCalcApp
InvestCalc value2 = new InvestCalc(interest, principal);
InvestCalcApp.java:42: cannot find symbol
symbol : class InvestCalc
location: class InvestCalcApp
InvestCalc value2 = new InvestCalc(interest, principal);Sorry if that's a lot of reading, but I need help, I'm new at this and not quite sure what those errors mean. ThanksThe errors mean the compiler can not find the InvestCalc class. The compiler looks for classes using the Classpath. It might work if you use a command likejavac -cp . InvestCalcApp.javaThis command tells javac to look in the current directory for dependent classes.
-
Compiler bug in 10.1.3 EA1? get "Internal compilation error" with EnumSet
The code sample below generates "Error: Internal compilation error, terminated with a fatal exception" when doing make. It's a very simple example, it creates an EnumSet with one element and dumps it via the "toString()" method.
If I change the line:
"EnumSet set = EnumSet.of(Buttons.ONE);"
To:
"EnumSet set = EnumSet.allOf(c);"
It works fine. For some reason the "of" method of "EnumSet" crashes the compiler.
Any ideas?
========================================
package mypackage;
import java.util.EnumSet;
public class EnumDemo
enum Buttons { ONE, TWO, THREE }
public EnumDemo()
public void dump()
Class c = Buttons.class;
EnumSet set = EnumSet.of(Buttons.ONE);
System.out.println(set.toString());
public static void main(String[] args)
EnumDemo cls = new EnumDemo();
cls.dump();
==============================package com.esp.main;
import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JTree;
import javax.swing.event.TreeModelEvent;
import javax.swing.event.TreeModelListener;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreePath;
public class TreeNavigator extends JTree {
private FormMain fm;
public TreeNavigatorNode selectedTreeNode;
public TreePath selectedTreePath;
public JTree thisTree;
public TreeNavigator(FormMain pFM) {
fm = pFM;
thisTree = this;
addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e) {
selectedTreeNode = (TreeNavigatorNode)thisTree.getLastSelectedPathComponent();
if (selectedTreeNode == null) {
return;
selectedTreePath = e.getPath();
addMouseListener(new MouseAdapter() {
public void mouseReleased(MouseEvent e) {
if (e.getClickCount() == 1) {
doPopup(e.getX(), e.getY());
String nodeInternalFrameClassName = selectedTreeNode.getInternalFrameClassName();
String nodeNodeTypeDesc = selectedTreeNode.getNodeTypeDesc();
if ((selectedTreeNode != null) && (nodeNodeTypeDesc.equals("FORM") || nodeNodeTypeDesc.equals("GRAPH"))) {
fm.showInternalFrame(nodeInternalFrameClassName, fm, null);
} else if (e.getClickCount() == 1) {
TreePath path = thisTree.getClosestPathForLocation(e.getX(), e.getY());
thisTree.setSelectionPath(path);
public void doPopup(int x, int y) {
if ((selectedTreeNode != null) && selectedTreeNode.nodeTypeDesc.equals("MODULE")) {
fm.cm.sendString("Do Nothing");
} else {
fm.cm.sendString("Launch form");
setEditable(false);
setMaximumSize(new java.awt.Dimension(3200, 3200));
setPreferredSize(new java.awt.Dimension(800, 100));
setShowsRootHandles(false);
setLargeModel(false);
setRootVisible(false);
setDragEnabled(false);
DefaultTreeModel treeNavigatorModel = new DefaultTreeModel(fm.treeNavigatorNodeArray[fm.rootNode], true);
treeModel.addTreeModelListener(new NavigatorTreeModelListener());
setModel(treeNavigatorModel);
expandAll(this);
try {
jbInit();
} catch (Exception e) {
e.printStackTrace();
public void expandAll(JTree tree) {
int row = 0;
while (row < tree.getRowCount()) {
tree.expandRow(row);
row++;
private void jbInit() throws Exception {
this.setSize(new Dimension(286, 383));
TreeNavigatorCellRenderer renderer = new TreeNavigatorCellRenderer(fm);
this.setCellRenderer(renderer);
class NavigatorTreeModelListener implements TreeModelListener {
public void treeNodesChanged(TreeModelEvent e) {
TreeNavigatorNode node;
node = (TreeNavigatorNode)(e.getTreePath().getLastPathComponent());
* If the event lists children, then the changed
* node is the child of the node we've already
* gotten. Otherwise, the changed node and the
* specified node are the same.
try {
int index = e.getChildIndices()[0];
node = (TreeNavigatorNode)(node.getChildAt(index));
} catch (NullPointerException exc) {
public void treeNodesInserted(TreeModelEvent e) {
public void treeNodesRemoved(TreeModelEvent e) {
public void treeStructureChanged(TreeModelEvent e) {
} -
Error with Java Virtual Machine Laucher
Hi, I'm getting the follwowing error with I try to lauch universal installer.
Fatal exception occured. Program will exit.
Does anyone have any idea what's going on? I have java ee 5 sdk installed on my machine.Hello Guys!
I have a problem here and i cant find the solution!
somebody can help me?
In the installation, after run the runInstaller show
this message:
Initializing Java Virtual Machine from
/tmp/OraInstall2008-04-27_0733-08PM/jre/1.4.2/bin/java
. Please wait...
[oracle@localhost ~]$ Oracle Universal Installer,
Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights
reserved.
Exception java.lang.UnsatisfieldLinkError:
/tmp/OraInstall2008-04-27_0733-08PM/jre/1.4.2/lib/i386
/libawt.so: libXp.so.6: cannot open shared object
file: No such file or directory occurred..
java.lang.UnsatisfieldLinkError:
/tmp/OraInstall2008-04-27_0733-08PM/jre/1.4.2/lib/i386
/libawt.so: libXp.so.6: cannot open shared object
file: No such file or directory<snip>
So I went to MetaLink and did a search on the "libXp.so.6: cannot open shared object" found in your error message. The very first hit returned was note 308755.1, titled "OUI Reports The Error: Exception java.lang.UnsatisfiedLinkError: /tmp/OraInstall*/jre/1.4.2/lib/i386/libawt.so: libXp.So.6: Cannot Open Shared Object File"
The terms of MetaLink usage prevent me from quoting from the note, but you would be advised to go read it for yourself. Suffice it to say you are missing some rpms. The specific ones missing are not listed in the above referenced not, but it will point you in the right direction.
Maybe you are looking for
-
Can't transfer movie rental from iMac to Apple TV 1st gen
Hello guys, any ideas here...? I have rented a movie in my iMac and can't get it transfered or streamed to my Apple TV 1st generation. When I open iTunes I can see the "rented movies" tab under "movies" and the movie is there. I hit the "move" comman
-
How wipe my Macbook Pro ready for return to Apple pls?
Hello I need to return my Macbook pro to Apple which is being picked up on Wednesday. In the short time I have had it I have installed on or two applications and also been on the net to chekc bank account info etc. What is the best way to wipe the dr
-
Can a friend bring in my laptop for repair to an apple store?
Hi I am an American living in Italy. I have a friend who's going into NYC and I wanted to know if he could take my macbook into for repair with my warranty? Does he need to bring my ID or a signed approval? Thanks
-
Hi, I want to redirect the user of my page to the index.jsp page when the session ends. How can i do ?
-
Hi, i had created a frame with a button..now i need to execute a html file not inside the frame, but in a web browser on click of the button how to do....