Skip to main content

How to do the build-commands.jar

6 replies [Last post]
qawsed123
Offline
Joined: 2009-10-21

Hello,
I'm trying to run the squawk in a iMX31 motherboard with linux embedded and with the arm-1136jfs-linux-gnueabi-gcc toolchain.

The toolchain was build succesful because is a package of phytec.
Firstly my intention was to create a specific java file for the platform (and modify the conditions of the platform switch in squawk/builder/src/com/sun/squawk/builder/platform and so thanks with the properties of BUILDER_FLAGS using -Dproperty=value) and then add and specific java file for my toolchain (in squawk/builder/src/com/sun/squawk/builder/compilercompiler).

My wonder was in spite of add these java files, when I did the build of the squawk (all ./d.sh and so on) the shell didn't show something strange.

Viewing the bld.sh in squawk/builder/ we have this:

rm -rf classes
mkdir classes
$JAVAC -target 1.5 -source 1.5 -d classes -g src/com/sun/squawk/builder/launcher/*.java
$JAR cfm ../build.jar build-manifest.mf -C classes .
rm -fr classes
mkdir classes
cd classes
$JAR xf ../../tools/retroweaver-all-squawk.jar
cd ..
$JAVAC -cp classes:../vm2c/lib/openjdk-javac-6-b12.jar -target 1.5 -source 1.5 -d classes -g `find src -name '*.java'`
$JAR cfm ../build-commands.jar build-commands-manifest.mf -C classes .
rm -fr classes

IMO I think that there is a jar folder that contains the original .class and that is the reason why my java fils didn't work. Opening the build-commands.jar I find all these classes (compile folder and platform folder).

How I can do a proper build-command.jar with my own java files?

I've tried to put these commands in the shell but it not works.. is impossible to create both JAR files.

And, Someone can help me with my project? Am I working correctly?

Thanks in advance!

Message was edited by: qawsed123

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
qawsed123
Offline
Joined: 2009-10-21

Inside the bld.sh, this is the line that fails:

$JAVAC -cp classes:../vm2c/lib/openjdk-javac-6-b12.jar -target 1.5 -source 1.5 -d classes -g `find src -name '*.java'`

Why?

Thanks

qawsed123
Offline
Joined: 2009-10-21

In:

usr/lib/jvm/java-1.6-0-openjdk-1.6.0/lib

I found the tools.jar, which contains in:

com/sun/tools/doclets/

the Taglet.class.

How Can I add this jar to this line? Is it correctly for solve it ?

Thanks.

eric_arseneau
Offline
Joined: 2004-07-15

There is always the issue of getting access to the correct set of jars when using the developer tools. Not sure why yours is failing, but its been a long time since I built that jar on anything but the Mac platform.

Will need to look into why it wont build on Linux and possibly Windows.

qawsed123
Offline
Joined: 2009-10-21

Hi! Like this links says, I prove this:

[b]http://wiki.java.net/bin/view/Mobileandembedded/OnLinux[/b]

Build my own build.jar and builder-commands.jar after modify the source:

./bld.sh (in squawk/builder/ ).

If I do this step with the original source I obtain the same error message than with my own source (compiler and platform files):

[b]
linux-2vjb:/home/victor/squawk/builder # ./bld.sh
src/com/sun/squawk/builder/ToDoTaglet.java:27: package com.sun.tools.doclets does not exist
import com.sun.tools.doclets.Taglet;
^
src/com/sun/squawk/builder/ToDoTaglet.java:45: cannot find symbol
symbol: class Taglet
public class ToDoTaglet implements Taglet {
^
src/com/sun/squawk/builder/ToDoTaglet.java:152: package com.sun.javadoc does not exist
public String toString(com.sun.javadoc.Tag tag) {
^
src/com/sun/squawk/builder/ToDoTaglet.java:164: package com.sun.javadoc does not exist
public String toString(com.sun.javadoc.Tag[] tags) {
^
src/com/sun/squawk/builder/commands/MakePlatformStubs.java:29: warning: sun.tools.jar.Main is Sun proprietary API and may be removed in a future release
import sun.tools.jar.Main;
^
src/com/sun/squawk/builder/commands/MakeAPI.java:30: package com.sun.javadoc does not exist
import com.sun.javadoc.*;
^
src/com/sun/squawk/builder/commands/MakeAPI.java:292: cannot find symbol
symbol : class RootDoc
location: class com.sun.squawk.builder.commands.MakeAPI
private RootDoc root;
^
src/com/sun/squawk/builder/commands/MakeAPI.java:572: cannot find symbol
symbol : class Type
location: class com.sun.squawk.builder.commands.MakeAPI
String ref(Type type, boolean qualified, boolean insideDocComment) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:617: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
private void printClass(SourceFile sf, ClassDoc cdoc, Suite.Class klass, boolean nestedClass) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:662: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
private void printNestedClasses(SourceFile sf, ClassDoc[] cdocs) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:680: cannot find symbol
symbol : class ExecutableMemberDoc
location: class com.sun.squawk.builder.commands.MakeAPI
String formatMethodDeclaration(ExecutableMemberDoc mdoc) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:716: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
static ClassDoc[] filterPragmas(ClassDoc[] exceptions) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:716: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
static ClassDoc[] filterPragmas(ClassDoc[] exceptions) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:811: cannot find symbol
symbol : class Type
location: class com.sun.squawk.builder.commands.MakeAPI
static String sig(Type type) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:858: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
static String sig(ClassDoc enclosingThis, Parameter[] parameters, String returnType) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:858: cannot find symbol
symbol : class Parameter
location: class com.sun.squawk.builder.commands.MakeAPI
static String sig(ClassDoc enclosingThis, Parameter[] parameters, String returnType) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:877: cannot find symbol
symbol : class Parameter
location: class com.sun.squawk.builder.commands.MakeAPI
static String sig(Parameter[] parameters, String returnType) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:888: cannot find symbol
symbol : class Parameter
location: class com.sun.squawk.builder.commands.MakeAPI
static String sig(Parameter[] parameters, Type returnType) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:888: cannot find symbol
symbol : class Type
location: class com.sun.squawk.builder.commands.MakeAPI
static String sig(Parameter[] parameters, Type returnType) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:914: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
static ClassDoc getTopLevelClass(ClassDoc cdoc) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:914: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
static ClassDoc getTopLevelClass(ClassDoc cdoc) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:929: cannot find symbol
symbol : class Type
location: class com.sun.squawk.builder.commands.MakeAPI
static String getDefaultValue(Type type) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1032: cannot find symbol
symbol : class RootDoc
location: class com.sun.squawk.builder.commands.MakeAPI
public static boolean start(RootDoc root) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1262: cannot find symbol
symbol : class DocErrorReporter
location: class com.sun.squawk.builder.commands.Suite.Class
List getMethods(DocErrorReporter der, ExecutableMemberDoc[] mdocs) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1262: cannot find symbol
symbol : class ExecutableMemberDoc
location: class com.sun.squawk.builder.commands.Suite.Class
List getMethods(DocErrorReporter der, ExecutableMemberDoc[] mdocs) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1305: cannot find symbol
symbol : class DocErrorReporter
location: class com.sun.squawk.builder.commands.Suite.Class
List getFields(DocErrorReporter der, FieldDoc[] fdocs) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1305: cannot find symbol
symbol : class FieldDoc
location: class com.sun.squawk.builder.commands.Suite.Class
List getFields(DocErrorReporter der, FieldDoc[] fdocs) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1047: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.SourceFile
private final ClassDoc cdoc;
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1054: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.SourceFile
SourceFile(ClassDoc cdoc) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1074: cannot find symbol
symbol : class Doc
location: class com.sun.squawk.builder.commands.SourceFile
void printDoc(Doc doc, MakeAPI api) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1092: cannot find symbol
symbol : class Tag
location: class com.sun.squawk.builder.commands.SourceFile
private void findRefs(MakeAPI api, Tag[] tags) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:246: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI.Constructors
final ClassDoc cdoc;
^
src/com/sun/squawk/builder/commands/MakeAPI.java:249: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI.Constructors
Constructors(ClassDoc cdoc) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:253: cannot find symbol
symbol : class ConstructorDoc
location: class com.sun.squawk.builder.commands.MakeAPI.Constructors
void add(ConstructorDoc c) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:139: cannot find symbol
symbol : class ConstructorDoc
location: class com.sun.squawk.builder.commands.MakeAPI.Constructors.SourceConstructor
final ConstructorDoc source;
^
src/com/sun/squawk/builder/commands/MakeAPI.java:140: cannot find symbol
symbol : class ConstructorDoc
location: class com.sun.squawk.builder.commands.MakeAPI.Constructors.SourceConstructor
SourceConstructor(ConstructorDoc source) {
^
src/com/sun/squawk/builder/ToDoTaglet.java:140: cannot find symbol
symbol : class Taglet
location: class com.sun.squawk.builder.ToDoTaglet
Taglet t = (Taglet) tagletMap.get(tag.getName());
^
src/com/sun/squawk/builder/ToDoTaglet.java:140: cannot find symbol
symbol : class Taglet
location: class com.sun.squawk.builder.ToDoTaglet
Taglet t = (Taglet) tagletMap.get(tag.getName());
^
src/com/sun/squawk/builder/commands/MakePlatformStubs.java:63: warning: sun.tools.jar.Main is Sun proprietary API and may be removed in a future release
new Main(System.out, System.err, "jar").run(new String[] {"umf", "imp/resources/META-INF/MANIFEST.MF", stubJarFile.getPath()});
^
src/com/sun/squawk/builder/commands/MakePlatformStubs.java:67: warning: sun.tools.jar.Main is Sun proprietary API and may be removed in a future release
new Main(System.out, System.err, "jar").run(new String[] {"cmf", "imp/resources/META-INF/MANIFEST.MF", stubJarFile.getPath()});
^
src/com/sun/squawk/builder/commands/MakeAPI.java:118: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI.Constructors.Constructor
ClassDoc sdoc = cdoc.superclass();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:162: cannot find symbol
symbol : class Parameter
location: class com.sun.squawk.builder.commands.MakeAPI.Constructors.SourceConstructor
Parameter[] parameters = source.parameters();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:208: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI.Constructors.SyntheticConstructor
ClassDoc[] exceptions = ( (SourceConstructor) superConstructor).source.thrownExceptions();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:448: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc cdoc = root.classNamed(klass.name);
^
src/com/sun/squawk/builder/commands/MakeAPI.java:478: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc cdoc = root.classNamed(klass.name);
^
src/com/sun/squawk/builder/commands/MakeAPI.java:491: cannot find symbol
symbol : class ConstructorDoc
location: class com.sun.squawk.builder.commands.MakeAPI
constructors.add((ConstructorDoc)iter.next());
^
src/com/sun/squawk/builder/commands/MakeAPI.java:503: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc cdoc = root.classNamed(klass.name);
^
src/com/sun/squawk/builder/commands/MakeAPI.java:512: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc sdoc = cdoc.superclass();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:573: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc cdoc = type.asClassDoc();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:591: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc ref = (ClassDoc)currentSourceRefs.get(name);
^
src/com/sun/squawk/builder/commands/MakeAPI.java:591: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc ref = (ClassDoc)currentSourceRefs.get(name);
^
src/com/sun/squawk/builder/commands/MakeAPI.java:633: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc[] interfaces = filterPragmas(cdoc.interfaces());
^
src/com/sun/squawk/builder/commands/MakeAPI.java:664: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc cdoc = cdocs[i];
^
src/com/sun/squawk/builder/commands/MakeAPI.java:681: cannot find symbol
symbol : class MethodDoc
location: class com.sun.squawk.builder.commands.MakeAPI
String returnType = (mdoc instanceof MethodDoc ? ref(((MethodDoc)mdoc).returnType(), false, false) + " " : "");
^
src/com/sun/squawk/builder/commands/MakeAPI.java:681: cannot find symbol
symbol : class MethodDoc
location: class com.sun.squawk.builder.commands.MakeAPI
String returnType = (mdoc instanceof MethodDoc ? ref(((MethodDoc)mdoc).returnType(), false, false) + " " : "");
^
src/com/sun/squawk/builder/commands/MakeAPI.java:688: cannot find symbol
symbol : class Parameter
location: class com.sun.squawk.builder.commands.MakeAPI
Parameter[] parameters = mdoc.parameters();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:690: cannot find symbol
symbol : class Parameter
location: class com.sun.squawk.builder.commands.MakeAPI
Parameter parameter = parameters[i];
^
src/com/sun/squawk/builder/commands/MakeAPI.java:700: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc[] exceptions = filterPragmas(mdoc.thrownExceptions());
^
src/com/sun/squawk/builder/commands/MakeAPI.java:720: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc exception = exceptions[i];
^
src/com/sun/squawk/builder/commands/MakeAPI.java:726: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
exceptions = new ClassDoc[list.size()];
^
src/com/sun/squawk/builder/commands/MakeAPI.java:740: cannot find symbol
symbol : class MethodDoc
location: class com.sun.squawk.builder.commands.MakeAPI
MethodDoc mdoc = (MethodDoc)i.next();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:740: cannot find symbol
symbol : class MethodDoc
location: class com.sun.squawk.builder.commands.MakeAPI
MethodDoc mdoc = (MethodDoc)i.next();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:762: cannot find symbol
symbol : class FieldDoc
location: class com.sun.squawk.builder.commands.MakeAPI
FieldDoc fdoc = (FieldDoc)i.next();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:762: cannot find symbol
symbol : class FieldDoc
location: class com.sun.squawk.builder.commands.MakeAPI
FieldDoc fdoc = (FieldDoc)i.next();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:778: operator + cannot be applied to FieldDoc.modifiers,char
sf.println(fdoc.modifiers() + ' ' + ref(fdoc.type(), false, false) + ' ' + fdoc.name() + cve + ';');
^
src/com/sun/squawk/builder/commands/MakeAPI.java:815: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc cdoc = type.asClassDoc();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:821: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc outer = cdoc.containingClass();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:823: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc nested = cdoc;
^
src/com/sun/squawk/builder/commands/MakeAPI.java:915: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.MakeAPI
ClassDoc outer = cdoc.containingClass();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1264: cannot find symbol
symbol : class ConstructorDoc
location: class com.sun.squawk.builder.commands.Suite.Class
boolean constructors = (mdocs instanceof ConstructorDoc[]);
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1272: cannot find symbol
symbol : class ExecutableMemberDoc
location: class com.sun.squawk.builder.commands.Suite.Class
ExecutableMemberDoc mdoc = mdocs[i];
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1275: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.Suite.Class
ClassDoc definingClass = mdoc.containingClass();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1276: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.Suite.Class
ClassDoc enclosingThis = null;
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1282: cannot find symbol
symbol : class MethodDoc
location: class com.sun.squawk.builder.commands.Suite.Class
sourceNameDesc = mdoc.name() + MakeAPI.sig(mdoc.parameters(), ((MethodDoc)mdoc).returnType());
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1312: cannot find symbol
symbol : class FieldDoc
location: class com.sun.squawk.builder.commands.Suite.Class
FieldDoc fdoc = fdocs[i];
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1326: cannot find symbol
symbol : class FieldDoc
location: class com.sun.squawk.builder.commands.Suite.Class
FieldDoc fdoc = fdocs[i];
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1094: cannot find symbol
symbol : class Tag
location: class com.sun.squawk.builder.commands.SourceFile
Tag tag = tags[i];
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1096: cannot find symbol
symbol : class SeeTag
location: class com.sun.squawk.builder.commands.SourceFile
if (tag instanceof SeeTag) {
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1097: cannot find symbol
symbol : class SeeTag
location: class com.sun.squawk.builder.commands.SourceFile
SeeTag ref = (SeeTag) tag;
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1097: cannot find symbol
symbol : class SeeTag
location: class com.sun.squawk.builder.commands.SourceFile
SeeTag ref = (SeeTag) tag;
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1098: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.SourceFile
ClassDoc cref = ref.referencedClass();
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1173: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.SourceFile
ClassDoc ref = MakeAPI.getTopLevelClass((ClassDoc)iter.next());
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1173: cannot find symbol
symbol : class ClassDoc
location: class com.sun.squawk.builder.commands.SourceFile
ClassDoc ref = MakeAPI.getTopLevelClass((ClassDoc)iter.next());
^
src/com/sun/squawk/builder/commands/MakeAPI.java:1192: operator + cannot be applied to ClassDoc.containingPackage.name,char
return new File(baseDir, (cdoc.containingPackage().name() + '.' + cdoc.name()).replace('.', File.separatorChar) + ".java");
^
81 errors
3 warnings

[/b]

Why shows this with the original source? So the squawk [b]./d.sh jvmenv[/b] doesn't work any more.

Thanks!

eric_arseneau
Offline
Joined: 2004-07-15

The issue here seems to be with MakeAPI which is not needed for what you are doing.

We should put in a conditional to remove it from use when you dont want it.

I think from memory that the issue your running into is related to the JDK version you are using. I always get annoyed when I run into these issues and need to work it out.

Let me know if you got through the problem, if not lets work on it and fix it :)

qawsed123
Offline
Joined: 2009-10-21

I think I resolve it pasting tools.jar into the builder folder and adding it to the classpath. Like this:

[b]$JAVAC -cp classes:../vm2c/lib/openjdk-javac-6-b12.jar:tools.jar -target 1.5 -source 1.5 -d classes -g `find src -name '*.java'`[/b]

Now I can create a builder-commands.jar with my .class.

Thanks.

PD: Also I downloaded the jdk of javadoc with Yast (opensuse).

Message was edited by: qawsed123