This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 158109 - Not able to include external java libraries. Importing JARs results in a "broken reference" error.
Summary: Not able to include external java libraries. Importing JARs results in a "bro...
Status: NEW
Alias: None
Product: contrib
Classification: Unclassified
Component: Scala (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P3 blocker (vote)
Assignee: _ dcaoyuan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-06 23:16 UTC by spiraljetty
Modified: 2009-02-07 00:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description spiraljetty 2009-02-06 23:16:59 UTC
Not able to include external java libraries. Importing JARs results in a "broken reference" error. 


I am trying to start a new Scala project that includes the javax.media.opengl libraries. No matter what I do I get an
error saying that I need to "resolve broken references" and a red squiggly line underneath the statement "import
javax.media.opengl_".

I can import normal java libraries without a problem, but for some reason it's not letting me import libraries from a
jar file. 

I've put the jogl.jar in a "lib" directory underneath my project and have included it via the Netbeans Project
Properties-->Libraries-->Compile-->Add JAR/Folder". 

I've tried restarting, etc. But I can't do something as simple as include a JAR into my Scala project!
Comment 1 _ dcaoyuan 2009-02-06 23:32:59 UTC
Please attach your nbproject/project.properties. Thanks.
Comment 2 spiraljetty 2009-02-06 23:36:14 UTC
application.title=ScalaApplication2
application.vendor=angus
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form,**/*.scala
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
debug.classpath=\
    ${run.classpath}
debug.test.classpath=\
    ${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/ScalaApplication2.jar
dist.javadoc.dir=${dist.dir}/javadoc
excludes=
file.reference.gluegen-rt.jar=/Users/angus/Projects/ScalaApplication2/gluegen-rt.jar
file.reference.jogl.jar=/Users/angus/Projects/ScalaApplication2/jogl.jar
includes=**
jar.compress=false
java.platform.active=java_default_platform
javac.classpath=\
    ${file.reference.gluegen-rt.jar}:\
    ${file.reference.jogl.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.source=1.5
javac.target=1.5
javac.test.classpath=\
    ${javac.classpath}:\
    ${build.classes.dir}:\
    ${libs.junit.classpath}:\
    ${libs.junit_4.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=scalaapplication2.Main
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
no.dependencies=true
platform.active=default_platform
run.classpath=\
    ${javac.classpath}:\
    ${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=-Djava.library.path="lib/"
run.test.classpath=\
    ${javac.test.classpath}:\
    ${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test

Comment 3 _ dcaoyuan 2009-02-06 23:45:36 UTC
From the project.properties, your gluegen-rt.jar and jogl.jar are not under ...../ScalaApplication2/lib ?
Comment 4 _ dcaoyuan 2009-02-06 23:58:16 UTC
Does jogl.jar also depend on other jars? scalac seems refer classes deeply, if fails, it will complain that all classes
are not resolvable. 
Comment 5 spiraljetty 2009-02-07 00:14:56 UTC
Hi, no jogl.jar and gluegen.jar do not depend on any other jars. Also, just to clarify, this is not a run-time error. I can't even get it to compile. Even simply 
adding the line "import javax.media.opengl_" is enough to break the project. To run an application using these jars you do need the native libs available. So I 
imagine that inside one of the jars there are calls to native methods. Do you want me to send you these two jars?