Undefined symbol.

34 views
Skip to first unread message

Kevin Burton

unread,
Mar 17, 2013, 8:52:44 AM3/17/13
to jso...@googlegroups.com
I have an IntelliJ IDS and a Maven project.

I tried

mvn install:install-file -Dfile=json-io-2.0.1.jar -DgroupId=json-io  -DartifactId=2.0.1 -Dversion=2.0.1 -Dpackaging=jar

Using the downloaded .jar file. This caused org:json:json:20090211 to be added to the External libraries. If I click on the '+' button to expand the listing I can see JSONWriter but the symbol JsonWriter as given in the example (https://code.google.com/p/json-io/ Example 2) still shows up as an undefined symbol. I am using:

                String json = JsonWriter.objectToJson(order);
                System.out.println(json);

I have the following at the beginning of the file:

import org.json.*;

But this still doesn't resolve the 'JsonWriter; symbol.


John DeRegnaucourt

unread,
Mar 17, 2013, 10:32:27 AM3/17/13
to jso...@googlegroups.com
Json-io is not yet in Maven.  I do plan to do that sometime soon.




--
You received this message because you are subscribed to the Google Groups "json-io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to json-io+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Kevin Burton

unread,
Mar 17, 2013, 2:21:54 PM3/17/13
to jso...@googlegroups.com
I am noew to Java development and deployment. If I am using IntelliJ IDE how do I make the library "available"? What imports should I use?

John DeRegnaucourt

unread,
Mar 17, 2013, 10:05:35 PM3/17/13
to jso...@googlegroups.com
Kevin,

Just make sure to add the json-io jar file to your build class path (build classpath is the classpath used during compilation time), and add the json-io jar file to your deployment classpath (the classpath used when the code is run inside a web server like tomcat).

Best regards,
John

Kaycoder

unread,
Apr 20, 2013, 1:35:53 PM4/20/13
to jso...@googlegroups.com

Kevin,

I use IntelliJ as well.. you need to go into the project settings (see File menu) and then add the jar there (see attached screenshot).
I typically create a /lib folder for non-maven jars in my projects and then just link to it from there.

Good luck,
Kaycoder
IntelliJNon-MavenJars.png

John

unread,
Nov 13, 2013, 8:02:40 AM11/13/13
to jso...@googlegroups.com
json-io is now on maven central.  Use the following snippet to include it:

<dependency>
 
<groupId>com.cedarsoftware</groupId>
 
<artifactId>json-io</artifactId>
 
<version>2.2.32</version>
</dependency>
Reply all
Reply to author
Forward
0 new messages