clojure - How do I include java stuff in .jar files? -


OK, so my question is: I am creating a data parser in the closure. One part of my program is that we should be able to graph data. I think I will use jFreeChart. However, I do not have any ideas on how to include stuff in JR files: What do I mean if I have an app.jar file in my roompack, then I do not seem to be able to:

Import app.thing.thing2

The classpath should be inside the jar file without making changes.

Here is the idea that I do not think I can change my classpost, because I have to set it to run the closure (or what?). Global classpath is currently / usr / share / java.

And please do not ask me to use Maven, Ant or any project-building tool, unless it's the only way to do this. This is a script for personal use that does not require an overhead or not.

I wonder if I should just open every JR file, so that I can reference directory structure? Is this bad?

Let me know if you need any explanation!

The content of environment variable is available for the closer (java) CLASSPATH So if you add your class to the global class before running Closer, you will see it:

  export CLASSPATH = / path / to / jfreechart.jar: $ CLASSPATH  

However, in my opinion, this is not a "clean" way to add a jar to the closet classmates (because this library looks for any any java program and will Can not) be. Instead, you should use the CLOJURE_EXT environment variable to explain how this variable is documented:

  # CLOJURE_EXT The path of a directory (either directly or #smink link) As jar files and / or directories whose path # should be in the closet's closet. The value of #CLASSPATH environment variable for the closure will be #List of these paths, which will be according to the previous value CLASSPATH # (if any).  

On my system, it is defined below:

  exporting CLOJURE_EXT = ~ / .clojure  

Therefore, to add Jfreechart.jar (or any other library) to the class of closures, copy it to the directory defined in the CLOJURE_EXT variable (or add a symlink pointing to it).

And anyway (I'm sorry, but your question is not clear), if you want to bundle some Java classes in a jar, then the command is as follows:

  $ jar cf myjarfile * .class  

You will get a documentation of jar - java archive tool.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -