Jump to content
Excelsior Forums
Sign in to follow this  
felipelo

Compile Java file using Jet VM

Recommended Posts

Hello all.

I have a program build on Jet. And this program create java files and try to compile it. So I need the java's jars in my classpath.

I'm using the Main.compile() method to do it. But I get some errors like miss some classes in the classpath as Object.

My question is: Exist a way to use the VM generated by JET? Or another way to compile my classes without have to install JRE?

Share this post


Link to post
Share on other sites

Excelsior JET version 6.5 (and below):

   1. Open your JetPackII project

   2. Go to page Runtime and check the box "Java SE API classes"

   3. Build the package and the problem should be out

Excelsior JET version 7.0 (and above):

Everythng will work without packaging the standard classes

See the Improvements section in the what's new list of Excelsior JET 7.0 beta 2 available at

    http://www.excelsior-usa.com/jetdlbeta.html

Share this post


Link to post
Share on other sites
But what make me think that exist another way is the API called BeanShell. It execute java code (and more) without Java SE API in package.

The JET Runtime includes the classes in pre-compiled form. It's enough for most APIs except those using .class files as both code and resource files.

An example is the standard javac compiler that opens and reads the original .class files (e.g.java/lang/*.class) to resolve references in Java source files being compiled.

Since Excelsior JET 7.0, it will work without rt.jar in the package. You may download beta 2 and get convinced of that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×