Thread: [javaCompiler-users] Can't find default package 'xxxx'. Check the CLASSPATH environment variable an
Status: Beta
Brought to you by:
soapy
From: Ewald P. <ewa...@gm...> - 2006-09-01 16:24:55
|
Hi, I tried JavaCompiler today first with a HelloWorld-Example (it worked) then with a more complicated Swing-application I wrote in the last years. There was the error "Can't find default package 'cica0.languages'. Check the CLASSPATH environment variable and the access to the archives." However, cica0.languages is my own subpackages, which I of course included in the page 1/3 sources (source, not .class-files). --Here's the project file:-------------------- projectType=ch.mtSystems.javaCompiler.model.projects.ManagedAwtSwingProject dir=D:\Eigene_Dateien\cica0\src dir=D:\Eigene_Dateien\cica0\src\cica0 dir=D:\Eigene_Dateien\cica0\src\cica0\languages mainClass=cica0.App#D:\Eigene_Dateien\cica0\src outputDir=D:\Eigene_Dateien\cica0\native outputName=Cica-native java5Preprocessing=false useJni=false ignoreMissingReferences=false omitWindows=false omitLinux=true omitStripping=false omitPacking=true iconFile=null useIcon=false hideConsole=false beepWhenDone=true --------------------------------------------- Do you have any ideas what could be the problem/solution here? Thanks. Thanks also in general for this application. regards Ewald |
From: Marco T. <mt...@gm...> - 2006-09-01 17:09:37
|
Actually, I wouldn't expect too much if it's more than a "hello world" swing application. AWT and Swing is not very advanced in gnu classpath and swingWT... Anyway, this seems to be another problem. Can you create a simple failing class? Maybee the "0" in the package name is the problem... Have you tried to compile from the class files? Ah, and by the way: Directories are recursively searched. So adding "dir=D:\Eigene_Dateien\cica0\src" is enough... Marco Ewald Peiszer wrote: > Hi, > > I tried JavaCompiler today first with a HelloWorld-Example (it worked) > then with a more complicated Swing-application I wrote in the last years. > > There was the error "Can't find default package 'cica0.languages'. Check > the CLASSPATH environment variable and the access to the archives." > > However, cica0.languages is my own subpackages, which I of course > included in the page 1/3 sources (source, not .class-files). > > --Here's the project file:-------------------- > projectType=ch.mtSystems.javaCompiler.model.projects.ManagedAwtSwingProject > dir=D:\Eigene_Dateien\cica0\src > dir=D:\Eigene_Dateien\cica0\src\cica0 > dir=D:\Eigene_Dateien\cica0\src\cica0\languages > mainClass=cica0.App#D:\Eigene_Dateien\cica0\src > outputDir=D:\Eigene_Dateien\cica0\native > outputName=Cica-native > java5Preprocessing=false > useJni=false > ignoreMissingReferences=false > omitWindows=false > omitLinux=true > omitStripping=false > omitPacking=true > iconFile=null > useIcon=false > hideConsole=false > beepWhenDone=true > --------------------------------------------- > > Do you have any ideas what could be the problem/solution here? Thanks. > > Thanks also in general for this application. > > regards > Ewald > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > |
From: Ewald P. <ewa...@gm...> - 2006-09-01 23:10:25
|
Marco Trudel wrote: > Actually, I wouldn't expect too much if it's more than a "hello world" > swing application. AWT and Swing is not very advanced in gnu classpath > and swingWT... Although I'm not new to Java programming in general I have neither experience with "free" implementations of it nor with compiling to native code. So I am a bit confused about your statement; http://www.kaffe.org/~stuart/japi/htmlout/h-jdk14-classpath.html states that swing and awt are implemented nearly 100 % in gnu classpath? > Anyway, this seems to be another problem. Can you create a simple > failing class? Maybee the "0" in the package name is the problem... > > Have you tried to compile from the class files? I get this: creating Cica-native-win.exe - main compilation step cica0/SevErweiterteEinstellungenDialog.java: In class 'cica0.SevErweiterteEinstellungenDialog': cica0/SevErweiterteEinstellungenDialog.java: In method 'cica0.SevErweiterteEinstellungenDialog.jbInit()': cica0/SevErweiterteEinstellungenDialog.java:51: error: verification failed at PC=66: incompatible type on stack cica0/SevErweiterteEinstellungenDialog.java:54: error: class 'swingwtx.swing.BorderFactory' has no method named 'createEtchedBorder' matching signature '(Lswingwt/awt/Color;Lswingwt/awt/Color;)Ljavax/swing/border/Border;' cica0/HauptEditDialog.java: In class 'cica0.HauptEditDialog': cica0/HauptEditDialog.java: In method 'cica0.HauptEditDialog.jbInit()': cica0/HauptEditDialog.java:74: error: verification failed at PC=26: incompatible type on stack cica0/HauptEditDialog.java:74: error: class 'swingwtx.swing.BorderFactory' has no method named 'createEtchedBorder' matching signature '(Lswingwt/awt/Color;Lswingwt/awt/Color;)Ljavax/swing/border/Border;' cica0/HauptEditDialog.java: In method 'cica0.HauptEditDialog.sicherVerwerfen()': cica0/HauptEditDialog.java:333: error: class 'swingwtx.swing.JOptionPane' has no method named 'showConfirmDialog' matching signature '(Lswingwt/awt/Component;Ljava/lang/Object;Ljava/lang/String;II)I' cica0/RichtigDialog.java: In class 'cica0.RichtigDialog': cica0/RichtigDialog.java: In method 'cica0.RichtigDialog.show(java.lang.String,java.lang.String)': cica0/RichtigDialog.java:86: error: class 'swingwtx.swing.JButton' has no method named 'requestFocusInWindow' matching signature '()Z' cica0/HauptEditDialogTable.java: In class 'cica0.HauptEditDialogTable': cica0/HauptEditDialogTable.java: In method 'cica0.HauptEditDialogTable.prepareRenderer(javax.swing.table.TableCellRenderer,int,int)': cica0/HauptEditDialogTable.java:28: warning: bad type in parameter debug info cica0/HauptEditDialogTable.java:28: error: class 'swingwtx.swing.JTable' has no method named 'prepareRenderer' matching signature '(Ljavax/swing/table/TableCellRenderer;II)Lswingwt/awt/Component;' cica0/AbfrageDialog.java: In class 'cica0.AbfrageDialog': cica0/AbfrageDialog.java: In method 'cica0.AbfrageDialog.show(java.lang.String,java.lang.String)': cica0/AbfrageDialog.java:177: error: class 'swingwtx.swing.JTextField' has no method named 'requestFocusInWindow' matching signature '()Z' cica0/MusterDialog.java: In class 'cica0.MusterDialog': cica0/MusterDialog.java: In method 'cica0.MusterDialog.actionPerformed(swingwt.awt.event.ActionEvent)': cica0/MusterDialog.java:411: error: class 'swingwtx.swing.JOptionPane' has no method named 'showMessageDialog' matching signature '(Lswingwt/awt/Component;Ljava/lang/Object;)V' cica0/MusterDialog.java:411: confused by earlier errors, bailing out failed... -------------------- There were similar errors which I could avoid by commenting out some method calls. It looks like some (quite a few actually) methods are just not implemented in SwingWT, just as you said before. Ewald |
From: Marco T. <mt...@gm...> - 2006-09-03 08:05:30
|
Ewald Peiszer wrote: > Marco Trudel wrote: >> Actually, I wouldn't expect too much if it's more than a "hello world" >> swing application. AWT and Swing is not very advanced in gnu classpath >> and swingWT... > > Although I'm not new to Java programming in general I have neither > experience with "free" implementations of it nor with compiling to > native code. So I am a bit confused about your statement; > http://www.kaffe.org/~stuart/japi/htmlout/h-jdk14-classpath.html states > that swing and awt are implemented nearly 100 % in gnu classpath? Alright, thanks. Looks like I wasn't up to date with gnu classpath itself. In this case, the problem reduces from gnu classpath and GCJ to GCJ only. The main GCJ developpers are pretty much only interested in compiling java to shared executables on linux. Because there's no active windows maintainer, building shared windows executable is currently broken. Because no one ever looked into it, the gnu classpath AWT/Swing currently only works with shared executables on linux (static executables on linux won't work and noone ever tried gnu classpath AWT/Swing on windows). That leaves me no other option than use swingWT instead of the gnu classpath implementation... >> Anyway, this seems to be another problem. Can you create a simple >> failing class? Maybee the "0" in the package name is the problem... >> >> Have you tried to compile from the class files? > > I get this: > creating Cica-native-win.exe > - main compilation step > cica0/SevErweiterteEinstellungenDialog.java: In class > 'cica0.SevErweiterteEinstellungenDialog': > cica0/SevErweiterteEinstellungenDialog.java: In method > 'cica0.SevErweiterteEinstellungenDialog.jbInit()': > cica0/SevErweiterteEinstellungenDialog.java:51: error: verification > failed at PC=66: incompatible type on stack > cica0/SevErweiterteEinstellungenDialog.java:54: error: class > 'swingwtx.swing.BorderFactory' has no method named 'createEtchedBorder' > matching signature > '(Lswingwt/awt/Color;Lswingwt/awt/Color;)Ljavax/swing/border/Border;' > cica0/HauptEditDialog.java: In class 'cica0.HauptEditDialog': > cica0/HauptEditDialog.java: In method 'cica0.HauptEditDialog.jbInit()': > cica0/HauptEditDialog.java:74: error: verification failed at PC=26: > incompatible type on stack > cica0/HauptEditDialog.java:74: error: class > 'swingwtx.swing.BorderFactory' has no method named 'createEtchedBorder' > matching signature > '(Lswingwt/awt/Color;Lswingwt/awt/Color;)Ljavax/swing/border/Border;' > cica0/HauptEditDialog.java: In method > 'cica0.HauptEditDialog.sicherVerwerfen()': > cica0/HauptEditDialog.java:333: error: class > 'swingwtx.swing.JOptionPane' has no method named 'showConfirmDialog' > matching signature > '(Lswingwt/awt/Component;Ljava/lang/Object;Ljava/lang/String;II)I' > cica0/RichtigDialog.java: In class 'cica0.RichtigDialog': > cica0/RichtigDialog.java: In method > 'cica0.RichtigDialog.show(java.lang.String,java.lang.String)': > cica0/RichtigDialog.java:86: error: class 'swingwtx.swing.JButton' has > no method named 'requestFocusInWindow' matching signature '()Z' > cica0/HauptEditDialogTable.java: In class 'cica0.HauptEditDialogTable': > cica0/HauptEditDialogTable.java: In method > 'cica0.HauptEditDialogTable.prepareRenderer(javax.swing.table.TableCellRenderer,int,int)': > cica0/HauptEditDialogTable.java:28: warning: bad type in parameter > debug info > cica0/HauptEditDialogTable.java:28: error: class > 'swingwtx.swing.JTable' has no method named 'prepareRenderer' matching > signature '(Ljavax/swing/table/TableCellRenderer;II)Lswingwt/awt/Component;' > cica0/AbfrageDialog.java: In class 'cica0.AbfrageDialog': > cica0/AbfrageDialog.java: In method > 'cica0.AbfrageDialog.show(java.lang.String,java.lang.String)': > cica0/AbfrageDialog.java:177: error: class 'swingwtx.swing.JTextField' > has no method named 'requestFocusInWindow' matching signature '()Z' > cica0/MusterDialog.java: In class 'cica0.MusterDialog': > cica0/MusterDialog.java: In method > 'cica0.MusterDialog.actionPerformed(swingwt.awt.event.ActionEvent)': > cica0/MusterDialog.java:411: error: class 'swingwtx.swing.JOptionPane' > has no method named 'showMessageDialog' matching signature > '(Lswingwt/awt/Component;Ljava/lang/Object;)V' > cica0/MusterDialog.java:411: confused by earlier errors, bailing out > > failed... Yes, swingWT doesn't cover all you needs. I suggest to either work on swingWT (it's open source) or (what I prefer) change to SWT directly... Ah, and thanks for reporting the bug. Looks like my parsing of the package from source files has a bug. I'll investigate that... Marco |