Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to import custom script ? #141

Open
KubaOfca opened this issue Mar 21, 2023 · 4 comments
Open

How to import custom script ? #141

KubaOfca opened this issue Mar 21, 2023 · 4 comments

Comments

@KubaOfca
Copy link

I want to import a custom java script into an IJava notebook. Is it possible?

I'm trying to do it this way, but it doesn't seem to work. I'm new to "Java" so if I'm doing something wrong please correct me.

My working directory structure:

├── com
│   └── example
│       ├── MyClass.class
│       └── MyClass.java
└── Test.ipynb

Test.ipynb:

image

MyClass.class/MyClass.java:

image

@AngryMaciek
Copy link

+1

@jimmybow
Copy link

jimmybow commented Sep 7, 2023

just use
%jars XXX.jar

@david-romano
Copy link

@jimmybow: But what if you want to import a class that is not contained in a .jar file, as @KubaOfca's example suggests?

@jimmybow
Copy link

jimmybow commented Feb 5, 2024

that's java...not python @@,
so you need to compile your code MyClass.java to a jar library package file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants